Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0016351Openbravo ERPZ. Otherspublic2011-03-17 11:182011-05-19 18:07
maite 
eduardo_Argal 
urgentmajoralways
closedfixed 
5
2.50MP27 
2.50MP28 
Advanced Payables and Receivables Mngmt
No
0016351: 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.
depends on backport 00163522.50MP28 closed eduardo_Argal Problem in getBalance method of Financial Account Transactions 
Issue History
2011-03-17 11:18maiteNew Issue
2011-03-17 11:18maiteAssigned To => eduardo_Argal
2011-03-17 11:18maiteModules => Advanced Payables and Receivables Mngmt
2011-03-17 11:19eduardo_ArgalStatusnew => scheduled
2011-03-17 11:19eduardo_Argalfix_in_branch => pi
2011-03-17 11:25eduardo_Argalfix_in_branchpi =>
2011-03-17 11:25eduardo_ArgalSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=1630#r1630
2011-03-17 11:27hgbotCheckin
2011-03-17 11:27hgbotNote Added: 0034986
2011-03-17 11:27hgbotStatusscheduled => resolved
2011-03-17 11:27hgbotResolutionopen => fixed
2011-03-17 11:27hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/8b9a7f487985c4ad8499e4fc26243d4d9e5c8ebd [^]
2011-05-19 18:07miruritaStatusresolved => closed

Notes
(0034986)
hgbot   
2011-03-17 11:27   
Repository: erp/devel/pi
Changeset: 8b9a7f487985c4ad8499e4fc26243d4d9e5c8ebd
Author: Eduardo Argal Guibert <eduardo.argal <at> openbravo.com>
Date: Thu Mar 17 11:29:33 2011 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/8b9a7f487985c4ad8499e4fc26243d4d9e5c8ebd [^]

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

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