details: https://code.openbravo.com/erp/devel/pi/rev/6a37e436f203
changeset: 17494:6a37e436f203
user: Gorka Ion Damián <gorkaion.damian <at> openbravo.com>
date: Tue Jul 17 12:32:49 2012 +0200
summary: Related to issue 21077.Fix issue calculating gross line amt.
diffstat:
src/org/openbravo/erpCommon/ad_callouts/SL_Order_Amt.java | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (33 lines):
diff -r 73c19e6fd0cf -r 6a37e436f203
src/org/openbravo/erpCommon/ad_callouts/SL_Order_Amt.java
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_Order_Amt.java Tue Jul 17
12:25:10 2012 +0200
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_Order_Amt.java Tue Jul 17
12:32:49 2012 +0200
@@ -261,9 +261,6 @@
}
resultado.append("new Array(\"inppriceactual\", " +
priceActual.toString() + "),");
}
- // ordered qty multiply with gross price
- BigDecimal grossAmount = grossUnitPrice.multiply(new
BigDecimal(strQtyOrdered.trim()));
- resultado.append("new Array(\"inplineGrossAmount\", " +
grossAmount.toString() + "),");
} else if (strChanged.equals("inpdiscount")) { // calculate std and actual
BigDecimal origDiscount = null;
BigDecimal priceList;
@@ -369,7 +366,6 @@
priceActual = netUnitPrice;
priceStd = netUnitPrice;
- resultado.append("new Array(\"inplineGrossAmount\"," +
grossAmount.toString() + "),");
resultado.append("new Array(\"inppriceactual\"," +
netUnitPrice.toString() + "),");
resultado.append("new Array(\"inppricelist\"," + netUnitPrice.toString()
+ "),");
resultado.append("new Array(\"inppricelimit\", " +
netUnitPrice.toString() + "),");
@@ -398,6 +394,11 @@
if (!strChanged.equals("inplinenetamt") ||
priceActual.compareTo(BigDecimal.ZERO) == 0) {
resultado.append("new Array(\"inplinenetamt\", " + lineNetAmt.toString()
+ "),");
}
+ if (!strChanged.equals("inplineGrossAmount")) {
+ BigDecimal grossLineAmt =
grossUnitPrice.multiply(qtyOrdered).setScale(stdPrecision,
+ BigDecimal.ROUND_HALF_UP);
+ resultado.append("new Array(\"inplineGrossAmount\", " +
grossLineAmt.toString() + "),");
+ }
resultado.append("new Array(\"dummy\", \"\" )");
resultado.append(");");
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits