Lines 129-143
my $category_type = $data->{'category_type'};
Link Here
|
129 |
|
129 |
|
130 |
$debug and printf STDERR "dates (enrolled,expiry,birthdate) raw: (%s, %s, %s)\n", map {$data->{$_}} qw(dateenrolled dateexpiry dateofbirth); |
130 |
$debug and printf STDERR "dates (enrolled,expiry,birthdate) raw: (%s, %s, %s)\n", map {$data->{$_}} qw(dateenrolled dateexpiry dateofbirth); |
131 |
foreach (qw(dateenrolled dateexpiry dateofbirth)) { |
131 |
foreach (qw(dateenrolled dateexpiry dateofbirth)) { |
132 |
my $userdate = $data->{$_}; |
132 |
my $userdate = $data->{$_}; |
133 |
unless ($userdate) { |
133 |
unless ($userdate) { |
134 |
$debug and warn sprintf "Empty \$data{%12s}", $_; |
134 |
$debug and warn sprintf "Empty \$data{%12s}", $_; |
135 |
$data->{$_} = ''; |
135 |
$data->{$_} = ''; |
136 |
next; |
136 |
next; |
137 |
} |
137 |
} |
138 |
$userdate = output_pref({ dt => dt_from_string( $userdate ), dateonly => 1 }); |
138 |
$userdate = output_pref({ dt => dt_from_string( $userdate ), dateonly => 1 }); |
139 |
$data->{$_} = $userdate || ''; |
139 |
$data->{$_} = $userdate || ''; |
140 |
$template->param( $_ => $userdate ); |
140 |
$template->param( $_ => $userdate ); |
141 |
} |
141 |
} |
142 |
$data->{'IS_ADULT'} = ( $data->{'categorycode'} ne 'I' ); |
142 |
$data->{'IS_ADULT'} = ( $data->{'categorycode'} ne 'I' ); |
143 |
|
143 |
|
Lines 343-349
$template->param(
Link Here
|
343 |
categoryname => $data->{'description'}, |
343 |
categoryname => $data->{'description'}, |
344 |
was_renewed => $input->param('was_renewed') ? 1 : 0, |
344 |
was_renewed => $input->param('was_renewed') ? 1 : 0, |
345 |
branch => $branch, |
345 |
branch => $branch, |
346 |
todaysdate => output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }), |
346 |
todaysdate => output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }), |
347 |
totalprice => sprintf("%.2f", $totalprice), |
347 |
totalprice => sprintf("%.2f", $totalprice), |
348 |
totaldue => sprintf("%.2f", $total), |
348 |
totaldue => sprintf("%.2f", $total), |
349 |
totaldue_raw => $total, |
349 |
totaldue_raw => $total, |
350 |
- |
|
|