Lines 246-258
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 ( $data->{dateofbirth} ) { |
250 |
if ( $data->{dateofbirth} ) { |
250 |
$template->param( age => Koha::Patron->new({ dateofbirth => $data->{dateofbirth} })->get_age ); |
251 |
$age = Koha::Patron->new({ dateofbirth => $data->{dateofbirth} })->get_age; |
|
|
252 |
$template->param( age => $age ); |
251 |
} |
253 |
} |
252 |
|
254 |
|
253 |
# Check patron's category against age |
255 |
# Check patron's category against age |
254 |
my $borrowercategory = Koha::Patron::Categories->find($data->{ 'categorycode' }); |
256 |
my $patroncategory = Koha::Patron::Categories->find($data->{ 'categorycode' }); |
255 |
my ($low,$high) = ($borrowercategory->dateofbirthrequired, $borrowercategory->upperagelimit); |
257 |
my ($low,$high) = ($patroncategory->dateofbirthrequired, $patroncategory->upperagelimit); |
256 |
if (($high && ($age > $high)) or ($age < $low)) { |
258 |
if (($high && ($age > $high)) or ($age < $low)) { |
257 |
$template->param( age_limitations => 1 ); |
259 |
$template->param( age_limitations => 1 ); |
258 |
$template->param( age_low => $low ); |
260 |
$template->param( age_low => $low ); |
259 |
- |
|
|