From 1a33572fa9e0eeed914b5217ba67ebc281434767 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Thu, 5 Dec 2013 10:30:46 +0800 Subject: [PATCH] 1003599 Payment Allocation: Allow user to enter applied amount that's more than the payment's open amount. --- org.adempiere.ui/src/org/compiere/apps/form/Allocation.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/org.adempiere.ui/src/org/compiere/apps/form/Allocation.java b/org.adempiere.ui/src/org/compiere/apps/form/Allocation.java index 7bb72f5ae4..7ef931b896 100644 --- a/org.adempiere.ui/src/org/compiere/apps/form/Allocation.java +++ b/org.adempiere.ui/src/org/compiere/apps/form/Allocation.java @@ -30,6 +30,7 @@ import org.compiere.model.MAllocationLine; import org.compiere.model.MInvoice; import org.compiere.model.MPayment; import org.compiere.model.MRole; +import org.compiere.model.MSysConfig; import org.compiere.process.DocAction; import org.compiere.util.CLogger; import org.compiere.util.DB; @@ -422,8 +423,9 @@ public class Allocation { if ( applied.signum() == -open.signum() ) applied = applied.negate(); - if ( open.abs().compareTo( applied.abs() ) < 0 ) - applied = open; + if (! MSysConfig.getBooleanValue("ALLOW_OVER_APPLIED_PAYMENT", false, Env.getAD_Client_ID(Env.getCtx()))) + if ( open.abs().compareTo( applied.abs() ) < 0 ) + applied = open; } payment.setValueAt(applied, row, i_payment);