Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0024912Openbravo ERP09. Financial managementpublic2013-10-08 18:372013-10-16 19:46
ioritzCia 
dmiguelez 
immediatemajoralways
closedfixed 
20Ubuntu 10.04
 
 
Core
Production - Confirmed Stable
2013-04-25
https://code.openbravo.com/erp/devel/pi/rev/2674db04cea807ccca1b64725f007cd0bf75af26 [^]
No
0024912: When posting a transaction of a payment with more than one line you get a not balanced error.
When posting a transaction of a payment with more than one line, the getBalanced method of DocFINFinAcctTransaction.java launches a not balanced error.
- Go to General Ledger Configuration window, General Accounts tab and check that Suspense Balancing Use check is not checked.
- Create a Payment with more than one line and process it.
- Add the Payment to a Transaction and try to post it.
- You get a not balanced error.
BigDecimal lineBalance = BigDecimal.ZERO;
for (FIN_PaymentDetail pd : payment.getFINPaymentDetailList()) {
   lineBalance = lineBalance.add(payment.isReceipt() ? pd.getAmount().add(
       pd.getWriteoffAmount()) : pd.getAmount().add(pd.getWriteoffAmount()).negate());
}
retValue = retValue.subtract(lineBalance);

code should be replaced with:

BigDecimal lineBalance = payment.isReceipt() ? new BigDecimal(
    ((DocLine_FINFinAccTransaction) p_lines[i]).getAmount()) : new BigDecimal(
    ((DocLine_FINFinAccTransaction) p_lines[i]).getAmount()).negate();
BigDecimal lineWriteoff = payment.isReceipt() ? new BigDecimal(
    ((DocLine_FINFinAccTransaction) p_lines[i]).getWriteOffAmt()) : new BigDecimal(
    ((DocLine_FINFinAccTransaction) p_lines[i]).getWriteOffAmt()).negate();
No tags attached.
Issue History
2013-10-08 18:37ioritzCiaNew Issue
2013-10-08 18:37ioritzCiaAssigned To => dmiguelez
2013-10-08 18:37ioritzCiaModules => Core
2013-10-08 18:37ioritzCiaTriggers an Emergency Pack => No
2013-10-08 18:39ioritzCiaRegression level => Production - Confirmed Stable
2013-10-08 18:39ioritzCiaRegression date => 2013-04-25
2013-10-08 18:39ioritzCiaRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/2674db04cea807ccca1b64725f007cd0bf75af26 [^]
2013-10-09 17:04hgbotCheckin
2013-10-09 17:04hgbotNote Added: 0061636
2013-10-09 17:04hgbotStatusnew => resolved
2013-10-09 17:04hgbotResolutionopen => fixed
2013-10-09 17:04hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/d6cb6fc0a7521cc0938d6c3753fae495d8732c4d [^]
2013-10-09 17:39hgbotCheckin
2013-10-09 17:39hgbotNote Added: 0061638
2013-10-09 18:23ioritzCiaNote Added: 0061640
2013-10-09 18:23ioritzCiaStatusresolved => closed
2013-10-16 19:46hudsonbotCheckin
2013-10-16 19:46hudsonbotNote Added: 0061739
2013-10-16 19:46hudsonbotCheckin
2013-10-16 19:46hudsonbotNote Added: 0061740

Notes
(0061636)
hgbot   
2013-10-09 17:04   
Repository: erp/devel/pi
Changeset: d6cb6fc0a7521cc0938d6c3753fae495d8732c4d
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Wed Oct 09 17:04:19 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/d6cb6fc0a7521cc0938d6c3753fae495d8732c4d [^]

Fixes Issue 24912. Prevents from not Balanced error.

---
M src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java
---
(0061638)
hgbot   
2013-10-09 17:39   
Repository: erp/devel/pi
Changeset: 81de998abbec582d7cb06fab64989ec37b8098b2
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Wed Oct 09 17:39:29 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/81de998abbec582d7cb06fab64989ec37b8098b2 [^]

Related to Issue 24912.

---
M src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java
---
(0061640)
ioritzCia   
2013-10-09 18:23   
Verified
(0061739)
hudsonbot   
2013-10-16 19:46   
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/51315988909a [^]

Maturity status: Test
(0061740)
hudsonbot   
2013-10-16 19:46   
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/51315988909a [^]

Maturity status: Test