protect against fetching lineitem details by ref instead of ID
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 17 Sep 2010 17:10:13 +0000 (17:10 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 17 Sep 2010 17:10:13 +0000 (17:10 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@17765 dcc99617-32d9-48b4-a31d-7c20da2025e4

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

index 2318e22..6517646 100644 (file)
@@ -658,7 +658,9 @@ sub create_lineitem_detail_debit {
         ]);
     }
 
-    unless(ref $lid and ref $lid->fund) {
+    if(ref $lid) {
+        $lid->fund($mgr->editor->retrieve_acq_fund($lid->fund)) unless(ref $lid->fund);
+    } else {
         $lid = $mgr->editor->retrieve_acq_lineitem_detail([
             $lid,
             {   flesh => 1,