From 2df541712fd691ee817568ed9d14e94bba13424e Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 6 Feb 2015 16:19:14 +0100 Subject: [PATCH] Bug 13675: Do not set aqorders.budget_id to NULL C4::Acquisition::ModReceiveOrder updates the aqorders with budget_id=NULL if no budget_id given in parameter. Actually the same budget_id should be used. In tests (especially t/db_dependent/Acquisition/TransferOrder.t), ModReceiveOrder is not called with a budget_id param and set to NULL the budget_id value. test plan: prove t/db_dependent/Acquisition/TransferOrder.t should return green Note that this bug should not appear using the interface. Signed-off-by: Tomas Cohen Arazi The fix makes sense, and running $ prove t/db_dependent/Acq* returns all green. koha-qa.pl also likes it. Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- C4/Acquisition.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index cc84453a50..15f69c004f 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -1468,7 +1468,7 @@ q{SELECT * FROM aqorders WHERE biblionumber=? AND aqorders.ordernumber=?}, $cost, $rrp, $ecost, - $budget_id, + ( $budget_id ? $budget_id : $order->{budget_id} ), ( defined $order_internalnote ? $order_internalnote : () ), ( defined $order_vendornote ? $order_vendornote : () ), $biblionumber, -- 2.39.5