details: https://code.openbravo.com/erp/devel/pi/rev/368eb470c295
changeset: 25743:368eb470c295
user: Atul Gaware <atul.gaware <at> openbravo.com>
date: Tue Jan 13 12:59:52 2015 +0530
summary: Fixes Issue 27289:"Not Balance" error received when posting a
multi-currency
OUT transaction (although suspense balancing no needs to be used)
Problem was a negate value (in case of payments where isReceipt=No) was being
subtracted.
diffstat:
src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r d4a038cf2708 -r 368eb470c295
src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java
--- a/src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java Thu Jan
22 17:05:07 2015 +0100
+++ b/src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java Tue Jan
13 12:59:52 2015 +0530
@@ -11,7 +11,7 @@
* under the License.
* The Original Code is Openbravo ERP.
* The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010-2014 Openbravo SLU
+ * All portions are Copyright (C) 2010-2015 Openbravo SLU
* All Rights Reserved.
* Contributor(s): ______________________________________.
************************************************************************
@@ -816,7 +816,7 @@
((DocLine_FINFinAccTransaction) p_lines[i]).DepositAmount);
lineBalance = lineBalance.subtract(new BigDecimal(
((DocLine_FINFinAccTransaction) p_lines[i]).PaymentAmount));
- retValue = retValue.subtract(lineBalance);
+ retValue = retValue.add(lineBalance);
} else {
BigDecimal lineBalance = payment.isReceipt() ? new BigDecimal(
((DocLine_FINFinAccTransaction) p_lines[i]).getAmount()) : new
BigDecimal(
@@ -824,7 +824,7 @@
BigDecimal lineWriteoff = payment.isReceipt() ? new BigDecimal(
((DocLine_FINFinAccTransaction) p_lines[i]).getWriteOffAmt()) :
new BigDecimal(
((DocLine_FINFinAccTransaction)
p_lines[i]).getWriteOffAmt()).negate();
- retValue = retValue.subtract(lineBalance).subtract(lineWriteoff);
+ retValue = retValue.add(lineBalance).add(lineWriteoff);
}
}
} finally {
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits