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

(-)a/C4/Serials.pm (-70 / +64 lines)
Lines 889-914 sub GetDistributedTo { Link Here
889
889
890
=head2 GetNextSeq
890
=head2 GetNextSeq
891
891
892
GetNextSeq($val)
892
    my (
893
$val is a hashref containing all the attributes of the table 'subscription'
893
        $nextseq,       $newlastvalue1, $newlastvalue2, $newlastvalue3,
894
        $newinnerloop1, $newinnerloop2, $newinnerloop3
895
    ) = GetNextSeq( $subscription, $pattern, $planneddate );
896
897
$subscription is a hashref containing all the attributes of the table
898
'subscription'.
899
$pattern is a hashref containing all the attributes of the table
900
'subscription_numberpatterns'.
901
$planneddate is a C4::Dates object.
894
This function get the next issue for the subscription given on input arg
902
This function get the next issue for the subscription given on input arg
895
return:
896
a list containing all the input params updated.
897
903
898
=cut
904
=cut
899
905
900
sub GetNextSeq {
906
sub GetNextSeq {
901
    my ($val, $planneddate) = @_;
907
    my ($subscription, $pattern, $planneddate) = @_;
902
    my ( $calculated, $newlastvalue1, $newlastvalue2, $newlastvalue3,
908
    my ( $calculated, $newlastvalue1, $newlastvalue2, $newlastvalue3,
903
    $newinnerloop1, $newinnerloop2, $newinnerloop3 );
909
    $newinnerloop1, $newinnerloop2, $newinnerloop3 );
904
    my $count = 1;
910
    my $count = 1;
905
911
906
    if($val->{'skip_serialseq'}) {
912
    if ($subscription->{'skip_serialseq'}) {
907
        my @irreg = split /;/, $val->{'irregularity'};
913
        my @irreg = split /;/, $subscription->{'irregularity'};
908
        if(@irreg > 0) {
914
        if(@irreg > 0) {
909
            my $irregularities = {};
915
            my $irregularities = {};
910
            $irregularities->{$_} = 1 foreach(@irreg);
916
            $irregularities->{$_} = 1 foreach(@irreg);
911
            my $issueno = GetFictiveIssueNumber($val, $planneddate) + 1;
917
            my $issueno = GetFictiveIssueNumber($subscription, $planneddate) + 1;
912
            while($irregularities->{$issueno}) {
918
            while($irregularities->{$issueno}) {
913
                $count++;
919
                $count++;
914
                $issueno++;
920
                $issueno++;
Lines 916-977 sub GetNextSeq { Link Here
916
        }
922
        }
917
    }
923
    }
918
924
919
    my $pattern = $val->{numberpattern};
925
    my $numberingmethod = $pattern->{numberingmethod};
920
    $calculated    = $val->{numberingmethod};
926
    $calculated    = $numberingmethod;
921
    my $locale = $val->{locale};
927
    my $locale = $subscription->{locale};
922
    $newlastvalue1 = $val->{lastvalue1} || 0;
928
    $newlastvalue1 = $subscription->{lastvalue1} || 0;
923
    $newlastvalue2 = $val->{lastvalue2} || 0;
929
    $newlastvalue2 = $subscription->{lastvalue2} || 0;
924
    $newlastvalue3 = $val->{lastvalue3} || 0;
930
    $newlastvalue3 = $subscription->{lastvalue3} || 0;
925
    $newinnerloop1 = $val->{innerloop1} || 0;
931
    $newinnerloop1 = $subscription->{innerloop1} || 0;
926
    $newinnerloop2 = $val->{innerloop2} || 0;
932
    $newinnerloop2 = $subscription->{innerloop2} || 0;
927
    $newinnerloop3 = $val->{innerloop3} || 0;
933
    $newinnerloop3 = $subscription->{innerloop3} || 0;
928
    my %calc;
934
    my %calc;
929
    foreach(qw/X Y Z/) {
935
    foreach(qw/X Y Z/) {
930
        $calc{$_} = 1 if ($val->{'numberingmethod'} =~ /\{$_\}/);
936
        $calc{$_} = 1 if ($numberingmethod =~ /\{$_\}/);
931
    }
937
    }
932
938
933
    for(my $i = 0; $i < $count; $i++) {
939
    for(my $i = 0; $i < $count; $i++) {
934
        if($calc{'X'}) {
940
        if($calc{'X'}) {
935
            # check if we have to increase the new value.
941
            # check if we have to increase the new value.
936
            $newinnerloop1 += 1;
942
            $newinnerloop1 += 1;
937
            if ($newinnerloop1 >= $val->{every1}) {
943
            if ($newinnerloop1 >= $pattern->{every1}) {
938
                $newinnerloop1  = 0;
944
                $newinnerloop1  = 0;
939
                $newlastvalue1 += $val->{add1};
945
                $newlastvalue1 += $pattern->{add1};
940
            }
946
            }
941
            # reset counter if needed.
947
            # reset counter if needed.
942
            $newlastvalue1 = $val->{setto1} if ($newlastvalue1 > $val->{whenmorethan1});
948
            $newlastvalue1 = $pattern->{setto1} if ($newlastvalue1 > $pattern->{whenmorethan1});
943
        }
949
        }
944
        if($calc{'Y'}) {
950
        if($calc{'Y'}) {
945
            # check if we have to increase the new value.
951
            # check if we have to increase the new value.
946
            $newinnerloop2 += 1;
952
            $newinnerloop2 += 1;
947
            if ($newinnerloop2 >= $val->{every2}) {
953
            if ($newinnerloop2 >= $pattern->{every2}) {
948
                $newinnerloop2  = 0;
954
                $newinnerloop2  = 0;
949
                $newlastvalue2 += $val->{add2};
955
                $newlastvalue2 += $pattern->{add2};
950
            }
956
            }
951
            # reset counter if needed.
957
            # reset counter if needed.
952
            $newlastvalue2 = $val->{setto2} if ($newlastvalue2 > $val->{whenmorethan2});
958
            $newlastvalue2 = $pattern->{setto2} if ($newlastvalue2 > $pattern->{whenmorethan2});
953
        }
959
        }
954
        if($calc{'Z'}) {
960
        if($calc{'Z'}) {
955
            # check if we have to increase the new value.
961
            # check if we have to increase the new value.
956
            $newinnerloop3 += 1;
962
            $newinnerloop3 += 1;
957
            if ($newinnerloop3 >= $val->{every3}) {
963
            if ($newinnerloop3 >= $pattern->{every3}) {
958
                $newinnerloop3  = 0;
964
                $newinnerloop3  = 0;
959
                $newlastvalue3 += $val->{add3};
965
                $newlastvalue3 += $pattern->{add3};
960
            }
966
            }
961
            # reset counter if needed.
967
            # reset counter if needed.
962
            $newlastvalue3 = $val->{setto3} if ($newlastvalue3 > $val->{whenmorethan3});
968
            $newlastvalue3 = $pattern->{setto3} if ($newlastvalue3 > $pattern->{whenmorethan3});
963
        }
969
        }
964
    }
970
    }
965
    if($calc{'X'}) {
971
    if($calc{'X'}) {
966
        my $newlastvalue1string = _numeration( $newlastvalue1, $val->{numbering1}, $locale );
972
        my $newlastvalue1string = _numeration( $newlastvalue1, $pattern->{numbering1}, $locale );
967
        $calculated =~ s/\{X\}/$newlastvalue1string/g;
973
        $calculated =~ s/\{X\}/$newlastvalue1string/g;
968
    }
974
    }
969
    if($calc{'Y'}) {
975
    if($calc{'Y'}) {
970
        my $newlastvalue2string = _numeration( $newlastvalue2, $val->{numbering2}, $locale );
976
        my $newlastvalue2string = _numeration( $newlastvalue2, $pattern->{numbering2}, $locale );
971
        $calculated =~ s/\{Y\}/$newlastvalue2string/g;
977
        $calculated =~ s/\{Y\}/$newlastvalue2string/g;
972
    }
978
    }
973
    if($calc{'Z'}) {
979
    if($calc{'Z'}) {
974
        my $newlastvalue3string = _numeration( $newlastvalue3, $val->{numbering3}, $locale );
980
        my $newlastvalue3string = _numeration( $newlastvalue3, $pattern->{numbering3}, $locale );
975
        $calculated =~ s/\{Z\}/$newlastvalue3string/g;
981
        $calculated =~ s/\{Z\}/$newlastvalue3string/g;
976
    }
982
    }
977
983
Lines 982-1012 sub GetNextSeq { Link Here
982
988
983
=head2 GetSeq
989
=head2 GetSeq
984
990
985
$calculated = GetSeq($val)
991
$calculated = GetSeq($subscription, $pattern)
986
$val is a hashref containing all the attributes of the table 'subscription'
992
$subscription is a hashref containing all the attributes of the table 'subscription'
993
$pattern is a hashref containing all the attributes of the table 'subscription_numberpatterns'
987
this function transforms {X},{Y},{Z} to 150,0,0 for example.
994
this function transforms {X},{Y},{Z} to 150,0,0 for example.
988
return:
995
return:
989
the sequence in integer format
996
the sequence in string format
990
997
991
=cut
998
=cut
992
999
993
sub GetSeq {
1000
sub GetSeq {
994
    my ($val) = @_;
1001
    my ($subscription, $pattern) = @_;
995
    my $locale = $val->{locale};
1002
    my $locale = $subscription->{locale};
996
1003
997
    my $pattern = $val->{numberpattern};
1004
    my $calculated = $pattern->{numberingmethod};
998
    my $calculated = $val->{numberingmethod};
999
1005
1000
    my $newlastvalue1 = $val->{'lastvalue1'} || 0;
1006
    my $newlastvalue1 = $subscription->{'lastvalue1'} || 0;
1001
    $newlastvalue1 = _numeration($newlastvalue1, $val->{numbering1}, $locale) if ($val->{numbering1}); # reset counter if needed.
1007
    $newlastvalue1 = _numeration($newlastvalue1, $pattern->{numbering1}, $locale) if ($pattern->{numbering1}); # reset counter if needed.
1002
    $calculated =~ s/\{X\}/$newlastvalue1/g;
1008
    $calculated =~ s/\{X\}/$newlastvalue1/g;
1003
1009
1004
    my $newlastvalue2 = $val->{'lastvalue2'} || 0;
1010
    my $newlastvalue2 = $subscription->{'lastvalue2'} || 0;
1005
    $newlastvalue2 = _numeration($newlastvalue2, $val->{numbering2}, $locale) if ($val->{numbering2}); # reset counter if needed.
1011
    $newlastvalue2 = _numeration($newlastvalue2, $pattern->{numbering2}, $locale) if ($pattern->{numbering2}); # reset counter if needed.
1006
    $calculated =~ s/\{Y\}/$newlastvalue2/g;
1012
    $calculated =~ s/\{Y\}/$newlastvalue2/g;
1007
1013
1008
    my $newlastvalue3 = $val->{'lastvalue3'} || 0;
1014
    my $newlastvalue3 = $subscription->{'lastvalue3'} || 0;
1009
    $newlastvalue3 = _numeration($newlastvalue3, $val->{numbering3}, $locale) if ($val->{numbering3}); # reset counter if needed.
1015
    $newlastvalue3 = _numeration($newlastvalue3, $pattern->{numbering3}, $locale) if ($pattern->{numbering3}); # reset counter if needed.
1010
    $calculated =~ s/\{Z\}/$newlastvalue3/g;
1016
    $calculated =~ s/\{Z\}/$newlastvalue3/g;
1011
    return $calculated;
1017
    return $calculated;
1012
}
1018
}
Lines 1205-1238 sub ModSerialStatus { Link Here
1205
1211
1206
    # create new waited entry if needed (ie : was a "waited" and has changed)
1212
    # create new waited entry if needed (ie : was a "waited" and has changed)
1207
    if ( $oldstatus == 1 && $status != 1 ) {
1213
    if ( $oldstatus == 1 && $status != 1 ) {
1208
        my $query = qq{
1214
        my $subscription = GetSubscription($subscriptionid);
1209
            SELECT subscription.*, subscription_numberpatterns.*,
1215
        my $pattern = C4::Serials::Numberpattern::GetSubscriptionNumberpattern($subscription->{numberpattern});
1210
                   subscription_frequencies.*
1211
            FROM subscription
1212
            LEFT JOIN subscription_numberpatterns ON subscription.numberpattern = subscription_numberpatterns.id
1213
            LEFT JOIN subscription_frequencies ON subscription.periodicity = subscription_frequencies.id
1214
            WHERE subscriptionid = ?
1215
        };
1216
        $sth = $dbh->prepare($query);
1217
        $sth->execute($subscriptionid);
1218
        my $val = $sth->fetchrow_hashref;
1219
1216
1220
        # next issue number
1217
        # next issue number
1221
        my ( $newserialseq, $newlastvalue1, $newlastvalue2, $newlastvalue3, $newinnerloop1, $newinnerloop2, $newinnerloop3 ) = GetNextSeq($val, $publisheddate);
1218
        my (
1219
            $newserialseq,  $newlastvalue1, $newlastvalue2, $newlastvalue3,
1220
            $newinnerloop1, $newinnerloop2, $newinnerloop3
1221
          )
1222
          = GetNextSeq( $subscription, $pattern, $publisheddate );
1222
1223
1223
        # next date (calculated from actual date & frequency parameters)
1224
        # next date (calculated from actual date & frequency parameters)
1224
        my $nextpublisheddate = GetNextDate($val, $publisheddate, 1);
1225
        my $nextpublisheddate = GetNextDate($subscription, $publisheddate, 1);
1225
        my $nextpubdate = $nextpublisheddate;
1226
        my $nextpubdate = $nextpublisheddate;
1226
        NewIssue( $newserialseq, $subscriptionid, $val->{'biblionumber'}, 1, $nextpubdate, $nextpubdate );
1227
        NewIssue( $newserialseq, $subscriptionid, $subscription->{'biblionumber'}, 1, $nextpubdate, $nextpubdate );
1227
        $query = "UPDATE subscription SET lastvalue1=?, lastvalue2=?, lastvalue3=?, innerloop1=?, innerloop2=?, innerloop3=?
1228
        $query = "UPDATE subscription SET lastvalue1=?, lastvalue2=?, lastvalue3=?, innerloop1=?, innerloop2=?, innerloop3=?
1228
                    WHERE  subscriptionid = ?";
1229
                    WHERE  subscriptionid = ?";
1229
        $sth = $dbh->prepare($query);
1230
        $sth = $dbh->prepare($query);
1230
        $sth->execute( $newlastvalue1, $newlastvalue2, $newlastvalue3, $newinnerloop1, $newinnerloop2, $newinnerloop3, $subscriptionid );
1231
        $sth->execute( $newlastvalue1, $newlastvalue2, $newlastvalue3, $newinnerloop1, $newinnerloop2, $newinnerloop3, $subscriptionid );
1231
1232
1232
        # check if an alert must be sent... (= a letter is defined & status became "arrived"
1233
        # check if an alert must be sent... (= a letter is defined & status became "arrived"
1233
        if ( $val->{letter} && $status == 2 && $oldstatus != 2 ) {
1234
        if ( $subscription->{letter} && $status == 2 && $oldstatus != 2 ) {
1234
            require C4::Letters;
1235
            require C4::Letters;
1235
            C4::Letters::SendAlerts( 'issue', $val->{subscriptionid}, $val->{letter} );
1236
            C4::Letters::SendAlerts( 'issue', $subscription->{subscriptionid}, $subscription->{letter} );
1236
        }
1237
        }
1237
    }
1238
    }
1238
1239
Lines 1275-1281 sub GetNextExpected { Link Here
1275
            SELECT *
1276
            SELECT *
1276
            FROM serial
1277
            FROM serial
1277
            WHERE subscriptionid = ?
1278
            WHERE subscriptionid = ?
1278
            ORDER BY planneddate DESC
1279
            ORDER BY publisheddate DESC
1279
            LIMIT 1
1280
            LIMIT 1
1280
        };
1281
        };
1281
        $sth = $dbh->prepare($query);
1282
        $sth = $dbh->prepare($query);
Lines 1475-1492 sub NewSubscription { Link Here
1475
    $sth->execute( $biblionumber, $subscriptionid, $startdate, $notes, $internalnotes );
1476
    $sth->execute( $biblionumber, $subscriptionid, $startdate, $notes, $internalnotes );
1476
1477
1477
    # reread subscription to get a hash (for calculation of the 1st issue number)
1478
    # reread subscription to get a hash (for calculation of the 1st issue number)
1478
    $query = qq(
1479
    my $subscription = GetSubscription($subscriptionid);
1479
        SELECT *
1480
    my $pattern = C4::Serials::Numberpattern::GetSubscriptionNumberpattern($subscription->{numberpattern});
1480
        FROM   subscription
1481
        LEFT JOIN subscription_numberpatterns ON subscription.numberpattern = subscription_numberpatterns.id
1482
        WHERE  subscriptionid = ?
1483
    );
1484
    $sth = $dbh->prepare($query);
1485
    $sth->execute($subscriptionid);
1486
    my $val = $sth->fetchrow_hashref;
1487
1481
1488
    # calculate issue number
1482
    # calculate issue number
1489
    my $serialseq = GetSeq($val);
1483
    my $serialseq = GetSeq($subscription, $pattern);
1490
    $query = qq|
1484
    $query = qq|
1491
        INSERT INTO serial
1485
        INSERT INTO serial
1492
            (serialseq,subscriptionid,biblionumber,status, planneddate, publisheddate)
1486
            (serialseq,subscriptionid,biblionumber,status, planneddate, publisheddate)
(-)a/serials/serials-collection.pl (-30 / +32 lines)
Lines 61-98 if($op eq 'gennext' && @subscriptionid){ Link Here
61
    my $status = defined( $nbissues ) ? 2 : 3;
61
    my $status = defined( $nbissues ) ? 2 : 3;
62
    $nbissues ||= 1;
62
    $nbissues ||= 1;
63
    for ( my $i = 0; $i < $nbissues; $i++ ){
63
    for ( my $i = 0; $i < $nbissues; $i++ ){
64
	$sth->execute($subscriptionid);
64
        $sth->execute($subscriptionid);
65
	# modify actual expected issue, to generate the next
65
        # modify actual expected issue, to generate the next
66
	if ( my $issue = $sth->fetchrow_hashref ) {
66
        if ( my $issue = $sth->fetchrow_hashref ) {
67
		ModSerialStatus( $issue->{serialid}, $issue->{serialseq},
67
            ModSerialStatus( $issue->{serialid}, $issue->{serialseq},
68
                $issue->{planneddate}, $issue->{publisheddate},
68
                    $issue->{planneddate}, $issue->{publisheddate},
69
                $status, "" );
69
                    $status, "" );
70
	}else{
70
        } else {
71
            require C4::Serials::Numberpattern;
71
            my $subscription = GetSubscription($subscriptionid);
72
            my $subscription = GetSubscription($subscriptionid);
73
            my $pattern = C4::Serials::Numberpattern::GetSubscriptionNumberpattern($subscription->{numberpattern});
72
            my $expected = GetNextExpected($subscriptionid);
74
            my $expected = GetNextExpected($subscriptionid);
73
	    my (
75
            my (
74
	         $newserialseq,  $newlastvalue1, $newlastvalue2, $newlastvalue3,
76
                 $newserialseq,  $newlastvalue1, $newlastvalue2, $newlastvalue3,
75
             $newinnerloop1, $newinnerloop2, $newinnerloop3
77
                 $newinnerloop1, $newinnerloop2, $newinnerloop3
76
            ) = GetNextSeq($subscription);
78
            ) = GetNextSeq($subscription, $pattern, $expected->{publisheddate});
77
79
78
	     ## We generate the next publication date
80
             ## We generate the next publication date
79
	     my $nextpublisheddate = GetNextDate( $expected->{planneddate}->output('iso'), $subscription );
81
             my $nextpublisheddate = GetNextDate($subscription, $expected->{publisheddate}, 1);
80
	     ## Creating the new issue
82
             ## Creating the new issue
81
	     NewIssue( $newserialseq, $subscriptionid, $subscription->{'biblionumber'},
83
             NewIssue( $newserialseq, $subscriptionid, $subscription->{'biblionumber'},
82
	             1, $nextpublisheddate, $nextpublisheddate );
84
                     1, $nextpublisheddate, $nextpublisheddate );
83
85
84
	     ## Updating the subscription seq status
86
             ## Updating the subscription seq status
85
	     my $squery = "UPDATE subscription SET lastvalue1=?, lastvalue2=?, lastvalue3=?, innerloop1=?, innerloop2=?, innerloop3=?
87
             my $squery = "UPDATE subscription SET lastvalue1=?, lastvalue2=?, lastvalue3=?, innerloop1=?, innerloop2=?, innerloop3=?
86
	                 WHERE  subscriptionid = ?";
88
                         WHERE  subscriptionid = ?";
87
	     my $seqsth = $dbh->prepare($squery);
89
             my $seqsth = $dbh->prepare($squery);
88
	     $seqsth->execute(
90
             $seqsth->execute(
89
	         $newlastvalue1, $newlastvalue2, $newlastvalue3, $newinnerloop1,
91
                 $newlastvalue1, $newlastvalue2, $newlastvalue3, $newinnerloop1,
90
	         $newinnerloop2, $newinnerloop3, $subscriptionid
92
                 $newinnerloop2, $newinnerloop3, $subscriptionid
91
	         );
93
                 );
92
94
93
	}
95
        }
94
	last if $nbissues == 1;
96
        last if $nbissues == 1;
95
	last if HasSubscriptionExpired($subscriptionid) > 0;
97
        last if HasSubscriptionExpired($subscriptionid) > 0;
96
    }
98
    }
97
    print $query->redirect('/cgi-bin/koha/serials/serials-collection.pl?subscriptionid='.$subscriptionid);
99
    print $query->redirect('/cgi-bin/koha/serials/serials-collection.pl?subscriptionid='.$subscriptionid);
98
}
100
}
(-)a/serials/showpredictionpattern.pl (-11 / +10 lines)
Lines 55-69 my $sublength = $input->param('sublength'); Link Here
55
my $custompattern = $input->param('custompattern');
55
my $custompattern = $input->param('custompattern');
56
56
57
57
58
my %val = (
58
my %pattern = (
59
    locale          => $input->param('locale') // '',
60
    numberingmethod => $input->param('numberingmethod') // '',
59
    numberingmethod => $input->param('numberingmethod') // '',
61
    numbering1      => $input->param('numbering1') // '',
60
    numbering1      => $input->param('numbering1') // '',
62
    numbering2      => $input->param('numbering2') // '',
61
    numbering2      => $input->param('numbering2') // '',
63
    numbering3      => $input->param('numbering3') // '',
62
    numbering3      => $input->param('numbering3') // '',
64
    lastvalue1      => $input->param('lastvalue1') // '',
65
    lastvalue2      => $input->param('lastvalue2') // '',
66
    lastvalue3      => $input->param('lastvalue3') // '',
67
    add1            => $input->param('add1') // '',
63
    add1            => $input->param('add1') // '',
68
    add2            => $input->param('add2') // '',
64
    add2            => $input->param('add2') // '',
69
    add3            => $input->param('add3') // '',
65
    add3            => $input->param('add3') // '',
Lines 76-84 my %val = ( Link Here
76
    every1          => $input->param('every1') // '',
72
    every1          => $input->param('every1') // '',
77
    every2          => $input->param('every2') // '',
73
    every2          => $input->param('every2') // '',
78
    every3          => $input->param('every3') // '',
74
    every3          => $input->param('every3') // '',
79
    innerloop1      => $input->param('innerloop1') // '',
80
    innerloop2      => $input->param('innerloop2') // '',
81
    innerloop3      => $input->param('innerloop3') // '',
82
);
75
);
83
76
84
if(!defined $firstacquidate || $firstacquidate eq ''){
77
if(!defined $firstacquidate || $firstacquidate eq ''){
Lines 100-105 if($nextacquidate) { Link Here
100
my $date = $nextacquidate;
93
my $date = $nextacquidate;
101
94
102
my %subscription = (
95
my %subscription = (
96
    locale      => $input->param('locale') // '',
97
    lastvalue1      => $input->param('lastvalue1') // '',
98
    lastvalue2      => $input->param('lastvalue2') // '',
99
    lastvalue3      => $input->param('lastvalue3') // '',
100
    innerloop1      => $input->param('innerloop1') // '',
101
    innerloop2      => $input->param('innerloop2') // '',
102
    innerloop3      => $input->param('innerloop3') // '',
103
    irregularity    => '',
103
    irregularity    => '',
104
    periodicity     => $frequencyid,
104
    periodicity     => $frequencyid,
105
    countissuesperunit  => 1,
105
    countissuesperunit  => 1,
Lines 114-120 if(defined $subscriptionid) { Link Here
114
}
114
}
115
115
116
my @predictions_loop;
116
my @predictions_loop;
117
my ($calculated) = GetSeq(\%val);
117
my ($calculated) = GetSeq(\%subscription, \%pattern);
118
push @predictions_loop, {
118
push @predictions_loop, {
119
    number => $calculated,
119
    number => $calculated,
120
    publicationdate => $date,
120
    publicationdate => $date,
Lines 159-165 while( $i < 1000 ) { Link Here
159
        last;
159
        last;
160
    }
160
    }
161
161
162
    ($calculated, $val{'lastvalue1'}, $val{'lastvalue2'}, $val{'lastvalue3'}, $val{'innerloop1'}, $val{'innerloop2'}, $val{'innerloop3'}) = GetNextSeq(\%val);
162
    ($calculated, $subscription{'lastvalue1'}, $subscription{'lastvalue2'}, $subscription{'lastvalue3'}, $subscription{'innerloop1'}, $subscription{'innerloop2'}, $subscription{'innerloop3'}) = GetNextSeq(\%subscription, \%pattern);
163
    $issuenumber++;
163
    $issuenumber++;
164
    $line{'number'} = $calculated;
164
    $line{'number'} = $calculated;
165
    $line{'issuenumber'} = $issuenumber;
165
    $line{'issuenumber'} = $issuenumber;
166
- 

Return to bug 7688