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

(-)a/circ/circulation.pl (+12 lines)
Lines 313-318 if ($borrowernumber) { Link Here
313
        }
313
        }
314
    }
314
    }
315
315
316
    # Calculate and display patron's age
317
    my $dateofbirth = $borrower->{ 'dateofbirth' };
318
    my $age = GetAge($dateofbirth);
319
320
    my $borrowercategory = Koha::Patron::Categories->find($borrower->{ 'categorycode' });
321
    my ($low,$high) = ($borrowercategory->dateofbirthrequired, $borrowercategory->upperagelimit);
322
    if (($high && ($age > $high)) or ($age < $low)) {
323
        $template->param( age_limitations => 1 );
324
        $template->param( age_low => $low );
325
        $template->param( age_high => $high );
326
    }
327
316
}
328
}
317
329
318
#
330
#
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/category-out-of-age-limit.inc (+4 lines)
Line 0 Link Here
1
    <li>
2
    <span class="circ-hlt">Patron's age is incorrect for their category.</span>
3
    Ages allowed are [% age_low %]-[% age_high %].
4
    <a href="/cgi-bin/koha/members/memberentry.pl?op=modify&amp;borrowernumber=[% borrowernumber %]&amp;step=3" class="btn btn-mini">Change category</a></li>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-1 / +5 lines)
Lines 790-801 No patron matched <span class="ex">[% message | html %]</span> Link Here
790
                [% IF ( odues ) %]<li>[% IF ( nonreturns ) %]<span class="circ-hlt">Overdues: Patron has ITEMS OVERDUE.</span> <a href="#checkouts">See highlighted items below</a>[% END %]</li>
790
                [% IF ( odues ) %]<li>[% IF ( nonreturns ) %]<span class="circ-hlt">Overdues: Patron has ITEMS OVERDUE.</span> <a href="#checkouts">See highlighted items below</a>[% END %]</li>
791
            [% END %]
791
            [% END %]
792
792
793
            [% IF ( charges ) %]
793
            [% IF charges %]
794
                [% INCLUDE 'blocked-fines.inc'
794
                [% INCLUDE 'blocked-fines.inc'
795
                    fines = chargesamount
795
                    fines = chargesamount
796
                %]
796
                %]
797
            [% END %]
797
            [% END %]
798
798
799
            [% IF age_limitations %]
800
                [% INCLUDE 'category-out-of-age-limit.inc' %]
801
            [% END %]
802
799
            [% IF ( charges_guarantees ) %]
803
            [% IF ( charges_guarantees ) %]
800
                <li>
804
                <li>
801
                    <span class="circ-hlt">Fees &amp; Charges:</span> Patron's guarantees collectively owe [% chargesamount_guarantees %].
805
                    <span class="circ-hlt">Fees &amp; Charges:</span> Patron's guarantees collectively owe [% chargesamount_guarantees %].
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt (-2 / +9 lines)
Lines 179-186 function validate1(date) { Link Here
179
[% ELSE %]
179
[% ELSE %]
180
    [% IF ( was_renewed ) %]<div class="dialog message">Patron's account has been renewed until [% dateexpiry | $KohaDates %]</div>[% END %]
180
    [% IF ( was_renewed ) %]<div class="dialog message">Patron's account has been renewed until [% dateexpiry | $KohaDates %]</div>[% END %]
181
181
182
    [% IF fines %]
182
    [% IF fines || age_limitations %]
183
        [% INCLUDE 'blocked-fines.inc' %]
183
    <ul class="circmessage">
184
        [% IF fines %]
185
            [% INCLUDE 'blocked-fines.inc' %]
186
        [% END %]
187
        [% IF age_limitations %]
188
            [% INCLUDE 'category-out-of-age-limit.inc' %]
189
        [% END %]
190
    </ul>
184
    [% END %]
191
    [% END %]
185
192
186
    [% IF ( flagged ) %]
193
    [% IF ( flagged ) %]
(-)a/members/moremember.pl (-1 / +10 lines)
Lines 240-245 my $dateofbirth = $data->{ 'dateofbirth' }; Link Here
240
my $age = GetAge($dateofbirth);
240
my $age = GetAge($dateofbirth);
241
$template->param( age => $age );
241
$template->param( age => $age );
242
242
243
# Check patron's category against age
244
my $borrowercategory = Koha::Patron::Categories->find($data->{ 'categorycode' });
245
my ($low,$high) = ($borrowercategory->dateofbirthrequired, $borrowercategory->upperagelimit);
246
if (($high && ($age > $high)) or ($age < $low)) {
247
    $template->param( age_limitations => 1 );
248
    $template->param( age_low => $low );
249
    $template->param( age_high => $high );
250
}
251
252
243
### ###############################################################################
253
### ###############################################################################
244
# BUILD HTML
254
# BUILD HTML
245
# show all reserves of this borrower, and the position of the reservation ....
255
# show all reserves of this borrower, and the position of the reservation ....
246
- 

Return to bug 17492