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

(-)a/circ/circulation.pl (+13 lines)
Lines 312-317 if ($borrowernumber) { Link Here
312
        }
312
        }
313
    }
313
    }
314
314
315
    # Calculate and display patron's age
316
    my $dateofbirth = $borrower->{ 'dateofbirth' };
317
    my $age = GetAge($dateofbirth);
318
319
    my $borrowercategory = Koha::Patron::Categories->find($borrower->{ 'categorycode' });
320
    my ($low,$high) = ($borrowercategory->dateofbirthrequired, $borrowercategory->upperagelimit);
321
    if (($high && ($age > $high)) or ($age < $low)) {
322
        $template->param( flagged => 1 );
323
        $template->param( age_limitations => 1 );
324
        $template->param( age_low => $low );
325
        $template->param( age_high => $high );
326
    }
327
315
}
328
}
316
329
317
#
330
#
(-)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 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( flagged => 1 );
248
    $template->param( age_limitations => 1 );
249
    $template->param( age_low => $low );
250
    $template->param( age_high => $high );
251
}
252
253
243
### ###############################################################################
254
### ###############################################################################
244
# BUILD HTML
255
# BUILD HTML
245
# show all reserves of this borrower, and the position of the reservation ....
256
# show all reserves of this borrower, and the position of the reservation ....
246
- 

Return to bug 17492