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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0031374
TypeCategorySeverityReproducibilityDate SubmittedLast Update
design defect[Openbravo ERP] A. Platformminoralways2015-11-05 13:172022-02-01 08:09
ReporteraferrazView Statuspublic 
Assigned ToTriage Platform Base 
PrioritynormalResolutionopenFixed in Version
StatusacknowledgedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSLinux 64 bitDatabaseOracleJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0031374: Different order identifier when creating an invoice from an order in Oracle

DescriptionWhen creating a new invoice from "Create Lines From" button, and try to select an order with a total gross amount without decimals (25.00 for instance), the identifier changes if we are using PostgreSQL or Oracle:
- PostgreSQL: order_documentno - order_date - 25.00
- Oracle: order_documentno - order_date - 25
Steps To ReproduceAs F&B Admin in PostgreSQL:

- Create a Purchase Order for "Bebidas Alegres, S.L." business partner.
  Add a line with "Cerveza Ale" product, quantity = 100 and "Compras exentas" tax.
  Book it.
  Realize total gross amount is: 136.00.
  Let say it has "1000151" documentno and "05-11-2015" date.

- Create a Purchase Invoice for "Bebidas Alegres, S.L." business partner.
  Click on Create Lines From button.
  Realize created order appears in Order selector with the following identifier:
  1000151 - 05-11-2015 - 136.00

As F&B Admin in Oracle:

- Create a Purchase Order for "Bebidas Alegres, S.L." business partner.
  Add a line with "Cerveza Ale" product, quantity = 100 and "Compras exentas" tax.
  Book it.
  Realize total gross amount is: 136.00.
  Let say it has "1000151" documentno and "05-11-2015" date.

- Create a Purchase Invoice for "Bebidas Alegres, S.L." business partner.
  Click on Create Lines From button.
  Realize created order appears in Order selector with the following identifier:
  1000151 - 05-11-2015 - 136
  when it should be:
  1000151 - 05-11-2015 - 136.00
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0028153 closedAugustoMauch Creating identifier for some windows it is used dd-mm-yyyy format instead mm-dd-yyyy even when you are using USA format 

-  Notes
(0081546)
alostale (manager)
2015-11-06 10:13

The case defined affects 2.50 style identifiers generated using ad_column_identifier function.

The C_Order.grandTotal part of the identifier is composed by TO_CHAR(COALESCE(TO_CHAR(GrandTotal),'')) both in Oracle and PostgreSQL but it returns different values in both cases.

Note this behavior also affects DAL identifiers.

The root cause of the problem is due how internally DB handles output of numeric values with different precision.

PG:
  CREATE TABLE test
   ( n numeric,
    n1 numeric (10,2),
        n2 numeric(10,4)
   );

   insert into test values (10.20, 10.20, 10.20);

   select * from test;

   n | n1 | n2
-------+-------+---------
 10.20 | 10.20 | 10.2000

Oracle:
  CREATE TABLE test
   ( n NUMBER,
        n1 NUMBER (10,2),
      n2 NUMBER(10,4)
   );
   
   insert into test values (10.20, 10.20, 10.20);
   
   select * from test;

         N N1 N2
---------- ---------- ----------
      10.2 10.2 10.2

Note in case of PG, numbers are displayed maintaining their precision (right padding with zeroes up to precision value) whereas in Oracle they are displayed without padding.

C_Order.grandTotal is defined as numeric without indicating precision, which indicates any precision can be stored [1].

[1] http://www.postgresql.org/docs/current/static/datatype-numeric.html [^]
(0083824)
hgbot (developer)
2016-02-02 09:38

Repository: tools/automation/int
Changeset: b2175f871d6291ffb56d75d7fd646b77706741f1
Author: Lorenzo Fidalgo <lorenzo.fidalgo <at> openbravo.com>
Date: Wed Nov 11 16:37:45 2015 +0100
URL: http://code.openbravo.com/tools/automation/int/rev/b2175f871d6291ffb56d75d7fd646b77706741f1 [^]

Workaround added to avoid issue 31374

---
M src-test/com/openbravo/test/integration/erp/gui/procurement/transactions/purchaseinvoice/CreateLinesFromPopUp.java
---
(0083825)
hgbot (developer)
2016-02-02 09:38

Repository: tools/automation/int
Changeset: 147f4a73668732757fda8ee55fa6d0af1f26dda4
Author: Lorenzo Fidalgo <lorenzo.fidalgo <at> openbravo.com>
Date: Wed Nov 11 17:06:25 2015 +0100
URL: http://code.openbravo.com/tools/automation/int/rev/147f4a73668732757fda8ee55fa6d0af1f26dda4 [^]

Workaround added to avoid issue 31374 in all CreateLinesFromPopUp classes

---
M src-test/com/openbravo/test/integration/erp/gui/procurement/transactions/goodsreceipt/CreateLinesFromPopUp.java
M src-test/com/openbravo/test/integration/erp/gui/procurement/transactions/purchaseinvoice/CreateLinesFromPopUp.java
M src-test/com/openbravo/test/integration/erp/gui/sales/transactions/goodsshipment/CreateLinesFromPopUp.java
M src-test/com/openbravo/test/integration/erp/gui/sales/transactions/salesinvoice/CreateLinesFromPopUp.java
---
(0090267)
hgbot (developer)
2016-09-26 15:40

Repository: tools/automation/int
Changeset: 9b393cd998ff108791ef8f7845e605b0f2fad380
Author: IƱaki Garcia <inaki.garcia <at> openbravo.com>
Date: Wed May 11 12:56:13 2016 +0200
URL: http://code.openbravo.com/tools/automation/int/rev/9b393cd998ff108791ef8f7845e605b0f2fad380 [^]

Adding fixes and workaround to issue 31374

---
M src-test/com/openbravo/test/integration/erp/modules/client/application/gui/OBForm.java
M src-test/com/openbravo/test/integration/erp/modules/functionalteam/reservation/testsuites/RES_Regressions/RESRegression28907R27848R29003.java
M src-test/com/openbravo/test/integration/erp/modules/userinterface/smartclient/gui/Grid.java
M src-test/com/openbravo/test/integration/erp/modules/userinterface/smartclient/gui/SelectItem.java
M src-test/com/openbravo/test/integration/util/TestUtils.java
---
(0090963)
hgbot (developer)
2016-10-27 16:57

Repository: tools/automation/int
Changeset: 0e63b2463740efac19f4d5c6bfa29b6a8313ec5f
Author: Lorenzo Fidalgo <lorenzo.fidalgo <at> openbravo.com>
Date: Tue Oct 04 17:04:09 2016 +0200
URL: http://code.openbravo.com/tools/automation/int/rev/0e63b2463740efac19f4d5c6bfa29b6a8313ec5f [^]

Workarounds for issue 31374 temporarily removed

---
M src-test/com/openbravo/test/integration/erp/modules/client/application/gui/OBForm.java
M src-test/com/openbravo/test/integration/erp/modules/userinterface/smartclient/gui/Grid.java
---
(0090964)
hgbot (developer)
2016-10-27 16:58

Repository: tools/automation/int
Changeset: 58ebfbe7ef3a703895eaf28e9148ac7b0317792e
Author: Lorenzo Fidalgo <lorenzo.fidalgo <at> openbravo.com>
Date: Thu Oct 20 10:51:21 2016 +0200
URL: http://code.openbravo.com/tools/automation/int/rev/58ebfbe7ef3a703895eaf28e9148ac7b0317792e [^]

Workaround for issue 31374 added

---
M src-test/com/openbravo/test/integration/erp/modules/client/application/gui/OBForm.java
M src-test/com/openbravo/test/integration/erp/modules/userinterface/smartclient/gui/Grid.java
---

- Issue History
Date Modified Username Field Change
2015-11-05 13:17 aferraz New Issue
2015-11-05 13:17 aferraz Assigned To => platform
2015-11-05 13:17 aferraz Modules => Core
2015-11-05 13:17 aferraz Triggers an Emergency Pack => No
2015-11-05 14:53 alostale Relationship added related to 0028153
2015-11-06 10:13 alostale Note Added: 0081546
2015-11-06 10:13 alostale Status new => acknowledged
2015-11-06 10:13 alostale Type defect => design defect
2015-11-06 10:13 alostale Target Version 3.0PR16Q1 =>
2016-02-02 09:38 hgbot Checkin
2016-02-02 09:38 hgbot Note Added: 0083824
2016-02-02 09:38 hgbot Checkin
2016-02-02 09:38 hgbot Note Added: 0083825
2016-09-26 15:40 hgbot Checkin
2016-09-26 15:40 hgbot Note Added: 0090267
2016-10-27 16:57 hgbot Checkin
2016-10-27 16:57 hgbot Note Added: 0090963
2016-10-27 16:58 hgbot Checkin
2016-10-27 16:58 hgbot Note Added: 0090964
2022-02-01 08:09 alostale Assigned To platform => Triage Platform Base


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker