Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0029162Openbravo ERPZ. Otherspublic2015-03-06 10:062015-03-24 03:44
maite 
reinaldoguerra 
urgentmajoralways
closedfixed 
5
 
3.0PR15Q3 
aferraz
Advanced Payables and Receivables Mngmt
No
0029162: 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)
No tags attached.
related to defect 00291973.0PR15Q2 closed Sandrahuguet Payment Out is registered as "BP Deposit" transaction type in financial account 
depends on backport 00293833.0PR15Q1.2 closed reinaldoguerra Add Transaction process inside Match statement process, does not consider amount of 0.00 equals to 0 
Issue History
2015-03-06 10:06maiteNew Issue
2015-03-06 10:06maiteAssigned To => Sandrahuguet
2015-03-06 10:06maiteModules => Advanced Payables and Receivables Mngmt
2015-03-06 10:06maiteResolution time => 1428357600
2015-03-06 10:06maiteTriggers an Emergency Pack => No
2015-03-06 10:06maiteIssue Monitored: networkb
2015-03-11 00:40reinaldoguerraAssigned ToSandrahuguet => reinaldoguerra
2015-03-11 00:40reinaldoguerraStatusnew => scheduled
2015-03-13 10:35jonalegriaesarteTarget Version3.0PR15Q2 => 3.0PR15Q3
2015-03-20 16:13reinaldoguerraNote Added: 0075820
2015-03-23 17:38hgbotCheckin
2015-03-23 17:38hgbotNote Added: 0075894
2015-03-23 17:38hgbotStatusscheduled => resolved
2015-03-23 17:38hgbotResolutionopen => fixed
2015-03-23 17:38hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/c2fb827a4f009088a8850f2a2939fbbb83764c18 [^]
2015-03-23 17:38hgbotCheckin
2015-03-23 17:38hgbotNote Added: 0075895
2015-03-23 17:38hgbotCheckin
2015-03-23 17:38hgbotNote Added: 0075896
2015-03-23 17:41aferrazRelationship addedrelated to 0029197
2015-03-23 17:56aferrazStatusresolved => new
2015-03-23 17:56aferrazResolutionfixed => open
2015-03-23 17:56aferrazStatusnew => scheduled
2015-03-23 17:56aferrazStatusscheduled => resolved
2015-03-23 17:56aferrazResolutionopen => fixed
2015-03-23 17:57aferrazReview Assigned To => aferraz
2015-03-23 17:57aferrazNote Added: 0075897
2015-03-23 17:57aferrazStatusresolved => closed
2015-03-24 03:44hudsonbotCheckin
2015-03-24 03:44hudsonbotNote Added: 0075913
2015-03-24 03:44hudsonbotCheckin
2015-03-24 03:44hudsonbotNote Added: 0075914
2015-03-24 03:44hudsonbotCheckin
2015-03-24 03:44hudsonbotNote Added: 0075915

Notes
(0075820)
reinaldoguerra   
2015-03-20 16:13   
Test plan used:
With a Postgres database environment:
1- Login into Openbravo ERP
2- Access Financial Account window and select "Cuenta de banco"
3- Create new register in Bank Statement tab
4- Add a new bank statement line setting amount IN=50. Process bank statement
5- Via database and usign PgAdmin, verify that "dramount" field is 0 in Fin_Bankstatementline table
6- Run "Match statement" process, cancelling automatic matching
7- Press "+" button to add transaction and realize that transaction type has been correctly set to BPDeposit
8- Via database, update "dramount" field to 0.00
9- Run "Match statement" process again, cancelling automatic matching
10- Press "+" button to add transaction and realize that transaction type has been correctly set to BPDeposit as "0.00" is now consider as "0"
(0075894)
hgbot   
2015-03-23 17:38   
Repository: erp/devel/pi
Changeset: c2fb827a4f009088a8850f2a2939fbbb83764c18
Author: Reinaldo Guerra <reinaldo.guerra <at> peoplewalking.com>
Date: Wed Mar 18 16:47:06 2015 -0500
URL: http://code.openbravo.com/erp/devel/pi/rev/c2fb827a4f009088a8850f2a2939fbbb83764c18 [^]

Fixed bug 29162: 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
---
(0075895)
hgbot   
2015-03-23 17:38   
Repository: erp/devel/pi
Changeset: 31a785774e3e25256d14f912becddd4fb8b3dc57
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Mon Mar 23 17:05:15 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/31a785774e3e25256d14f912becddd4fb8b3dc57 [^]

Related to issue 29162: Update copyright

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddTransactionFilterExpression.java
---
(0075896)
hgbot   
2015-03-23 17:38   
Repository: erp/devel/pi
Changeset: 86f26739f0456a1a96b042ea23ca17fe3515020d
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Mon Mar 23 17:27:10 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/86f26739f0456a1a96b042ea23ca17fe3515020d [^]

Related to issue 29162: Make code more clear

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/filterexpression/AddTransactionFilterExpression.java
---
(0075897)
aferraz   
2015-03-23 17:57   
Code review + Testing OK
(0075913)
hudsonbot   
2015-03-24 03:44   
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/63f9617f42fb [^]
Maturity status: Test
(0075914)
hudsonbot   
2015-03-24 03:44   
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/63f9617f42fb [^]
Maturity status: Test
(0075915)
hudsonbot   
2015-03-24 03:44   
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/63f9617f42fb [^]
Maturity status: Test