[open-ils-commits] r14722 - in trunk/Open-ILS/src/perlmods/OpenILS/Application: . Circ (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Nov 2 16:44:07 EST 2009


Author: erickson
Date: 2009-11-02 16:44:01 -0500 (Mon, 02 Nov 2009)
New Revision: 14722

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/CircCommon.pm
Log:
added option to override the note for when overriding the damaged item billing amount

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/CircCommon.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/CircCommon.pm	2009-11-02 19:24:40 UTC (rev 14721)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/CircCommon.pm	2009-11-02 21:44:01 UTC (rev 14722)
@@ -88,9 +88,10 @@
 
 
 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 @@
 	$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;

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm	2009-11-02 19:24:40 UTC (rev 14721)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ.pm	2009-11-02 21:44:01 UTC (rev 14722)
@@ -1081,6 +1081,7 @@
 
     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 @@
             # 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 {



More information about the open-ils-commits mailing list