IDEMPIERE-4318 Validation - Prepay Order must not allow Cash payment rule (#127)
This commit is contained in:
parent
84577578ea
commit
bcd1fa67cd
|
@ -1093,6 +1093,14 @@ public class MOrder extends X_C_Order implements DocAction
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// IDEMPIERE-4318 Validation - Prepay Order must not allow Cash payment rule
|
||||||
|
MDocType dt = MDocType.get(getCtx(), getC_DocTypeTarget_ID());
|
||||||
|
if ( MDocType.DOCSUBTYPESO_PrepayOrder.equals(dt.getDocSubTypeSO())
|
||||||
|
&& PAYMENTRULE_Cash.equals(getPaymentRule())) {
|
||||||
|
log.saveError("Error", Msg.parseTranslation(getCtx(), "@Invalid@ @PaymentRule@"));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (! recursiveCall && (!newRecord && is_ValueChanged(COLUMNNAME_C_PaymentTerm_ID))) {
|
if (! recursiveCall && (!newRecord && is_ValueChanged(COLUMNNAME_C_PaymentTerm_ID))) {
|
||||||
recursiveCall = true;
|
recursiveCall = true;
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue