From 6d21b9431c8d73c88b8d41c874ff766c11f90746 Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Thu, 8 Sep 2011 16:08:30 -0400 Subject: [PATCH] Calculate penalties when marking items lost For example, if you a max fines threshold of $10, and a lost processing fee of $50, currently if you mark an item lost (or an item ages to lost) and a patron gets billed that $50, they won't automatically have the max fines penalty. This change calculates such penalties at the time a copy is marked and lost and money is juggled, within the same transaction. Signed-off-by: Jason Etheridge Signed-off-by: Bill Erickson --- .../src/perlmods/lib/OpenILS/Application/Cat/AssetCommon.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/AssetCommon.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/AssetCommon.pm index 626a9a1550..058bce04dc 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/AssetCommon.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/AssetCommon.pm @@ -696,5 +696,8 @@ sub set_item_lost { my $ses = OpenSRF::AppSession->create('open-ils.trigger'); $ses->request('open-ils.trigger.event.autocreate', 'lost', $circ, $circ->circ_lib); + my $evt2 = OpenILS::Utils::Penalty->calculate_penalties($e, $circ->usr, $U->xact_org($circ->id,$e)); + return $evt2 if $evt2; + return undef; } -- 2.43.2