From aeb9fd27facce2600c51fca0047a1ac871ede1aa Mon Sep 17 00:00:00 2001 From: erickson Date: Mon, 2 Nov 2009 21:44:01 +0000 Subject: [PATCH] added option to override the note for when overriding the damaged item billing amount git-svn-id: svn://svn.open-ils.org/ILS/trunk@14722 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Circ.pm | 3 ++- Open-ILS/src/perlmods/OpenILS/Application/Circ/CircCommon.pm | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm index 8e60472b24..c1d0813515 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm @@ -1081,6 +1081,7 @@ sub handle_mark_damaged { my $new_amount = $args->{override_amount}; my $new_btype = $args->{override_btype}; + my $new_note = $args->{override_note}; # grab the last circulation my $circ = $e->search_action_circulation([ @@ -1118,7 +1119,7 @@ sub handle_mark_damaged { # optional processing fee. my $evt = OpenILS::Application::Circ::CircCommon->create_bill( - $e, $new_amount, $new_btype, 'Damaged Item Override', $circ->id); + $e, $new_amount, $new_btype, 'Damaged Item Override', $circ->id, $new_note); return $evt if $evt; } else { diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/CircCommon.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/CircCommon.pm index 048c0871c8..1319201554 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/CircCommon.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/CircCommon.pm @@ -88,9 +88,10 @@ sub reopen_xact { sub create_bill { - my($class, $e, $amount, $btype, $type, $xactid) = @_; + my($class, $e, $amount, $btype, $type, $xactid, $note) = @_; $logger->info("The system is charging $amount [$type] on xact $xactid"); + $note ||= 'SYSTEM GENERATED'; # ----------------------------------------------------------------- # now create the billing @@ -99,7 +100,7 @@ sub create_bill { $bill->amount($amount); $bill->billing_type($type); $bill->btype($btype); - $bill->note('SYSTEM GENERATED'); + $bill->note($note); $e->create_money_billing($bill) or return $e->die_event; return undef; -- 2.11.0