Lines 814-820
sub GetPreviousSerialid {
Link Here
|
814 |
my ( |
814 |
my ( |
815 |
$nextseq, $newlastvalue1, $newlastvalue2, $newlastvalue3, |
815 |
$nextseq, $newlastvalue1, $newlastvalue2, $newlastvalue3, |
816 |
$newinnerloop1, $newinnerloop2, $newinnerloop3 |
816 |
$newinnerloop1, $newinnerloop2, $newinnerloop3 |
817 |
) = GetNextSeq( $subscription, $pattern, $frequency, $planneddate ); |
817 |
) = GetNextSeq( $subscription, $pattern, $frequency, $planneddate, $count_forward ); |
818 |
|
818 |
|
819 |
$subscription is a hashref containing all the attributes of the table |
819 |
$subscription is a hashref containing all the attributes of the table |
820 |
'subscription'. |
820 |
'subscription'. |
Lines 822-839
$pattern is a hashref containing all the attributes of the table
Link Here
|
822 |
'subscription_numberpatterns'. |
822 |
'subscription_numberpatterns'. |
823 |
$frequency is a hashref containing all the attributes of the table 'subscription_frequencies' |
823 |
$frequency is a hashref containing all the attributes of the table 'subscription_frequencies' |
824 |
$planneddate is a date string in iso format. |
824 |
$planneddate is a date string in iso format. |
|
|
825 |
$count_forward is the number of issues to count forward, defaults to 1 if omitted |
825 |
This function get the next issue for the subscription given on input arg |
826 |
This function get the next issue for the subscription given on input arg |
826 |
|
827 |
|
827 |
=cut |
828 |
=cut |
828 |
|
829 |
|
829 |
sub GetNextSeq { |
830 |
sub GetNextSeq { |
830 |
my ($subscription, $pattern, $frequency, $planneddate) = @_; |
831 |
my ($subscription, $pattern, $frequency, $planneddate, $count_forward) = @_; |
831 |
|
832 |
|
832 |
return unless ($subscription and $pattern); |
833 |
return unless ($subscription and $pattern); |
833 |
|
834 |
|
834 |
my ( $newlastvalue1, $newlastvalue2, $newlastvalue3, |
835 |
my ( $newlastvalue1, $newlastvalue2, $newlastvalue3, |
835 |
$newinnerloop1, $newinnerloop2, $newinnerloop3 ); |
836 |
$newinnerloop1, $newinnerloop2, $newinnerloop3 ); |
836 |
my $count = 1; |
837 |
my $count = $count_forward ? $count_forward : 1; |
837 |
|
838 |
|
838 |
if ($subscription->{'skip_serialseq'}) { |
839 |
if ($subscription->{'skip_serialseq'}) { |
839 |
my @irreg = split /;/, $subscription->{'irregularity'}; |
840 |
my @irreg = split /;/, $subscription->{'irregularity'}; |
Lines 1058-1064
sub ModSubscriptionHistory {
Link Here
|
1058 |
=head2 ModSerialStatus |
1059 |
=head2 ModSerialStatus |
1059 |
|
1060 |
|
1060 |
ModSerialStatus($serialid, $serialseq, $planneddate, $publisheddate, |
1061 |
ModSerialStatus($serialid, $serialseq, $planneddate, $publisheddate, |
1061 |
$publisheddatetext, $status, $notes); |
1062 |
$publisheddatetext, $status, $notes, $count_forward); |
1062 |
|
1063 |
|
1063 |
This function modify the serial status. Serial status is a number.(eg 2 is "arrived") |
1064 |
This function modify the serial status. Serial status is a number.(eg 2 is "arrived") |
1064 |
Note : if we change from "waited" to something else,then we will have to create a new "waited" entry |
1065 |
Note : if we change from "waited" to something else,then we will have to create a new "waited" entry |
Lines 1067-1076
Note : if we change from "waited" to something else,then we will have to create
Link Here
|
1067 |
|
1068 |
|
1068 |
sub ModSerialStatus { |
1069 |
sub ModSerialStatus { |
1069 |
my ($serialid, $serialseq, $planneddate, $publisheddate, $publisheddatetext, |
1070 |
my ($serialid, $serialseq, $planneddate, $publisheddate, $publisheddatetext, |
1070 |
$status, $notes) = @_; |
1071 |
$status, $notes, $count_forward) = @_; |
1071 |
|
1072 |
|
1072 |
return unless ($serialid); |
1073 |
return unless ($serialid); |
1073 |
|
1074 |
|
|
|
1075 |
my $count = $count_forward ? $count_forward : 1; |
1076 |
|
1074 |
#It is a usual serial |
1077 |
#It is a usual serial |
1075 |
# 1st, get previous status : |
1078 |
# 1st, get previous status : |
1076 |
my $dbh = C4::Context->dbh; |
1079 |
my $dbh = C4::Context->dbh; |
Lines 1139-1145
sub ModSerialStatus {
Link Here
|
1139 |
$newserialseq, $newlastvalue1, $newlastvalue2, $newlastvalue3, |
1142 |
$newserialseq, $newlastvalue1, $newlastvalue2, $newlastvalue3, |
1140 |
$newinnerloop1, $newinnerloop2, $newinnerloop3 |
1143 |
$newinnerloop1, $newinnerloop2, $newinnerloop3 |
1141 |
) |
1144 |
) |
1142 |
= GetNextSeq( $subscription, $pattern, $frequency, $publisheddate ); |
1145 |
= GetNextSeq( $subscription, $pattern, $frequency, $publisheddate, $count ); |
1143 |
|
1146 |
|
1144 |
# next date (calculated from actual date & frequency parameters) |
1147 |
# next date (calculated from actual date & frequency parameters) |
1145 |
my $nextpublisheddate = GetNextDate($subscription, $publisheddate, $frequency, 1); |
1148 |
my $nextpublisheddate = GetNextDate($subscription, $publisheddate, $frequency, 1); |