Bug 17563: (followup) Silence undef warnings
authorTomas Cohen Arazi <tomascohen@theke.io>
Tue, 8 Nov 2016 19:11:49 +0000 (16:11 -0300)
committerKyle M Hall <kyle@bywatersolutions.com>
Thu, 10 Nov 2016 13:36:48 +0000 (13:36 +0000)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

C4/Acquisition.pm

index 3b255b4..6ad5ff7 100644 (file)
@@ -1419,6 +1419,10 @@ sub ModReceiveOrder {
         $order->{budget_id} = ( $budget_id || $order->{budget_id} );
         $order->{quantity} = $quantrec;
         $order->{quantityreceived} = $quantrec;
+        $order->{ecost_tax_excluded} //= 0;
+        $order->{tax_rate_on_ordering} //= 0;
+        $order->{unitprice_tax_excluded} //= 0;
+        $order->{tax_rate_on_receiving} //= 0;
         $order->{tax_value_on_ordering} = $order->{quantity} * $order->{ecost_tax_excluded} * $order->{tax_rate_on_ordering};
         $order->{tax_value_on_receiving} = $order->{quantity} * $order->{unitprice_tax_excluded} * $order->{tax_rate_on_receiving};
         $order->{datereceived} = $datereceived;