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

(-)a/circ/circulation.pl (+12 lines)
Lines 303-308 if ($patron) { Link Here
303
        }
303
        }
304
    }
304
    }
305
305
306
    # Calculate and display patron's age
307
    my $dateofbirth = $borrower->{ 'dateofbirth' };
308
    my $age = GetAge($dateofbirth);
309
310
    my $borrowercategory = Koha::Patron::Categories->find($borrower->{ 'categorycode' });
311
    my ($low,$high) = ($borrowercategory->dateofbirthrequired, $borrowercategory->upperagelimit);
312
    if (($high && ($age > $high)) or ($age < $low)) {
313
        $template->param( age_limitations => 1 );
314
        $template->param( age_low => $low );
315
        $template->param( age_high => $high );
316
    }
317
306
}
318
}
307
319
308
#
320
#
(-)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 836-845 No patron matched <span class="ex">[% message | html %]</span> Link Here
836
                [% 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>
836
                [% 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>
837
            [% END %]
837
            [% END %]
838
838
839
            [% IF ( charges ) %]
839
            [% IF charges %]
840
                [% INCLUDE 'blocked-fines.inc' fines = chargesamount %]
840
                [% INCLUDE 'blocked-fines.inc' fines = chargesamount %]
841
            [% END %]
841
            [% END %]
842
842
843
            [% IF age_limitations %]
844
                [% INCLUDE 'category-out-of-age-limit.inc' %]
845
            [% END %]
846
843
            [% IF ( charges_guarantees ) %]
847
            [% IF ( charges_guarantees ) %]
844
                <li>
848
                <li>
845
                    <span class="circ-hlt">Fees &amp; Charges:</span> Patron's guarantees collectively owe [% chargesamount_guarantees %].
849
                    <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 (-4 / +8 lines)
Lines 183-194 function validate1(date) { Link Here
183
[% ELSE %]
183
[% ELSE %]
184
    [% IF ( was_renewed ) %]<div class="dialog message">Patron's account has been renewed until [% dateexpiry | $KohaDates %]</div>[% END %]
184
    [% IF ( was_renewed ) %]<div class="dialog message">Patron's account has been renewed until [% dateexpiry | $KohaDates %]</div>[% END %]
185
185
186
    [% IF fines %]
186
    [% IF fines || age_limitations %]
187
    <div id="circmessages" class="circmessage attention">
187
    <div id="circmessages" class="circmessage attention">
188
      <ul>
188
      <ul>
189
        [% INCLUDE 'blocked-fines.inc' %]
189
        [% IF fines %]
190
      </ul>
190
            [% INCLUDE 'blocked-fines.inc' %]
191
    </div>
191
        [% END %]
192
        [% IF age_limitations %]
193
            [% INCLUDE 'category-out-of-age-limit.inc' %]
194
        [% END %]
195
    </ul>
192
    [% END %]
196
    [% END %]
193
197
194
    [% IF ( flagged ) %]
198
    [% IF ( flagged ) %]
(-)a/members/moremember.pl (-1 / +10 lines)
Lines 250-255 if ( $data->{dateofbirth} ) { Link Here
250
    $template->param( age => Koha::Patron->new({ dateofbirth => $data->{dateofbirth} })->get_age );
250
    $template->param( age => Koha::Patron->new({ dateofbirth => $data->{dateofbirth} })->get_age );
251
}
251
}
252
252
253
# Check patron's category against age
254
my $borrowercategory = Koha::Patron::Categories->find($data->{ 'categorycode' });
255
my ($low,$high) = ($borrowercategory->dateofbirthrequired, $borrowercategory->upperagelimit);
256
if (($high && ($age > $high)) or ($age < $low)) {
257
    $template->param( age_limitations => 1 );
258
    $template->param( age_low => $low );
259
    $template->param( age_high => $high );
260
}
261
262
253
### ###############################################################################
263
### ###############################################################################
254
# BUILD HTML
264
# BUILD HTML
255
# show all reserves of this borrower, and the position of the reservation ....
265
# show all reserves of this borrower, and the position of the reservation ....
256
- 

Return to bug 17492