details: https://code.openbravo.com/erp/devel/pi/rev/944195714367
changeset: 15946:944195714367
user: Mikel Irurita <mikel.irurita <at> openbravo.com>
date: Thu Mar 29 16:55:28 2012 +0200
summary: Fixes issue 20148: General Ledger report NumberFormatException using
commas as decimal separator
If the initial balance amount contains a comma when printing in pdf format
it will fail: java.lang.NumberFormatException, because it's trying to cast
to BigDecimal an number string containing a commas as decimal separator
diffstat:
src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedgerJournal.java | 8
++++----
src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedgerJournal.xml | 4
++--
2 files changed, 6 insertions(+), 6 deletions(-)
diffs (60 lines):
diff -r 01f4307bcdea -r 944195714367
src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedgerJournal.java
--- a/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedgerJournal.java
Thu Mar 29 16:54:24 2012 +0200
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedgerJournal.java
Thu Mar 29 16:55:28 2012 +0200
@@ -11,7 +11,7 @@
* under the License.
* The Original Code is Openbravo ERP.
* The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2001-2011 Openbravo SLU
+ * All portions are Copyright (C) 2001-2012 Openbravo SLU
* All Rights Reserved.
* Contributor(s): ______________________________________.
************************************************************************
@@ -107,7 +107,7 @@
"1");
String strEntryNo = vars.getGlobalVariable("inpEntryNo",
"ReportGeneralLedgerJournal|EntryNo", "1");
- String strInitialBalance = vars.getGlobalVariable("inpInitialBalance",
+ String strInitialBalance =
vars.getNumericGlobalVariable("inpInitialBalance",
"ReportGeneralLedgerJournal|InitialBalance", "0");
String strShowDescription = vars.getGlobalVariable("inpShowDescription",
"ReportGeneralLedgerJournal|ShowDescription", "");
@@ -176,7 +176,7 @@
"ReportGeneralLedgerJournal|PageNo");
String strEntryNo = vars.getRequestGlobalVariable("inpEntryNo",
"ReportGeneralLedgerJournal|EntryNo");
- String strInitialBalance =
vars.getRequestGlobalVariable("inpInitialBalance",
+ String strInitialBalance =
vars.getNumericRequestGlobalVariable("inpInitialBalance",
"ReportGeneralLedgerJournal|InitialBalance");
String strShowDescription =
vars.getRequestGlobalVariable("inpShowDescription",
"ReportGeneralLedgerJournal|ShowDescription");
@@ -230,7 +230,7 @@
"1");
String strEntryNo = vars.getGlobalVariable("inpEntryNo",
"ReportGeneralLedgerJournal|EntryNo", "1");
- String strInitialBalance = vars.getGlobalVariable("inpInitialBalance",
+ String strInitialBalance =
vars.getNumericGlobalVariable("inpInitialBalance",
"ReportGeneralLedgerJournal|InitialBalance", "0");
String strShowDescription = vars.getGlobalVariable("inpShowDescription",
"ReportGeneralLedgerJournal|ShowDescription", "N");
diff -r 01f4307bcdea -r 944195714367
src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedgerJournal.xml
--- a/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedgerJournal.xml
Thu Mar 29 16:54:24 2012 +0200
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportGeneralLedgerJournal.xml
Thu Mar 29 16:55:28 2012 +0200
@@ -12,7 +12,7 @@
* under the License.
* The Original Code is Openbravo ERP.
* The Initial Developer of the Original Code is Openbravo SLU
-* All portions are Copyright (C) 2001-2011 Openbravo SLU
+* All portions are Copyright (C) 2001-2012 Openbravo SLU
* All Rights Reserved.
* Contributor(s): ______________________________________.
************************************************************************
@@ -46,7 +46,7 @@
<PARAMETER id="paramC_ACCTSCHEMA_ID" name="cAcctschemaId"/>
<PARAMETER id="paramPageNo" name="inpPageNo" attribute="value" default="1"/>
<PARAMETER id="paramEntryNo" name="inpEntryNo" attribute="value"
default="1"/>
- <PARAMETER id="paramInitialBalance" name="inpInitialBalance"
attribute="value" default="0"/>
+ <PARAMETER id="paramInitialBalance" name="inpInitialBalance"
format="euroEdition" attribute="value" default="0"/>
<PARAMETER id="fieldCheck" name="check" default="Y"/>
<PARAMETER id="paramShowRegular" name="showRegular" boolean="checked"
withId="fieldCheck"/>
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits