Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0029383Openbravo ERPZ. Otherspublic2015-03-06 10:062015-04-01 08:31
maite 
reinaldoguerra 
urgentmajoralways
closedfixed 
5
 
3.0PR15Q1.2 
aferraz
Advanced Payables and Receivables Mngmt
No
0029383: Add Transaction process inside Match statement process, does not consider amount of 0.00 equals to 0
Add Transaction process inside Match statement process, does not consider amount of 0.00 equals to 0
1. Access Financial Account "Cuenta de banco" and create new register in Bank Statement window. Add new bank statement line setting IN amount=50. Process bank statement
2. Via database, verify that "dramount" is 0
3. Run "Match statement" process, cancelling automatic matching
4. Press "+" button to add transaction and realize that transaction type has been correctly set to BPDeposit
5. Via database, update "dramount" field to 0.00
6. Run "Match statement" process, cancelling automatic matching
7. Press "+" button to add transaction and realize that transaction type has been incorrectly set to BP Withdrawal

NOTE: user is not able to manually create bank statement lines with 0.00 values but bank statement import process create bank statement lines with 0.00 values. In my opinion, we need to correct the problem in Add Transactions process (or we should correct different import formats in order to not insert decimals when amount is zero)
Approved
blocks defect 00291623.0PR15Q3 closed reinaldoguerra Add Transaction process inside Match statement process, does not consider amount of 0.00 equals to 0 
Issue History
2015-03-23 17:56aferrazTypedefect => backport
2015-03-23 17:56aferrazTarget Version3.0PR15Q3 => 3.0PR15Q1.2
2015-03-23 18:33hgbotCheckin
2015-03-23 18:33hgbotNote Added: 0075899
2015-03-23 18:33hgbotStatusscheduled => resolved
2015-03-23 18:33hgbotResolutionopen => fixed
2015-03-23 18:33hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/c2fb827a4f009088a8850f2a2939fbbb83764c18 [^] => http://code.openbravo.com/erp/backports/3.0PR15Q1.2/rev/ba76e14d93b1deb2083c19f1910975d003ae6658 [^]
2015-03-23 18:34hgbotCheckin
2015-03-23 18:34hgbotNote Added: 0075900
2015-03-23 18:34hgbotCheckin
2015-03-23 18:34hgbotNote Added: 0075901
2015-03-23 18:34aferrazReview Assigned To => aferraz
2015-03-23 18:34aferrazNote Added: 0075902
2015-03-23 18:34aferrazStatusresolved => closed
2015-03-23 19:02dmitry_mezentsevTag Attached: Approved
2015-04-01 08:09hgbotCheckin
2015-04-01 08:09hgbotNote Added: 0076233
2015-04-01 08:09hgbotStatusclosed => resolved
2015-04-01 08:09hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/backports/3.0PR15Q1.2/rev/ba76e14d93b1deb2083c19f1910975d003ae6658 [^] => http://code.openbravo.com/erp/backports/3.0PR15Q2/rev/ba76e14d93b1deb2083c19f1910975d003ae6658 [^]
2015-04-01 08:09hgbotCheckin
2015-04-01 08:09hgbotNote Added: 0076234
2015-04-01 08:09hgbotCheckin
2015-04-01 08:09hgbotNote Added: 0076235
2015-04-01 08:31priyamStatusresolved => closed
2015-04-01 08:31priyamNote Added: 0076254

Notes
(0075899)
hgbot   
2015-03-23 18:33   
Repository: erp/backports/3.0PR15Q1.2
Changeset: ba76e14d93b1deb2083c19f1910975d003ae6658
Author: Reinaldo Guerra <reinaldo.guerra <at> peoplewalking.com>
Date: Wed Mar 18 16:47:06 2015 -0500
URL: http://code.openbravo.com/erp/backports/3.0PR15Q1.2/rev/ba76e14d93b1deb2083c19f1910975d003ae6658 [^]

Fixed bug 29383: Add Transaction process does not consider well amounts of 0.00

The "compareTo" method was taken into account instead of "equals", to compare BigDecimal.ZERO value with 0.00 (a BigDecimal value with a scale), inside AddTransactionFilterExpression class.
This change was made because BigDecimal "equals", compares the value and the scale, returning false when comparing 0 with 0.00, while "compareTo" only compares values, so considers amounts 0.00 and 0 as the same values. Now transaction type is correctly set to BP Deposit, when "dramount" field is set to 0.00.

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddTransactionFilterExpression.java
---
(0075900)
hgbot   
2015-03-23 18:34   
Repository: erp/backports/3.0PR15Q1.2
Changeset: 7fc5daf5af4b9b4f011e7fbcd3d856dabda57db3
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Mon Mar 23 17:05:15 2015 +0100
URL: http://code.openbravo.com/erp/backports/3.0PR15Q1.2/rev/7fc5daf5af4b9b4f011e7fbcd3d856dabda57db3 [^]

Related to issue 29383: Update copyright

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddTransactionFilterExpression.java
---
(0075901)
hgbot   
2015-03-23 18:34   
Repository: erp/backports/3.0PR15Q1.2
Changeset: c6213e1abf882e921c4e9c4c454f50e9be5df20d
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Mon Mar 23 17:27:10 2015 +0100
URL: http://code.openbravo.com/erp/backports/3.0PR15Q1.2/rev/c6213e1abf882e921c4e9c4c454f50e9be5df20d [^]

Related to issue 29383: Make code more clear

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddTransactionFilterExpression.java
---
(0075902)
aferraz   
2015-03-23 18:34   
Code review + Testing OK
(0076233)
hgbot   
2015-04-01 08:09   
Repository: erp/backports/3.0PR15Q2
Changeset: ba76e14d93b1deb2083c19f1910975d003ae6658
Author: Reinaldo Guerra <reinaldo.guerra <at> peoplewalking.com>
Date: Wed Mar 18 16:47:06 2015 -0500
URL: http://code.openbravo.com/erp/backports/3.0PR15Q2/rev/ba76e14d93b1deb2083c19f1910975d003ae6658 [^]

Fixed bug 29383: Add Transaction process does not consider well amounts of 0.00

The "compareTo" method was taken into account instead of "equals", to compare BigDecimal.ZERO value with 0.00 (a BigDecimal value with a scale), inside AddTransactionFilterExpression class.
This change was made because BigDecimal "equals", compares the value and the scale, returning false when comparing 0 with 0.00, while "compareTo" only compares values, so considers amounts 0.00 and 0 as the same values. Now transaction type is correctly set to BP Deposit, when "dramount" field is set to 0.00.

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddTransactionFilterExpression.java
---
(0076234)
hgbot   
2015-04-01 08:09   
Repository: erp/backports/3.0PR15Q2
Changeset: 7fc5daf5af4b9b4f011e7fbcd3d856dabda57db3
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Mon Mar 23 17:05:15 2015 +0100
URL: http://code.openbravo.com/erp/backports/3.0PR15Q2/rev/7fc5daf5af4b9b4f011e7fbcd3d856dabda57db3 [^]

Related to issue 29383: Update copyright

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddTransactionFilterExpression.java
---
(0076235)
hgbot   
2015-04-01 08:09   
Repository: erp/backports/3.0PR15Q2
Changeset: c6213e1abf882e921c4e9c4c454f50e9be5df20d
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Mon Mar 23 17:27:10 2015 +0100
URL: http://code.openbravo.com/erp/backports/3.0PR15Q2/rev/c6213e1abf882e921c4e9c4c454f50e9be5df20d [^]

Related to issue 29383: Make code more clear

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddTransactionFilterExpression.java
---
(0076254)
priyam   
2015-04-01 08:31   
closed again, as the status changed due the merge tag of 3.0PR15Q1.2 to backports/3.0PR15Q2