diff --git a/base/src/org/compiere/model/MBankStatementLine.java b/base/src/org/compiere/model/MBankStatementLine.java index afd259dbe9..92e89a03fd 100644 --- a/base/src/org/compiere/model/MBankStatementLine.java +++ b/base/src/org/compiere/model/MBankStatementLine.java @@ -36,6 +36,7 @@ import org.compiere.util.Msg; * [ 1619076 ] Bank statement's StatementDifference becames NULL * * @author Teo Sarca, SC ARHIPAC SERVICE SRL + *
  • BF [ 1896880 ] Unlink Payment if TrxAmt is zero *
  • BF [ 1896885 ] BS Line: don't update header if after save/delete fails */ public class MBankStatementLine extends X_C_BankStatementLine @@ -153,6 +154,12 @@ import org.compiere.util.Msg; log.saveError("FillMandatory", Msg.getElement(getCtx(), "C_Charge_ID")); return false; } + // Un-link Payment if TrxAmt is zero - teo_sarca BF [ 1896880 ] + if (getTrxAmt().signum() == 0 && getC_Payment_ID() > 0) + { + setC_Payment_ID(I_ZERO); + setC_Invoice_ID(I_ZERO); + } // Set Line No if (getLine() == 0) {