http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13106

Marc Véron <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #3 from Marc Véron <[email protected]> ---
Hi Olli,

Great idea to encapsulate the age restriction.

I did not yet test, but I have the following remark:

In Circulation.pm, line 988 reads:
if ( $daysToAgeRestriction ) 
(...)

Negative days mean the borrower has gone past the age restriction age. But a
negative value would evaluate to true and trigger the age restriction.
(see: http://www.foo.be/docs/tpj/issues/vol4_2/tpj0402-0002.html , rule 7)


I think the line should be something like 
if ( $daysToAgeRestriction > 0 ) 
or
if ( $daysToAgeRestriction >= 0 ) 

Oh, it seems that $daysToAgeRestriction is not always returned as a defined
value in sub GetAgeRestriction. (See Line 3807). Then maybe the comparision
should be something like:

if ( $daysToAgeRestriction && $daysToAgeRestriction > 0 ) 
or
if ( $daysToAgeRestriction && $daysToAgeRestriction >= 0 ) 

Marc

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to