Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0016352Openbravo ERPZ. Otherspublic2011-03-17 11:182011-03-17 12:54
maite 
eduardo_Argal 
urgentmajoralways
closedfixed 
5
2.50MP27 
2.50MP282.50MP28 
Advanced Payables and Receivables Mngmt
No
0016352: Problem in getBalance method of Financial Account Transactions
When one payment is divided into several invoices, method org.openbravo.erpCommon.ad_forms.DocFINFinAccTransaction.getBalance() for
each DocLine attempts to subtract the PaymentAmount from the DepositAmount.

Due to the fact that the DepositAmount comprised the whole PaymentAmount for each
transaction the result is always unbalanced when we have more than only one invoice.
Go to Financial Management || Accounting || Setup || Accounting Schema || Accounting Schema >> General Ledger
set Suspense Balancing Use = false
create a payment out paying 2 invoices
create a transaction in financial account for the previous payment
post it
Not Balenced error is shown
e.g. use:
> BigDecimal lineBalance = new BigDecimal(((DocLine_FINFinAccTransaction)
p_lines[i]).getAmount());
instead of
> BigDecimal lineBalance = new BigDecimal(((DocLine_FINFinAccTransaction)
p_lines[i]).DepositAmount);

or when the filling the FieldProviderFactory in
org.openbravo.erpCommon.ad_forms.DocFINFinAccTransaction.loadLinesPaymentDetailsFieldProvider(FIN_FinaccTransaction)
you might write the Amount into the data-field "DepositAmount":

e.g.: use
> FieldProviderFactory.setField(data[i], "DepositAmount",
paymentDetails.get(i).getAmount().toString());
instead of
> FieldProviderFactory.setField(data[i], "DepositAmount",
transaction.getDepositAmount().toString());
No tags attached.
blocks defect 00163512.50MP28 closed eduardo_Argal Problem in getBalance method of Financial Account Transactions 
Issue History
2011-03-17 11:19eduardo_ArgalTypedefect => backport
2011-03-17 11:19eduardo_Argalfix_in_branch => 2.50
2011-03-17 11:25eduardo_ArgalSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=1632#r1632
2011-03-17 11:29hgbotCheckin
2011-03-17 11:29hgbotNote Added: 0034987
2011-03-17 11:29hgbotStatusscheduled => resolved
2011-03-17 11:29hgbotResolutionopen => fixed
2011-03-17 11:29hgbotFixed in SCM revision => http://code.openbravo.com/erp/stable/2.50/rev/a211843dff1ee701b6f0aebc7628f01584c69451 [^]
2011-03-17 12:06maiteStatusresolved => closed
2011-03-17 12:06maiteFixed in Version => 2.50MP28
2011-03-17 12:54maiteIssue Monitored: networkb

Notes
(0034987)
hgbot   
2011-03-17 11:29   
Repository: erp/stable/2.50
Changeset: a211843dff1ee701b6f0aebc7628f01584c69451
Author: Eduardo Argal Guibert <eduardo.argal <at> openbravo.com>
Date: Thu Mar 17 11:31:28 2011 +0100
URL: http://code.openbravo.com/erp/stable/2.50/rev/a211843dff1ee701b6f0aebc7628f01584c69451 [^]

Fixes bug 16352: Problem in getBalance method of Financial Account Transactions

---
M src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java
---