Lines 246-265
my $overdues_exist = 0;
Link Here
|
246 |
my $totalprice = 0; |
246 |
my $totalprice = 0; |
247 |
|
247 |
|
248 |
# Calculate and display patron's age |
248 |
# Calculate and display patron's age |
249 |
my $age; |
249 |
if ( !$patron->is_category_valid ) { |
250 |
if ( $data->{dateofbirth} ) { |
|
|
251 |
$age = Koha::Patron->new({ dateofbirth => $data->{dateofbirth} })->get_age; |
252 |
$template->param( age => $age ); |
253 |
} |
254 |
|
255 |
# Check patron's category against age |
256 |
my $patroncategory = Koha::Patron::Categories->find($data->{ 'categorycode' }); |
257 |
my ($low,$high) = ($patroncategory->dateofbirthrequired, $patroncategory->upperagelimit); |
258 |
if (($high && ($age > $high)) or ($age < $low)) { |
259 |
$template->param( age_limitations => 1 ); |
250 |
$template->param( age_limitations => 1 ); |
260 |
$template->param( age_low => $low ); |
251 |
$template->param( age_low => $patron->category->dateofbirthrequired ); |
261 |
$template->param( age_high => $high ); |
252 |
$template->param( age_high => $patron->category->upperagelimit ); |
262 |
} |
253 |
} |
|
|
254 |
$template->param( age => $patron->get_age ); |
263 |
|
255 |
|
264 |
|
256 |
|
265 |
### ############################################################################### |
257 |
### ############################################################################### |
266 |
- |
|
|