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

(-)a/circ/circulation.pl (-4 / +3 lines)
Lines 304-314 if ($patron) { Link Here
304
    }
304
    }
305
305
306
    # Calculate and display patron's age
306
    # Calculate and display patron's age
307
    my $dateofbirth = $borrower->{ 'dateofbirth' };
307
    my $age = $patron->get_age;
308
    my $age = GetAge($dateofbirth);
309
308
310
    my $borrowercategory = Koha::Patron::Categories->find($borrower->{ 'categorycode' });
309
    my $patroncategory = $patron->category;
311
    my ($low,$high) = ($borrowercategory->dateofbirthrequired, $borrowercategory->upperagelimit);
310
    my ($low,$high) = ($patroncategory->dateofbirthrequired, $patroncategory->upperagelimit);
312
    if (($high && ($age > $high)) or ($age < $low)) {
311
    if (($high && ($age > $high)) or ($age < $low)) {
313
        $template->param( age_limitations => 1 );
312
        $template->param( age_limitations => 1 );
314
        $template->param( age_low => $low );
313
        $template->param( age_low => $low );
(-)a/members/moremember.pl (-4 / +5 lines)
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
- 

Return to bug 17492