Lines 799-805
sub GetPreviousSerialid {
Link Here
|
799 |
my ( |
799 |
my ( |
800 |
$nextseq, $newlastvalue1, $newlastvalue2, $newlastvalue3, |
800 |
$nextseq, $newlastvalue1, $newlastvalue2, $newlastvalue3, |
801 |
$newinnerloop1, $newinnerloop2, $newinnerloop3 |
801 |
$newinnerloop1, $newinnerloop2, $newinnerloop3 |
802 |
) = GetNextSeq( $subscription, $pattern, $frequency, $planneddate ); |
802 |
) = GetNextSeq( $subscription, $pattern, $frequency, $planneddate, $count_forward ); |
803 |
|
803 |
|
804 |
$subscription is a hashref containing all the attributes of the table |
804 |
$subscription is a hashref containing all the attributes of the table |
805 |
'subscription'. |
805 |
'subscription'. |
Lines 807-824
$pattern is a hashref containing all the attributes of the table
Link Here
|
807 |
'subscription_numberpatterns'. |
807 |
'subscription_numberpatterns'. |
808 |
$frequency is a hashref containing all the attributes of the table 'subscription_frequencies' |
808 |
$frequency is a hashref containing all the attributes of the table 'subscription_frequencies' |
809 |
$planneddate is a date string in iso format. |
809 |
$planneddate is a date string in iso format. |
|
|
810 |
$count_forward is the number of issues to count forward, defaults to 1 if omitted |
810 |
This function get the next issue for the subscription given on input arg |
811 |
This function get the next issue for the subscription given on input arg |
811 |
|
812 |
|
812 |
=cut |
813 |
=cut |
813 |
|
814 |
|
814 |
sub GetNextSeq { |
815 |
sub GetNextSeq { |
815 |
my ($subscription, $pattern, $frequency, $planneddate) = @_; |
816 |
my ($subscription, $pattern, $frequency, $planneddate, $count_forward) = @_; |
816 |
|
817 |
|
817 |
return unless ($subscription and $pattern); |
818 |
return unless ($subscription and $pattern); |
818 |
|
819 |
|
819 |
my ( $newlastvalue1, $newlastvalue2, $newlastvalue3, |
820 |
my ( $newlastvalue1, $newlastvalue2, $newlastvalue3, |
820 |
$newinnerloop1, $newinnerloop2, $newinnerloop3 ); |
821 |
$newinnerloop1, $newinnerloop2, $newinnerloop3 ); |
821 |
my $count = 1; |
822 |
my $count = $count_forward ? $count_forward : 1; |
822 |
|
823 |
|
823 |
if ($subscription->{'skip_serialseq'}) { |
824 |
if ($subscription->{'skip_serialseq'}) { |
824 |
my @irreg = split /;/, $subscription->{'irregularity'}; |
825 |
my @irreg = split /;/, $subscription->{'irregularity'}; |
Lines 1042-1048
sub ModSubscriptionHistory {
Link Here
|
1042 |
=head2 ModSerialStatus |
1043 |
=head2 ModSerialStatus |
1043 |
|
1044 |
|
1044 |
ModSerialStatus($serialid, $serialseq, $planneddate, $publisheddate, |
1045 |
ModSerialStatus($serialid, $serialseq, $planneddate, $publisheddate, |
1045 |
$publisheddatetext, $status, $notes); |
1046 |
$publisheddatetext, $status, $notes, $count_forward); |
1046 |
|
1047 |
|
1047 |
This function modify the serial status. Serial status is a number.(eg 2 is "arrived") |
1048 |
This function modify the serial status. Serial status is a number.(eg 2 is "arrived") |
1048 |
Note : if we change from "waited" to something else,then we will have to create a new "waited" entry |
1049 |
Note : if we change from "waited" to something else,then we will have to create a new "waited" entry |
Lines 1051-1060
Note : if we change from "waited" to something else,then we will have to create
Link Here
|
1051 |
|
1052 |
|
1052 |
sub ModSerialStatus { |
1053 |
sub ModSerialStatus { |
1053 |
my ($serialid, $serialseq, $planneddate, $publisheddate, $publisheddatetext, |
1054 |
my ($serialid, $serialseq, $planneddate, $publisheddate, $publisheddatetext, |
1054 |
$status, $notes) = @_; |
1055 |
$status, $notes, $count_forward) = @_; |
1055 |
|
1056 |
|
1056 |
return unless ($serialid); |
1057 |
return unless ($serialid); |
1057 |
|
1058 |
|
|
|
1059 |
my $count = $count_forward ? $count_forward : 1; |
1060 |
|
1058 |
#It is a usual serial |
1061 |
#It is a usual serial |
1059 |
# 1st, get previous status : |
1062 |
# 1st, get previous status : |
1060 |
my $dbh = C4::Context->dbh; |
1063 |
my $dbh = C4::Context->dbh; |
Lines 1123-1129
sub ModSerialStatus {
Link Here
|
1123 |
$newserialseq, $newlastvalue1, $newlastvalue2, $newlastvalue3, |
1126 |
$newserialseq, $newlastvalue1, $newlastvalue2, $newlastvalue3, |
1124 |
$newinnerloop1, $newinnerloop2, $newinnerloop3 |
1127 |
$newinnerloop1, $newinnerloop2, $newinnerloop3 |
1125 |
) |
1128 |
) |
1126 |
= GetNextSeq( $subscription, $pattern, $frequency, $publisheddate ); |
1129 |
= GetNextSeq( $subscription, $pattern, $frequency, $publisheddate, $count ); |
1127 |
|
1130 |
|
1128 |
# next date (calculated from actual date & frequency parameters) |
1131 |
# next date (calculated from actual date & frequency parameters) |
1129 |
my $nextpublisheddate = GetNextDate($subscription, $publisheddate, $frequency, 1); |
1132 |
my $nextpublisheddate = GetNextDate($subscription, $publisheddate, $frequency, 1); |