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

(-)a/serials/subscription-add.pl (-4 / +3 lines)
Lines 34-40 use Carp; Link Here
34
34
35
#use Smart::Comments;
35
#use Smart::Comments;
36
36
37
my $query = CGI->new;
37
our $query = CGI->new;
38
my $op = $query->param('op') || '';
38
my $op = $query->param('op') || '';
39
my $dbh = C4::Context->dbh;
39
my $dbh = C4::Context->dbh;
40
my $sub_length;
40
my $sub_length;
Lines 64-70 my @sub_type_data; Link Here
64
64
65
my $subs;
65
my $subs;
66
my $firstissuedate;
66
my $firstissuedate;
67
my $nextexpected;
68
67
69
if ($op eq 'modify' || $op eq 'dup' || $op eq 'modsubscription') {
68
if ($op eq 'modify' || $op eq 'dup' || $op eq 'modsubscription') {
70
69
Lines 89-95 if ($op eq 'modify' || $op eq 'dup' || $op eq 'modsubscription') { Link Here
89
          $subs->{letter}= q{};
88
          $subs->{letter}= q{};
90
      }
89
      }
91
    letter_loop($subs->{'letter'}, $template);
90
    letter_loop($subs->{'letter'}, $template);
92
    $nextexpected = GetNextExpected($subscriptionid);
91
    my $nextexpected = GetNextExpected($subscriptionid);
93
    $nextexpected->{'isfirstissue'} = $nextexpected->{planneddate}->output('iso') eq $firstissuedate ;
92
    $nextexpected->{'isfirstissue'} = $nextexpected->{planneddate}->output('iso') eq $firstissuedate ;
94
    $subs->{nextacquidate} = $nextexpected->{planneddate}->output()  if($op eq 'modify');
93
    $subs->{nextacquidate} = $nextexpected->{planneddate}->output()  if($op eq 'modify');
95
    unless($op eq 'modsubscription') {
94
    unless($op eq 'modsubscription') {
Lines 326-331 sub redirect_mod_subscription { Link Here
326
	my $opacdisplaycount = $query->param('opacdisplaycount');
325
	my $opacdisplaycount = $query->param('opacdisplaycount');
327
    my $graceperiod     = $query->param('graceperiod') || 0;
326
    my $graceperiod     = $query->param('graceperiod') || 0;
328
    my $location = $query->param('location');
327
    my $location = $query->param('location');
328
    my $nextexpected = GetNextExpected($subscriptionid);
329
	#  If it's  a mod, we need to check the current 'expected' issue, and mod it in the serials table if necessary.
329
	#  If it's  a mod, we need to check the current 'expected' issue, and mod it in the serials table if necessary.
330
    if ( $nextacquidate ne $nextexpected->{planneddate}->output('iso') ) {
330
    if ( $nextacquidate ne $nextexpected->{planneddate}->output('iso') ) {
331
        ModNextExpected($subscriptionid,C4::Dates->new($nextacquidate,'iso'));
331
        ModNextExpected($subscriptionid,C4::Dates->new($nextacquidate,'iso'));
332
- 

Return to bug 7773