|
Lines 62-67
my $mode = $query->param('mode') || q{};
Link Here
|
| 62 |
my $op = $query->param('op') || 'display'; |
62 |
my $op = $query->param('op') || 'display'; |
| 63 |
my @subscriptionids = $query->multi_param('subscriptionid'); |
63 |
my @subscriptionids = $query->multi_param('subscriptionid'); |
| 64 |
my $branchcode = $query->param('branchcode'); |
64 |
my $branchcode = $query->param('branchcode'); |
|
|
65 |
my $sublength = $query->param('sublength'); |
| 66 |
my $subtype = $query->param('subtype'); |
| 67 |
my ($numberlength, $weeklength, $monthlength); |
| 68 |
|
| 65 |
my $done = 0; # for after form has been submitted |
69 |
my $done = 0; # for after form has been submitted |
| 66 |
my ( $template, $loggedinuser, $cookie ) = get_template_and_user( |
70 |
my ( $template, $loggedinuser, $cookie ) = get_template_and_user( |
| 67 |
{ |
71 |
{ |
|
Lines 80-93
if ( $op eq "renew" ) {
Link Here
|
| 80 |
my $subscription = GetSubscription( $subscriptionid ); |
84 |
my $subscription = GetSubscription( $subscriptionid ); |
| 81 |
output_and_exit( $query, $cookie, $template, 'unknown_subscription') unless $subscription; |
85 |
output_and_exit( $query, $cookie, $template, 'unknown_subscription') unless $subscription; |
| 82 |
my $startdate = output_pref( { str => scalar $query->param('startdate'), dateonly => 1, dateformat => 'iso' } ); |
86 |
my $startdate = output_pref( { str => scalar $query->param('startdate'), dateonly => 1, dateformat => 'iso' } ); |
|
|
87 |
($numberlength, $weeklength, $monthlength) = GetSubscriptionLength( $subtype, $sublength ); |
| 83 |
ReNewSubscription( |
88 |
ReNewSubscription( |
| 84 |
{ |
89 |
{ |
| 85 |
subscriptionid => $subscriptionid, |
90 |
subscriptionid => $subscriptionid, |
| 86 |
user => $loggedinuser, |
91 |
user => $loggedinuser, |
| 87 |
startdate => $startdate, |
92 |
startdate => $startdate, |
| 88 |
numberlength => scalar $query->param('numberlength'), |
93 |
numberlength => $numberlength, |
| 89 |
weeklength => scalar $query->param('weeklength'), |
94 |
weeklength => $weeklength, |
| 90 |
monthlength => scalar $query->param('monthlength'), |
95 |
monthlength => $monthlength, |
| 91 |
note => scalar $query->param('note'), |
96 |
note => scalar $query->param('note'), |
| 92 |
branchcode => $branchcode |
97 |
branchcode => $branchcode |
| 93 |
} |
98 |
} |
|
Lines 130-135
my $libraries = Koha::Libraries->search( {}, { order_by => ['branchcode'] }, );
Link Here
|
| 130 |
$template->param( |
135 |
$template->param( |
| 131 |
op => $op, |
136 |
op => $op, |
| 132 |
libraries => $libraries, |
137 |
libraries => $libraries, |
|
|
138 |
subtypes => [ qw( numberlength weeklength monthlength ) ], |
| 133 |
); |
139 |
); |
| 134 |
|
140 |
|
| 135 |
output_html_with_http_headers $query, $cookie, $template->output; |
141 |
output_html_with_http_headers $query, $cookie, $template->output; |