1003599 Payment Allocation: Allow user to enter applied amount that's more than the payment's open amount.
This commit is contained in:
parent
853b3e9da8
commit
1a33572fa9
|
@ -30,6 +30,7 @@ import org.compiere.model.MAllocationLine;
|
||||||
import org.compiere.model.MInvoice;
|
import org.compiere.model.MInvoice;
|
||||||
import org.compiere.model.MPayment;
|
import org.compiere.model.MPayment;
|
||||||
import org.compiere.model.MRole;
|
import org.compiere.model.MRole;
|
||||||
|
import org.compiere.model.MSysConfig;
|
||||||
import org.compiere.process.DocAction;
|
import org.compiere.process.DocAction;
|
||||||
import org.compiere.util.CLogger;
|
import org.compiere.util.CLogger;
|
||||||
import org.compiere.util.DB;
|
import org.compiere.util.DB;
|
||||||
|
@ -422,6 +423,7 @@ public class Allocation
|
||||||
{
|
{
|
||||||
if ( applied.signum() == -open.signum() )
|
if ( applied.signum() == -open.signum() )
|
||||||
applied = applied.negate();
|
applied = applied.negate();
|
||||||
|
if (! MSysConfig.getBooleanValue("ALLOW_OVER_APPLIED_PAYMENT", false, Env.getAD_Client_ID(Env.getCtx())))
|
||||||
if ( open.abs().compareTo( applied.abs() ) < 0 )
|
if ( open.abs().compareTo( applied.abs() ) < 0 )
|
||||||
applied = open;
|
applied = open;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue