View | Details | Raw Unified | Return to bug 35646
Collapse All | Expand All

(-)a/C4/Serials.pm (+16 lines)
Lines 42-47 use C4::Serials::Frequency qw( GetSubscriptionFrequency ); Link Here
42
use C4::Serials::Numberpattern;
42
use C4::Serials::Numberpattern;
43
use Koha::AdditionalFieldValues;
43
use Koha::AdditionalFieldValues;
44
use Koha::Biblios;
44
use Koha::Biblios;
45
use Koha::DateUtils qw( dt_from_string );
45
use Koha::Serial;
46
use Koha::Serial;
46
use Koha::SharedContent;
47
use Koha::SharedContent;
47
use Koha::Subscription::Histories;
48
use Koha::Subscription::Histories;
Lines 909-914 sub GetNextSeq { Link Here
909
            $calculated =~ s/\{Z\}/$newlastvalue3string/g;
910
            $calculated =~ s/\{Z\}/$newlastvalue3string/g;
910
        }
911
        }
911
912
913
        my $dt = dt_from_string($planneddate);
914
        $calculated =~ s/\{Month\}/$dt->month/eg;
915
        $calculated =~ s/\{MonthName\}/$dt->month_name/eg;
916
        $calculated =~ s/\{Year\}/$dt->year/eg;
917
        $calculated =~ s/\{Day\}/$dt->day/eg;
918
        $calculated =~ s/\{DayName\}/$dt->day_name/eg;
919
912
    }
920
    }
913
921
914
    return ($calculated,
922
    return ($calculated,
Lines 947-952 sub GetSeq { Link Here
947
    my $newlastvalue3 = $subscription->{'lastvalue3'} || 0;
955
    my $newlastvalue3 = $subscription->{'lastvalue3'} || 0;
948
    $newlastvalue3 = _numeration($newlastvalue3, $pattern->{numbering3}, $locale) if ($pattern->{numbering3}); # reset counter if needed.
956
    $newlastvalue3 = _numeration($newlastvalue3, $pattern->{numbering3}, $locale) if ($pattern->{numbering3}); # reset counter if needed.
949
    $calculated =~ s/\{Z\}/$newlastvalue3/g;
957
    $calculated =~ s/\{Z\}/$newlastvalue3/g;
958
959
    my $dt = dt_from_string( $subscription->{firstaquidate} );
960
    $calculated =~ s/\{Month\}/$dt->month/eg;
961
    $calculated =~ s/\{MonthName\}/$dt->month_name/eg;
962
    $calculated =~ s/\{Year\}/$dt->year/eg;
963
    $calculated =~ s/\{Day\}/$dt->day/eg;
964
    $calculated =~ s/\{DayName\}/$dt->day_name/eg;
965
950
    return $calculated;
966
    return $calculated;
951
}
967
}
952
968
(-)a/serials/showpredictionpattern.pl (-2 / +1 lines)
Lines 163-169 while( $i < 1000 ) { Link Here
163
        last;
163
        last;
164
    }
164
    }
165
165
166
    ($calculated, $subscription{'lastvalue1'}, $subscription{'lastvalue2'}, $subscription{'lastvalue3'}, $subscription{'innerloop1'}, $subscription{'innerloop2'}, $subscription{'innerloop3'}) = GetNextSeq(\%subscription, \%pattern, $frequency);
166
    ($calculated, $subscription{'lastvalue1'}, $subscription{'lastvalue2'}, $subscription{'lastvalue3'}, $subscription{'innerloop1'}, $subscription{'innerloop2'}, $subscription{'innerloop3'}) = GetNextSeq(\%subscription, \%pattern, $frequency, $date);
167
    $issuenumber++;
167
    $issuenumber++;
168
    $line{'number'} = $calculated;
168
    $line{'number'} = $calculated;
169
    $line{'issuenumber'} = $issuenumber;
169
    $line{'issuenumber'} = $issuenumber;
170
- 

Return to bug 35646