Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0036015Openbravo ERPZ. Otherspublic2017-05-16 17:552017-05-30 20:59
maite 
collazoandy4 
urgentmajoralways
closedfixed 
5
 
3.0PR17Q3 
aferraz
Advanced Payables and Receivables Mngmt
No
0036015: Partial match confirmation shown when no difference between bankstatementline and sum of transactions exists
Root cause of problem is due to number of decimals > 2 is calculated by javascript when working with elements having 2 decimals
1. Access Financial Account "cuenta de banco" and register new transaction related with gl item and Deposit Amount=3369.45. Process
2. Register another transaction related with gl item and Deposit Amount=1288.02. Process
3. Register new Bank Statement. Add line with Amount IN=4657.47. Process bank statement
4. Run "Match Statement" process, press "CANCEL" to not run algorithm and press "Search" in bankstatementline
5. Select transaction of 1288.02 and then select transaction of 3369.45 and press Done
6. Realize that "Bank statement line amount [4657.47] and transaction amount [4657.47] does not match. Do you want to perform a partial match?" confirmation pop-up appears when it should not
Problem is in file "ob-aprm-findTransaction.js", when "totalTrxAmt = totalTrxAmt + trxAmt;" is executed as "1288.02 + 3369.45= 4657.469999999999"

Possible solution could be to use "OB.DEC.add(a, b)" function which is used in retail code
No tags attached.
Issue History
2017-05-16 17:55maiteNew Issue
2017-05-16 17:55maiteAssigned To => Triage Finance
2017-05-16 17:55maiteModules => Advanced Payables and Receivables Mngmt
2017-05-16 17:55maiteResolution time => 1496700000
2017-05-16 17:55maiteTriggers an Emergency Pack => No
2017-05-16 17:55maiteIssue Monitored: networkb
2017-05-17 13:34aferrazAssigned ToTriage Finance => collazoandy4
2017-05-23 22:40collazoandy4Statusnew => scheduled
2017-05-26 00:05collazoandy4Note Added: 0096824
2017-05-30 10:08hgbotCheckin
2017-05-30 10:08hgbotNote Added: 0097002
2017-05-30 10:08hgbotStatusscheduled => resolved
2017-05-30 10:08hgbotResolutionopen => fixed
2017-05-30 10:08hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/816a40caaba96844c4de384537155528791eacc1 [^]
2017-05-30 10:10aferrazReview Assigned To => aferraz
2017-05-30 10:10aferrazNote Added: 0097004
2017-05-30 10:10aferrazStatusresolved => closed
2017-05-30 10:10aferrazFixed in Version => 3.0PR17Q3
2017-05-30 20:59hudsonbotCheckin
2017-05-30 20:59hudsonbotNote Added: 0097037

Notes
(0096824)
collazoandy4   
2017-05-26 00:05   
Test Plan
  Go to Financial Account window and select "Cuenta de banco" record.
    In Transaction tab create a new record:
      G/L Item: Capital social
      Deposit Amount: 3369.45
      Process the transaction
    In Transaction tab create another record:
      G/L Item: Capital social
      Deposit Amount: 1288.02
      Process the transaction
    In Imported Bank Statements tab create a new record
      Name: Issue
      In Bank Statements Lines tab create a new record
        Reference No.: Issue
        Amount IN: 4657.47
      Process
    Clic on Match Statement button and press CANCEL to not run algorithm:
      In the record press "Search"
        Select transaction of 1288.02 and then select transaction of 3369.45 and press Done
        Realize that no error is shown
(0097002)
hgbot   
2017-05-30 10:08   
Repository: erp/devel/pi
Changeset: 816a40caaba96844c4de384537155528791eacc1
Author: Armaignac <collazoandy4 <at> gmail.com>
Date: Thu May 25 17:01:51 2017 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/816a40caaba96844c4de384537155528791eacc1 [^]

Fixes issue 36015: Rounding issue when adding transactions in Match Statement

A wrong compare was made betweent bank statement line and transactions amount because
a rounding problem.

BigDecimal will be used for totalTrxAmt, blineAmt, trxDepositAmt, trxPaymentAmt
and trxAmt variables to avoid this rounding problem.

---
M modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-findTransaction.js
---
(0097004)
aferraz   
2017-05-30 10:10   
Code review + Testing OK
(0097037)
hudsonbot   
2017-05-30 20:59   
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/b1bab5011974 [^]
Maturity status: Test