[open-ils-commits] r14901 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Nov 13 11:37:28 EST 2009
Author: miker
Date: 2009-11-13 11:37:25 -0500 (Fri, 13 Nov 2009)
New Revision: 14901
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
Log:
add logic to support max_fine capping at item price, if OU setting is, ur, set
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm 2009-11-13 16:20:06 UTC (rev 14900)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm 2009-11-13 16:37:25 UTC (rev 14901)
@@ -1015,7 +1015,16 @@
if ($U->is_true($max_fine_rule->is_percent)) {
my $price = $U->get_copy_price($self->editor, $self->copy, $self->volume);
$max_amount = $price * $max_fine_rule->amount / 100;
- }
+ } elsif (
+ $U->ou_ancestor_setting_value(
+ $self->circ->circ_lib,
+ 'circ.max_fine.cap_at_price',
+ $self->editor
+ )
+ ) {
+ my $price = $U->get_copy_price($self->editor, $self->copy, $self->volume);
+ $max_amount = ( $price && $max_amount > $price ) ? $price : $max_amount;
+ }
return $max_amount;
}
More information about the open-ils-commits
mailing list