Fixes bug 18118: Posting is broken while mixing invoices and GL items whenever the result payment is posted while being deposited
authorEduardo Argal Guibert <eduardo.argal@openbravo.com>
Thu, 28 Jul 2011 17:57:07 +0200
changeset 13333 52f07f8abaa9
parent 13332 951aa8d5e79f
child 13334 038a1d151bb0
Fixes bug 18118: Posting is broken while mixing invoices and GL items whenever the result payment is posted while being deposited
src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java
--- a/src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java	Thu Jul 28 17:33:23 2011 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/DocFINFinAccTransaction.java	Thu Jul 28 17:57:07 2011 +0200
@@ -431,8 +431,8 @@
           fact.createLine(
               line,
               getAccountGLItem(OBDal.getInstance().get(GLItem.class, line.getCGlItemId()), as,
-                  isReceipt, conn), paymentCurrencyId, line.getPaymentAmount(), line
-                  .getDepositAmount(), Fact_Acct_Group_ID, nextSeqNo(SeqNo), DocumentType, null,
+              isReceipt, conn), paymentCurrencyId, isReceipt ? "":line.getAmount(), 
+              isReceipt ? line.getAmount() : "", Fact_Acct_Group_ID, nextSeqNo(SeqNo), DocumentType, null,
               paymentToSchemaConversionRate, conn);
         } else {
           fact.createLine(