added option to override the note for when overriding the damaged item billing amount
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 2 Nov 2009 21:44:01 +0000 (21:44 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 2 Nov 2009 21:44:01 +0000 (21:44 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@14722 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Circ.pm
Open-ILS/src/perlmods/OpenILS/Application/Circ/CircCommon.pm

index 8e60472..c1d0813 100644 (file)
@@ -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 {
index 048c087..1319201 100644 (file)
@@ -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;