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

(-)a/circ/circulation.pl (+13 lines)
Lines 310-315 if ($borrowernumber) { Link Here
310
        }
310
        }
311
    }
311
    }
312
312
313
    # Calculate and display patron's age
314
    my $dateofbirth = $borrower->{ 'dateofbirth' };
315
    my $age = GetAge($dateofbirth);
316
317
    my $borrowercategory = Koha::Patron::Categories->find($borrower->{ 'categorycode' });
318
    my ($low,$high) = ($borrowercategory->dateofbirthrequired, $borrowercategory->upperagelimit);
319
    if (($high && ($age > $high)) or ($age < $low)) {
320
        $template->param( flagged => 1 );
321
        $template->param( age_limitations => 1 );
322
        $template->param( age_low => $low );
323
        $template->param( age_high => $high );
324
    }
325
313
}
326
}
314
327
315
#
328
#
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/category-out-of-age-limit.inc (+6 lines)
Line 0 Link Here
1
[% IF age_limitations %]
2
    <li>
3
	<span class="circ-hlt">Patron's age is incorrect for their category.</span>
4
	Ages allowed are [% age_low %]-[% age_high %].
5
	<a href="memberentry.pl?op=modify&amp;borrowernumber=[% borrowernumber %]&amp;step=3" class="btn btn-mini">Change category</a></li>
6
[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-4 / +9 lines)
Lines 790-799 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 || age_limitations ) %]
794
                [% INCLUDE 'blocked-fines.inc'
794
		[% IF charges %]
795
                    fines = chargesamount
795
		    [% INCLUDE 'blocked-fines.inc'
796
                %]
796
                        fines = chargesamount
797
                    %]
798
		[% END %]
799
		[% IF age_limitations %]
800
		    [% INCLUDE 'category-out-of-age-limit.inc' %]
801
		[% END %]
797
            [% END %]
802
            [% END %]
798
803
799
            [% IF ( charges_guarantees ) %]
804
            [% IF ( charges_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 / +11 lines)
Lines 239-244 my $dateofbirth = $data->{ 'dateofbirth' }; Link Here
239
my $age = GetAge($dateofbirth);
239
my $age = GetAge($dateofbirth);
240
$template->param( age => $age );
240
$template->param( age => $age );
241
241
242
# Check patron's category against age
243
my $borrowercategory = Koha::Patron::Categories->find($data->{ 'categorycode' });
244
my ($low,$high) = ($borrowercategory->dateofbirthrequired, $borrowercategory->upperagelimit);
245
if (($high && ($age > $high)) or ($age < $low)) {
246
    $template->param( flagged => 1 );
247
    $template->param( age_limitations => 1 );
248
    $template->param( age_low => $low );
249
    $template->param( age_high => $high );
250
}
251
252
242
### ###############################################################################
253
### ###############################################################################
243
# BUILD HTML
254
# BUILD HTML
244
# 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 ....
245
- 

Return to bug 17492