IDEMPIERE-4760 Credit check do not allow complete Customer Return (#652)
This commit is contained in:
parent
8f31506ac7
commit
c803886d25
|
@ -1131,7 +1131,7 @@ public class MInOut extends X_M_InOut implements DocAction
|
|||
}
|
||||
|
||||
// Credit Check
|
||||
if (isSOTrx() && !isReversal())
|
||||
if (isSOTrx() && !isReversal() && !isCustomerReturn())
|
||||
{
|
||||
I_C_Order order = getC_Order();
|
||||
if (order != null && MDocType.DOCSUBTYPESO_PrepayOrder.equals(order.getC_DocType().getDocSubTypeSO())
|
||||
|
@ -1230,6 +1230,17 @@ public class MInOut extends X_M_InOut implements DocAction
|
|||
return DocAction.STATUS_InProgress;
|
||||
} // prepareIt
|
||||
|
||||
/**
|
||||
* Check if Document is Customer Return.
|
||||
* @return True if Document is Customer Return
|
||||
*/
|
||||
private boolean isCustomerReturn() {
|
||||
MDocType doctype = MDocType.get(getC_DocType_ID());
|
||||
if(isSOTrx() && doctype.getDocBaseType().equals("MMR") && doctype.isSOTrx())
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Approve Document
|
||||
* @return true if success
|
||||
|
|
Loading…
Reference in New Issue