details: https://code.openbravo.com/erp/devel/pi/rev/f9c0d1127795 changeset: 32387:f9c0d1127795 user: Mark <markmm82 <at> gmail.com> date: Wed Jun 28 12:09:31 2017 -0400 summary: Fixes issue 36345: Wrong quantity in inventory lines if "," is used as decimal separator and "." as grouping separator
Fixed number format for Quantity count and Book Quantity fields of Physical Inventory lines, taking it value from a BigDecimal variable. details: https://code.openbravo.com/erp/devel/pi/rev/710409d5baad changeset: 32388:710409d5baad user: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com> date: Mon Jul 03 12:33:57 2017 +0200 summary: Related to issue 36345: Code review improvements Send qtyOrder also as BigDecimal. Do not check if qtyOrder or qty are empty as they will never be empty. diffstat: src/org/openbravo/erpCommon/ad_callouts/SL_Inventory_Locator.java | 16 +++++----- 1 files changed, 8 insertions(+), 8 deletions(-) diffs (41 lines): diff -r b3da3000ba8d -r 710409d5baad src/org/openbravo/erpCommon/ad_callouts/SL_Inventory_Locator.java --- a/src/org/openbravo/erpCommon/ad_callouts/SL_Inventory_Locator.java Fri Jun 23 11:25:32 2017 +0200 +++ b/src/org/openbravo/erpCommon/ad_callouts/SL_Inventory_Locator.java Mon Jul 03 12:33:57 2017 +0200 @@ -11,17 +11,17 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU - * All portions are Copyright (C) 2009-2016 Openbravo SLU + * All portions are Copyright (C) 2009-2017 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ */ package org.openbravo.erpCommon.ad_callouts; +import java.math.BigDecimal; + import javax.servlet.ServletException; -import org.apache.commons.lang.StringUtils; - public class SL_Inventory_Locator extends SimpleCallout { @Override @@ -48,11 +48,11 @@ data[0].qtyorder = "0"; } - info.addResult("inpquantityorderbook", StringUtils.isEmpty(data[0].qtyorder) ? "\"\"" - : (Object) data[0].qtyorder); - info.addResult("inpqtycount", StringUtils.isEmpty(data[0].qty) ? "\"\"" - : (Object) data[0].qty); - info.addResult("inpqtybook", StringUtils.isEmpty(data[0].qty) ? "\"\"" : (Object) data[0].qty); + BigDecimal qtyOrder = new BigDecimal(data[0].qtyorder); + BigDecimal qty = new BigDecimal(data[0].qty); + info.addResult("inpquantityorderbook", qtyOrder); + info.addResult("inpqtycount", qty); + info.addResult("inpqtybook", qty); info.addResult("EXECUTE", "displayLogic();"); } ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits