Fixes issue 37183:Wrong cost adjustment made to a transaction related with a
authorArmaignac <collazoandy4@gmail.com>
Thu, 02 Nov 2017 09:52:23 -0400
changeset 32945 53224949e216
parent 32944 f84f2fdd1fc6
child 32946 38268cab93c5
Fixes issue 37183:Wrong cost adjustment made to a transaction related with a
return shipment line

When the transaction is related with a return shipment line a negative adjustment
amout was used to compute the cost adjustmen of the related transaction.

The negative method call was removed from the adjustment amount
src/org/openbravo/costing/CostingAlgorithmAdjustmentImp.java
--- a/src/org/openbravo/costing/CostingAlgorithmAdjustmentImp.java	Tue Nov 07 07:07:42 2017 +0100
+++ b/src/org/openbravo/costing/CostingAlgorithmAdjustmentImp.java	Thu Nov 02 09:52:23 2017 -0400
@@ -408,7 +408,7 @@
       costAdjLine = getCostAdjLine();
     }
     ShipmentInOutLine inoutline = costAdjLine.getInventoryTransaction().getGoodsShipmentLine();
-    BigDecimal costAdjAmt = costAdjLine.getAdjustmentAmount().negate();
+    BigDecimal costAdjAmt = costAdjLine.getAdjustmentAmount();
     int precission = getCostCurrency().getStandardPrecision().intValue();
     StringBuffer where = new StringBuffer();
     where.append(" as trx");