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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0036693
TypeCategorySeverityReproducibilityDate SubmittedLast Update
design defect[Openbravo ERP] 01. General setupmajoralways2017-08-22 13:582018-01-08 18:18
ReporterngarciaView Statuspublic 
Assigned Tomarkmm82 
PriorityurgentResolutionfixedFixed in Version3.0PR18Q1
StatusclosedFix in branchFixed in SCM revision40e58d4f3e61
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Todmiguelez
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0036693: In Currency window, Standard precision can be higher than the currency's real precision (commonly 2)

DescriptionIn Currency window, Standard precision can be higher than the currency's real precision (commonly 2).

The Standard Precision is used to round all the amounts (not prices) of the documents created in the backend. As the majority of currencies do not allow to pay an amount lower than 0.01, a warning could be shown when the standard precision is defined with a value higher than 2
Steps To ReproduceAs System Admin role:
   Go to EUR currency and check you can save the record with the following values and it is not correct:
      Standard Precision: 6
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to feature request 0023532 newdmiguelez Openbravo ERP It would be fine if line amounts could have different precision than totals 
related to design defect 0036694 closedjorge-garcia Retail Modules In Currency window, POS precision can be higher than the currency's real precision (commonly 2) 

-  Notes
(0098862)
ngarcia (developer)
2017-09-06 13:46

Currency codes - ISO 4217:

https://www.iso.org/iso-4217-currency-codes.html [^] [^]
(0099812)
markmm82 (developer)
2017-10-06 17:28

Test Plan:
  Notice the currency precision defined for:
    EUR => 2
    XOF => 0
    CLF => 4
    XBA => N.A. (Bond Markets Unit European Composite Unit (EURCO))
  In https://www.currency-iso.org/dam/downloads/lists/list_one.xml [^]

As System Admin role:
   Go to EUR currency and change Standard Precision to 6.
   Notice a warning message is shown:
     Warning
     The current standard precision: 6 is higher than currency precision defined on ISO 4217 specification: 2 for: EUR currency.

   Go to EUR currency and change Standard Precision to -3.
   Notice an error message is shown, and the standard precision is set as default 2:
     Error
     Standard precision must be greater than zero.

   Go to XOF currency and change Standard Precision to 2.
   Notice a warning message is shown:
     Warning
     The current standard precision: 2 is higher than currency precision defined on ISO 4217 specification: 0 for: XOF currency.

   Check that CLF currency doesn't exists in our current currency list in AD.
   We will going to create it:
     ISO Code = CLF
     Description = Unidad de Fomento - CHILE
     Standard Precision = 5
   Notice a warning message is shown:
     Warning
     The current standard precision: 5 is higher than currency precision defined on ISO 4217 specification: 4 for: CLF currency.

   Check that XBA currency doesn't exists in our current currency list in AD.
   We will going to create it:
     ISO Code = XBA
     Description = Bond Markets Unit European Composite Unit (EURCO)
     Standard Precision = 3
   Notice a warning message is shown:
     Warning
     The current standard precision: 3 is higher than currency precision defined on ISO 4217 specification: 2 for: XBA currency
   Check althoug the XBA currency doesn't has assigned any precision inside the ISO specification, it is using the default precision to validate the standard precion entered: 2.

   Besides the warning message when the precision entered is higher than specification, it is possible to save the record.
(0099869)
hgbot (developer)
2017-10-11 18:12

Repository: erp/devel/pi
Changeset: 40e58d4f3e61f3097cdad501314fbb82b8421c4b
Author: Mark <markmm82 <at> gmail.com>
Date: Fri Oct 06 10:25:41 2017 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/40e58d4f3e61f3097cdad501314fbb82b8421c4b [^]

Fixes issue 36693:Std precision can be higher than the currency's real precision

In Currency window, Standard precision can be higher than the currency's real
precision (commonly 2). The Standard Precision is used to round all the amounts
(not prices) of the documents created in the backend.

Was created a new callout used to validate the currency standard precision. If
the new precision is higher than specified currency precision in ISO 4217 Currency
codes, then a warning is showed to user.

Also, if the new precision is negative then an error message is shown and it is
set as the default standard precision: 2.

---
M src-db/database/sourcedata/AD_CALLOUT.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_MESSAGE.xml
M src-db/database/sourcedata/AD_MODEL_OBJECT.xml
M src-db/database/sourcedata/AD_MODEL_OBJECT_MAPPING.xml
A src/org/openbravo/erpCommon/ad_callouts/ISO_4217.xml
A src/org/openbravo/erpCommon/ad_callouts/SL_Currency_StdPrecision.java
---
(0099870)
hgbot (developer)
2017-10-11 18:12

Repository: erp/devel/pi
Changeset: 2d768f24220e00d1fe01b2fc05fc0fa8dbf6ef30
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Wed Oct 11 11:12:21 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/2d768f24220e00d1fe01b2fc05fc0fa8dbf6ef30 [^]

Related to Issue 36693. Code Review Changes:

* Improved error message when standard precission is a negative number
* Improved some Java Doc
* Removed some unnecessary Java Doc
* Reordering tags in definition of constants to compile with standards
* Rearranged Code to improve redability
* Added log.error when file has not been found

---
M src-db/database/sourcedata/AD_MESSAGE.xml
M src/org/openbravo/erpCommon/ad_callouts/SL_Currency_StdPrecision.java
---
(0099871)
dmiguelez (developer)
2017-10-11 18:13

Code Review + Testing Ok
(0100386)
hgbot (developer)
2017-11-09 13:52

Repository: erp/devel/pi
Changeset: 1aeebc4d61e03697fc62adb9f74fe04e0a435b80
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Thu Nov 09 13:52:00 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/1aeebc4d61e03697fc62adb9f74fe04e0a435b80 [^]

Related to Issue 36693.

Added Licensing info for new XML file.

---
M legal/Licensing.txt
---
(0100472)
hgbot (developer)
2017-11-13 09:35

Repository: erp/devel/pi
Changeset: ec4d8877501f88708797aa7896a37b2c9d673443
Author: Mark <markmm82 <at> gmail.com>
Date: Fri Oct 13 10:33:11 2017 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/ec4d8877501f88708797aa7896a37b2c9d673443 [^]

Related to issue 36693: Code review improvements.

Removed AD_MODEL_OBJECT_MAPPING as not required for SimpleCallout.
Renamed getPrecissionForCurrencyFromList method to getPrecisionForCurrencyFromList
Renamed isSameCurrencyAsParameterAndIsPrecissionDefined to isSameCurrencyAsParameterAndIsPrecisionDefined
To fix in both cases typo in "Precision" word.

---
M src-db/database/sourcedata/AD_MODEL_OBJECT_MAPPING.xml
M src/org/openbravo/erpCommon/ad_callouts/SL_Currency_StdPrecision.java
---
(0100562)
hgbot (developer)
2017-11-17 08:34

Repository: erp/devel/pi
Changeset: 6488f29c70a0831c3e9e3052b2b86a778f78e154
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Wed Nov 15 13:37:59 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/6488f29c70a0831c3e9e3052b2b86a778f78e154 [^]

Related to issue 36694. Related to issue 36693

The code related to the ISO currency precision included in the callout has
been moved to a new class called ISOCurrencyPrecision. Now, the
method getCurrencyPrecisionInISO4217Spec is public.

---
M src/org/openbravo/erpCommon/ad_callouts/SL_Currency_StdPrecision.java
A src/org/openbravo/erpCommon/utility/ISOCurrencyPrecision.java
---
(0100628)
hgbot (developer)
2017-11-20 17:08

Repository: erp/devel/pi
Changeset: 72ca71e6b78a340ee3126792286f5bf970d7c673
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Mon Nov 20 12:01:56 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/72ca71e6b78a340ee3126792286f5bf970d7c673 [^]

Related to issue 36694. Related to issue 36693

 * Fix problem with log messages in the new API
 * Added copyright to ISOCurrencyPrecision
 * Added class Javadoc to ISOCurrencyPrecision
 * Use getResourceAsStream to read the xml file with the standard
   currency precisions.

---
M src/org/openbravo/erpCommon/utility/ISOCurrencyPrecision.java
---
(0101326)
hudsonbot (developer)
2018-01-03 12:38

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/c81e0d3cbab5 [^]
Maturity status: Test
(0101327)
hudsonbot (developer)
2018-01-03 12:38

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/c81e0d3cbab5 [^]
Maturity status: Test
(0101395)
hudsonbot (developer)
2018-01-03 12:38

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/c81e0d3cbab5 [^]
Maturity status: Test
(0101415)
hudsonbot (developer)
2018-01-03 12:38

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/c81e0d3cbab5 [^]
Maturity status: Test
(0101430)
hudsonbot (developer)
2018-01-03 12:39

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/c81e0d3cbab5 [^]
Maturity status: Test
(0101443)
hudsonbot (developer)
2018-01-03 12:39

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/c81e0d3cbab5 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2017-08-22 13:58 ngarcia New Issue
2017-08-22 13:58 ngarcia Assigned To => Triage Finance
2017-08-22 13:58 ngarcia Modules => Core
2017-08-22 13:58 ngarcia Triggers an Emergency Pack => No
2017-08-22 13:59 ngarcia Issue Monitored: networkb
2017-08-22 14:00 ngarcia Type defect => design defect
2017-08-22 14:03 ngarcia Relationship added related to 0036694
2017-08-22 14:03 ngarcia Relationship added related to 0023532
2017-08-22 14:04 ngarcia Steps to Reproduce Updated View Revisions
2017-09-06 13:46 ngarcia Note Added: 0098862
2017-10-05 16:15 markmm82 Assigned To Triage Finance => markmm82
2017-10-05 16:17 markmm82 Status new => scheduled
2017-10-06 17:28 markmm82 Note Added: 0099812
2017-10-11 18:12 hgbot Checkin
2017-10-11 18:12 hgbot Note Added: 0099869
2017-10-11 18:12 hgbot Status scheduled => resolved
2017-10-11 18:12 hgbot Resolution open => fixed
2017-10-11 18:12 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/40e58d4f3e61f3097cdad501314fbb82b8421c4b [^]
2017-10-11 18:12 hgbot Checkin
2017-10-11 18:12 hgbot Note Added: 0099870
2017-10-11 18:13 dmiguelez Review Assigned To => dmiguelez
2017-10-11 18:13 dmiguelez Note Added: 0099871
2017-10-11 18:13 dmiguelez Status resolved => closed
2017-11-09 13:52 hgbot Checkin
2017-11-09 13:52 hgbot Note Added: 0100386
2017-11-13 09:35 hgbot Checkin
2017-11-13 09:35 hgbot Note Added: 0100472
2017-11-17 08:34 hgbot Checkin
2017-11-17 08:34 hgbot Note Added: 0100562
2017-11-20 17:08 hgbot Checkin
2017-11-20 17:08 hgbot Note Added: 0100628
2018-01-03 12:38 hudsonbot Checkin
2018-01-03 12:38 hudsonbot Note Added: 0101326
2018-01-03 12:38 hudsonbot Checkin
2018-01-03 12:38 hudsonbot Note Added: 0101327
2018-01-03 12:38 hudsonbot Checkin
2018-01-03 12:38 hudsonbot Note Added: 0101395
2018-01-03 12:38 hudsonbot Checkin
2018-01-03 12:38 hudsonbot Note Added: 0101415
2018-01-03 12:39 hudsonbot Checkin
2018-01-03 12:39 hudsonbot Note Added: 0101430
2018-01-03 12:39 hudsonbot Checkin
2018-01-03 12:39 hudsonbot Note Added: 0101443
2018-01-08 18:18 dmiguelez Fixed in Version => 3.0PR18Q1


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker