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

(-)a/serials/subscription-add.pl (-4 / +3 lines)
Lines 63-69 my @subscription_types = ( Link Here
63
my @sub_type_data;
63
my @sub_type_data;
64
64
65
my $subs;
65
my $subs;
66
my $firstissuedate;
66
our $firstissuedate;
67
67
68
if ($op eq 'modify' || $op eq 'dup' || $op eq 'modsubscription') {
68
if ($op eq 'modify' || $op eq 'dup' || $op eq 'modsubscription') {
69
69
Lines 74-80 if ($op eq 'modify' || $op eq 'dup' || $op eq 'modsubscription') { Link Here
74
      carp "Attempt to modify subscription $subscriptionid by ".C4::Context->userenv->{'id'}." not allowed";
74
      carp "Attempt to modify subscription $subscriptionid by ".C4::Context->userenv->{'id'}." not allowed";
75
      print $query->redirect("/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=$subscriptionid");
75
      print $query->redirect("/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=$subscriptionid");
76
    }
76
    }
77
    $firstissuedate = $subs->{firstacquidate};  # in iso format.
77
    $firstissuedate = $subs->{firstacquidate} || '';  # in iso format.
78
    for (qw(startdate firstacquidate histstartdate enddate histenddate)) {
78
    for (qw(startdate firstacquidate histstartdate enddate histenddate)) {
79
        next unless defined $subs->{$_};
79
        next unless defined $subs->{$_};
80
	# TODO : Handle date formats properly.
80
	# TODO : Handle date formats properly.
Lines 92-98 if ($op eq 'modify' || $op eq 'dup' || $op eq 'modsubscription') { Link Here
92
    $nextexpected->{'isfirstissue'} = $nextexpected->{planneddate}->output('iso') eq $firstissuedate ;
92
    $nextexpected->{'isfirstissue'} = $nextexpected->{planneddate}->output('iso') eq $firstissuedate ;
93
    $subs->{nextacquidate} = $nextexpected->{planneddate}->output()  if($op eq 'modify');
93
    $subs->{nextacquidate} = $nextexpected->{planneddate}->output()  if($op eq 'modify');
94
    unless($op eq 'modsubscription') {
94
    unless($op eq 'modsubscription') {
95
		foreach my $length_unit qw(numberlength weeklength monthlength){
95
        foreach my $length_unit (qw(numberlength weeklength monthlength)) {
96
			if ($subs->{$length_unit}){
96
			if ($subs->{$length_unit}){
97
				$sub_length=$subs->{$length_unit};
97
				$sub_length=$subs->{$length_unit};
98
				$sub_on=$length_unit;
98
				$sub_on=$length_unit;
99
- 

Return to bug 9574