Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0012502
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 09. Financial managementminoralways2010-03-01 12:272010-05-18 12:12
ReporternetworkbView Statuspublic 
Assigned Toshuehner 
PriorityhighResolutionfixedFixed in Version
StatusclosedFix in branchpiFixed in SCM revisione809fe06034d
ProjectionnoneETAnoneTarget Version2.50MP17
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product Version2.50MP11SCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0012502: Error with RptC_Remittance.jrxml.pdf

DescriptionWe need to do two changes:

1.- /config/Format.xml:

<Number name="euroRelation"
       decimal="." grouping="," formatOutput="#,##0.0000" FormatInternal="#0.0000" />
   <Number name="euroEdition"
       decimal="." grouping="," formatOutput="#0.0000" formatInternal="#0.0000" />

- ant compile.development -Dtab=xxx

2.- As System Administrator:
Go to General Setup || Application || Currency, select EUR.
Standard Precision: 4.

Now, on Remmitance, we create two lines from two payments:
-Payment 1: 200.5445
-Payment 2: 400.2239

Total amount: 600.7684 rounded to 600.77

when we click on Print Record button, the PDF created is wrong (PDF atached).

The amounts are 200.54 and 400.22.
The total amount is 600.77

it also happens when we generate the bank.dat


Steps To Reproduce-As Openbravo Admin and the changes mentioned go to Sales Management || Transactions || Sales Invoice
-Create a new record: Bussiness Partner: John Moneymaker, save and go to lines.
-Create a line, save, and go to Payment, create two records:
     - Amount: 400.2239, Due Date: 01-02-2010.
     - Amount: 200.5445, Due Date: 01-02-2010.
-Go back to the Header and complete.

-Go to Financial Management || Receivables & Payables || Transactions || Remittance
-Create a new record. Click 'Create Lines From' and select the payments created and process.
-Click 'Print Record'
TagsNo tags attached.
Attached Filespdf file icon RptC_Remittance.jrxml.pdf [^] (2,469 bytes) 2010-03-01 12:27

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0024900)
dalsasua (reporter)
2010-03-01 12:28

I think
ant compile.development -Dtab=xxx
is not correct in steps to reproduce. Can you check that, please?
(0024930)
networkb (developer)
2010-03-02 09:17

David,
the step is correct.
(0025898)
balamurugan (reporter)
2010-04-06 14:39

After triaging this issue, it is known that the pdf reports which are using jrxml as template will take the number format from the session variable "#AD_ReportNumberFormat" which is set/hardcoded in the renderJR() funtions in HttpSecureAppServlet.java.

For example, Purchase/Sales Invoice or Order windows, Remittance windows use jrxml. But Settlement window uses FO to create the pdf document (using renderFO function) which take the format values from "Format.xml" file.

So, the Platform team has to decide, whether the Reports using JRXML will have to take formatting values from "Format.xml" or not.
(0025900)
balamurugan (reporter)
2010-04-06 14:40

After triaging this issue, it is known that the pdf reports which are using jrxml as template will take the number format from the session variable "#AD_ReportNumberFormat" which is set/hardcoded in the renderJR() funtions in HttpSecureAppServlet.java.

For example, Purchase/Sales Invoice or Order windows, Remittance windows use jrxml. But Settlement window uses FO to create the pdf document (using renderFO function) which take the format values from "Format.xml" file.

So, the Platform team has to decide, whether the Reports using JRXML will have to take formatting values from "Format.xml" or not.
(0025978)
iciordia (manager)
2010-04-08 13:33

Stefan,

please discuss the issue with Ivan, the fix seems to be pretty simple.

Sorry for late assignment, I hope it will no be very disruptive.

Ismael
(0025996)
shuehner (administrator)
2010-04-08 18:04

Just taken a quick look:
We seem to have three values currently used for building the numberformat used in renderJR for jrxml files:
- #AD_ReportNumberFormat
- #AD_ReportDecimalSeparator
- #AD_ReportGroupingSeparator

Those together construct the format which is passed to every jrxml.

From those three values the last two come from the 'euroInform' entry in Format.xml, so are customizable. However the first is hardcoded in java and not read from the Format.xml file.

Proposed change: use the formatOutput from Format.xml to populate this #Ad_ReportNumberFormat

Then the euroInform definition would be consistently used to pass the format to jrxml files.
(0025998)
iciordia (manager)
2010-04-08 18:23

I agree with the proposed solution

Ismael
(0025999)
shuehner (administrator)
2010-04-08 18:25

The proposed change will change the default format used for all renderJR reports: from "###,##0.00" (current, hardcoded) to "#,##0.00" (default for euroInform, in the current Format.xml.template)
(0026032)
shuehner (administrator)
2010-04-09 13:38

After checking documentation: Those two format strings are equivalent so no change in existing behavior if you did not modify the Format.xml euroInform outputFormat value.
(0026033)
dalsasua (reporter)
2010-04-09 15:01

Regarding the "it also happens when we generate the bank.dat" comment, please realize that ERP standard just support the "Cuaderno" format from "AEB-Asociación Española de Banca", which is just designed for Spanish market. While Euro maintains the two decimals precision, no change in bank.dat file generation will be needed. The creation of this file is not determined by the configuration in the application, but by the standard files format provided by AEB.
(0026039)
hgbot (developer)
2010-04-09 15:53

Repository: erp/devel/pi
Changeset: e809fe06034de0148fcc39aae65eaad40a18c0d7
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Fri Apr 09 16:05:37 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/e809fe06034de0148fcc39aae65eaad40a18c0d7 [^]

Fixed 12502: Make decimalformat used by renderJR fully configurable
via Format.xml format name euroInform

---
M src/org/openbravo/base/secureApp/HttpSecureAppServlet.java
---
(0026040)
shuehner (administrator)
2010-04-09 15:56

After this change the format used in renderJR can be configured via the euroInform (outputFormat) entry in Format.xml
(0026237)
iperdomo (reporter)
2010-04-15 11:10

Tested on PI @ rev 7076c219cdd9
(0026445)
hudsonbot (developer)
2010-04-19 21:13

A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/e809fe06034d [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/91d98bda46c1 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17088.obx [^]

- Issue History
Date Modified Username Field Change
2010-03-01 12:27 networkb New Issue
2010-03-01 12:27 networkb Assigned To => dalsasua
2010-03-01 12:27 networkb File Added: RptC_Remittance.jrxml.pdf
2010-03-01 12:28 dalsasua Note Added: 0024900
2010-03-01 12:28 dalsasua Status new => feedback
2010-03-01 12:56 networkb Description Updated View Revisions
2010-03-02 09:17 networkb Note Added: 0024930
2010-03-02 09:17 networkb Status feedback => new
2010-03-08 16:05 jpabloae Target Version 2.50MP14 => 2.50MP15
2010-04-06 14:01 balamurugan Assigned To dalsasua => balamurugan
2010-04-06 14:31 balamurugan Assigned To balamurugan => networkb
2010-04-06 14:39 balamurugan Note Added: 0025898
2010-04-06 14:40 balamurugan Note Added: 0025900
2010-04-06 14:40 balamurugan Status new => feedback
2010-04-08 12:43 balamurugan Assigned To networkb => iciordia
2010-04-08 13:32 iciordia Assigned To iciordia => shuehner
2010-04-08 13:33 iciordia Status feedback => scheduled
2010-04-08 13:33 iciordia Note Added: 0025978
2010-04-08 13:33 iciordia fix_in_branch => pi
2010-04-08 18:04 shuehner Note Added: 0025996
2010-04-08 18:23 iciordia Note Added: 0025998
2010-04-08 18:25 shuehner Note Added: 0025999
2010-04-09 13:38 shuehner Note Added: 0026032
2010-04-09 15:01 dalsasua Note Added: 0026033
2010-04-09 15:53 hgbot Checkin
2010-04-09 15:53 hgbot Note Added: 0026039
2010-04-09 15:53 hgbot Status scheduled => resolved
2010-04-09 15:53 hgbot Resolution open => fixed
2010-04-09 15:53 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/e809fe06034de0148fcc39aae65eaad40a18c0d7 [^]
2010-04-09 15:56 shuehner Note Added: 0026040
2010-04-15 11:10 iperdomo Note Added: 0026237
2010-04-15 11:10 iperdomo Status resolved => closed
2010-04-16 00:00 anonymous sf_bug_id 0 => 2987961
2010-04-19 21:13 hudsonbot Checkin
2010-04-19 21:13 hudsonbot Note Added: 0026445
2010-05-18 12:12 gorka_gil Target Version 2.50MP15 => 2.50MP17


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker