Repaired exchange rate PO activation bug
authorBill Erickson <berick@esilibrary.com>
Thu, 16 Jun 2011 15:50:16 +0000 (11:50 -0400)
committerBill Erickson <berick@esilibrary.com>
Thu, 16 Jun 2011 15:50:16 +0000 (11:50 -0400)
Code was using the wrong hash key to read data from cstore request,
resulting in a NULL debit amount when activating a PO with a different
provider => fund currencies.  This resulted in POs that could not be
activated.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Order.pm

index 917b20f..dafa288 100644 (file)
@@ -689,7 +689,7 @@ sub create_lineitem_detail_debit {
                 $lid->fund->currency_type, # destination currency
                 $li->estimated_unit_price # source amount
             ]
-        })->[0]->{value};
+        })->[0]->{'acq.exchange_ratio'};
     }
 
     my $debit = create_fund_debit(