thinko on using cleared fund debit id
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 26 Apr 2010 19:47:47 +0000 (19:47 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 26 Apr 2010 19:47:47 +0000 (19:47 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@16312 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm

index 52b0b3e..1be5e37 100644 (file)
@@ -2643,14 +2643,13 @@ sub cancel_lineitem_detail {
 
     if($debit_id) {
         # item is cancelled.  Remove the fund debit.
-        my $debit = $mgr->editor->retrieve_acq_fund_debit($lid->fund_debit);
+        my $debit = $mgr->editor->retrieve_acq_fund_debit($debit_id);
         if (!$U->is_true($debit->encumbrance)) {
             $mgr->editor->rollback;
             return OpenILS::Event->new('ACQ_NOT_CANCELABLE', 
                 note => "Debit is marked as paid: $debit_id");
         }
         $mgr->editor->delete_acq_fund_debit($debit) or return $mgr->editor->die_event;
-        $lid->clear_fund_debit;
     }
 
     return {"lid" => {$lid_id => {"cancel_reason" => $cancel_reason}}};