From a8771ae014796472710b5ec8a7163f3eaffc2498 Mon Sep 17 00:00:00 2001
From: erickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Date: Mon, 26 Apr 2010 19:47:47 +0000
Subject: [PATCH] thinko on using cleared fund debit id

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 | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm b/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm
index 52b0b3e137..1be5e37eba 100644
--- a/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm
+++ b/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm
@@ -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}}};
-- 
2.11.0