Implement proposal on Support Request [ 1566089 ] Limit Doc Action Access

Integrate development by Layda Salas sponsored by Idalica
This commit is contained in:
Carlos Ruiz 2007-02-27 04:54:32 +00:00
parent c0a3ebdb58
commit 1d69ec3afc
17 changed files with 1025 additions and 39 deletions

View File

@ -400,9 +400,14 @@ public final class MAllocationHdr extends X_C_AllocationHdr implements DocAction
}
setApprovalAmt(approval);
//
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_PREPARE);
if (m_processMsg != null)
return DocAction.STATUS_Invalid;
m_justPrepared = true;
if (!DOCACTION_Complete.equals(getDocAction()))
setDocAction(DOCACTION_Complete);
return DocAction.STATUS_InProgress;
} // prepareIt
@ -441,6 +446,11 @@ public final class MAllocationHdr extends X_C_AllocationHdr implements DocAction
if (!DocAction.STATUS_InProgress.equals(status))
return status;
}
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
if (m_processMsg != null)
return DocAction.STATUS_Invalid;
// Implicit Approval
if (!isApproved())
approveIt();
@ -477,8 +487,21 @@ public final class MAllocationHdr extends X_C_AllocationHdr implements DocAction
public boolean voidIt()
{
log.info(toString());
// Before Void
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID);
if (m_processMsg != null)
return false;
boolean retValue = reverseIt();
// After Void
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_VOID);
if (m_processMsg != null)
return false;
setDocAction(DOCACTION_None);
return retValue;
} // voidIt
@ -490,8 +513,18 @@ public final class MAllocationHdr extends X_C_AllocationHdr implements DocAction
public boolean closeIt()
{
log.info(toString());
// Before Close
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE);
if (m_processMsg != null)
return false;
// After Close
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_CLOSE);
if (m_processMsg != null)
return false;
setDocAction(DOCACTION_None);
return true;
} // closeIt
@ -502,7 +535,18 @@ public final class MAllocationHdr extends X_C_AllocationHdr implements DocAction
public boolean reverseCorrectIt()
{
log.info(toString());
// Before reverseCorrect
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT);
if (m_processMsg != null)
return false;
boolean retValue = reverseIt();
// After reverseCorrect
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSECORRECT);
if (m_processMsg != null)
return false;
setDocAction(DOCACTION_None);
return retValue;
} // reverseCorrectionIt
@ -514,7 +558,18 @@ public final class MAllocationHdr extends X_C_AllocationHdr implements DocAction
public boolean reverseAccrualIt()
{
log.info(toString());
// Before reverseAccrual
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL);
if (m_processMsg != null)
return false;
boolean retValue = reverseIt();
// After reverseAccrual
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSEACCRUAL);
if (m_processMsg != null)
return false;
setDocAction(DOCACTION_None);
return retValue;
} // reverseAccrualIt
@ -526,6 +581,16 @@ public final class MAllocationHdr extends X_C_AllocationHdr implements DocAction
public boolean reActivateIt()
{
log.info(toString());
// Before reActivate
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE);
if (m_processMsg != null)
return false;
// After reActivate
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REACTIVATE);
if (m_processMsg != null)
return false;
return false;
} // reActivateIt

View File

@ -331,6 +331,11 @@ public class MBankStatement extends X_C_BankStatement implements DocAction
m_processMsg = "@PeriodClosed@";
return DocAction.STATUS_Invalid;
}
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_PREPARE);
if (m_processMsg != null)
return DocAction.STATUS_Invalid;
m_justPrepared = true;
if (!DOCACTION_Complete.equals(getDocAction()))
@ -373,6 +378,11 @@ public class MBankStatement extends X_C_BankStatement implements DocAction
if (!DocAction.STATUS_InProgress.equals(status))
return status;
}
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
if (m_processMsg != null)
return DocAction.STATUS_Invalid;
// Implicit Approval
if (!isApproved())
approveIt();
@ -415,6 +425,11 @@ public class MBankStatement extends X_C_BankStatement implements DocAction
public boolean voidIt()
{
log.info(toString());
// Before Void
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID);
if (m_processMsg != null)
return false;
if (DOCSTATUS_Closed.equals(getDocStatus())
|| DOCSTATUS_Reversed.equals(getDocStatus())
|| DOCSTATUS_Voided.equals(getDocStatus()))
@ -479,6 +494,11 @@ public class MBankStatement extends X_C_BankStatement implements DocAction
addDescription(Msg.getMsg(getCtx(), "Voided"));
setStatementDifference(Env.ZERO);
// After Void
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_VOID);
if (m_processMsg != null)
return false;
setProcessed(true);
setDocAction(DOCACTION_None);
return true;
@ -491,6 +511,15 @@ public class MBankStatement extends X_C_BankStatement implements DocAction
public boolean closeIt()
{
log.info("closeIt - " + toString());
// Before Close
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE);
if (m_processMsg != null)
return false;
// After Close
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_CLOSE);
if (m_processMsg != null)
return false;
setDocAction(DOCACTION_None);
return true;
@ -503,6 +532,16 @@ public class MBankStatement extends X_C_BankStatement implements DocAction
public boolean reverseCorrectIt()
{
log.info("reverseCorrectIt - " + toString());
// Before reverseCorrect
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT);
if (m_processMsg != null)
return false;
// After reverseCorrect
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSECORRECT);
if (m_processMsg != null)
return false;
return false;
} // reverseCorrectionIt
@ -513,6 +552,16 @@ public class MBankStatement extends X_C_BankStatement implements DocAction
public boolean reverseAccrualIt()
{
log.info("reverseAccrualIt - " + toString());
// Before reverseAccrual
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL);
if (m_processMsg != null)
return false;
// After reverseAccrual
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSEACCRUAL);
if (m_processMsg != null)
return false;
return false;
} // reverseAccrualIt
@ -523,6 +572,15 @@ public class MBankStatement extends X_C_BankStatement implements DocAction
public boolean reActivateIt()
{
log.info("reActivateIt - " + toString());
// Before reActivate
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE);
if (m_processMsg != null)
return false;
// After reActivate
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REACTIVATE);
if (m_processMsg != null)
return false;
return false;
} // reActivateIt

View File

@ -451,7 +451,11 @@ public class MCash extends X_C_Cash implements DocAction
}
setStatementDifference(difference);
// setEndingBalance(getBeginningBalance().add(getStatementDifference()));
//
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_PREPARE);
if (m_processMsg != null)
return DocAction.STATUS_Invalid;
m_justPrepared = true;
if (!DOCACTION_Complete.equals(getDocAction()))
setDocAction(DOCACTION_Complete);
@ -493,6 +497,12 @@ public class MCash extends X_C_Cash implements DocAction
if (!DocAction.STATUS_InProgress.equals(status))
return status;
}
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
if (m_processMsg != null)
return DocAction.STATUS_Invalid;
// Implicit Approval
if (!isApproved())
approveIt();
@ -601,6 +611,14 @@ public class MCash extends X_C_Cash implements DocAction
public boolean voidIt()
{
log.info(toString());
// Before Void
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID);
if (m_processMsg != null)
return false;
// After Void
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_VOID);
if (m_processMsg != null)
return false;
setDocAction(DOCACTION_None);
return false;
} // voidIt
@ -613,6 +631,15 @@ public class MCash extends X_C_Cash implements DocAction
public boolean closeIt()
{
log.info(toString());
// Before Close
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE);
if (m_processMsg != null)
return false;
// After Close
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_CLOSE);
if (m_processMsg != null)
return false;
setDocAction(DOCACTION_None);
return true;
} // closeIt
@ -624,6 +651,16 @@ public class MCash extends X_C_Cash implements DocAction
public boolean reverseCorrectIt()
{
log.info(toString());
// Before reverseCorrect
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT);
if (m_processMsg != null)
return false;
// After reverseCorrect
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSECORRECT);
if (m_processMsg != null)
return false;
return false;
} // reverseCorrectionIt
@ -634,6 +671,16 @@ public class MCash extends X_C_Cash implements DocAction
public boolean reverseAccrualIt()
{
log.info(toString());
// Before reverseAccrual
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL);
if (m_processMsg != null)
return false;
// After reverseAccrual
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSEACCRUAL);
if (m_processMsg != null)
return false;
return false;
} // reverseAccrualIt
@ -644,9 +691,19 @@ public class MCash extends X_C_Cash implements DocAction
public boolean reActivateIt()
{
log.info(toString());
// Before reActivate
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE);
if (m_processMsg != null)
return false;
setProcessed(false);
if (reverseCorrectIt())
return true;
// After reActivate
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REACTIVATE);
if (m_processMsg != null)
return false;
return false;
} // reActivateIt

View File

@ -1088,6 +1088,10 @@ public class MInOut extends X_M_InOut implements DocAction
checkMaterialPolicy(); // set MASI
createConfirmation();
}
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_PREPARE);
if (m_processMsg != null)
return DocAction.STATUS_Invalid;
m_justPrepared = true;
if (!DOCACTION_Complete.equals(getDocAction()))
@ -1130,6 +1134,11 @@ public class MInOut extends X_M_InOut implements DocAction
if (!DocAction.STATUS_InProgress.equals(status))
return status;
}
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
if (m_processMsg != null)
return DocAction.STATUS_Invalid;
// Outstanding (not processed) Incoming Confirmations ?
MInOutConfirm[] confirmations = getConfirmations(true);
for (int i = 0; i < confirmations.length; i++)
@ -1628,6 +1637,10 @@ public class MInOut extends X_M_InOut implements DocAction
public boolean voidIt()
{
log.info(toString());
// Before Void
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID);
if (m_processMsg != null)
return false;
if (DOCSTATUS_Closed.equals(getDocStatus())
|| DOCSTATUS_Reversed.equals(getDocStatus())
@ -1662,6 +1675,11 @@ public class MInOut extends X_M_InOut implements DocAction
{
return reverseCorrectIt();
}
// After Void
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_VOID);
if (m_processMsg != null)
return false;
setProcessed(true);
setDocAction(DOCACTION_None);
@ -1675,6 +1693,16 @@ public class MInOut extends X_M_InOut implements DocAction
public boolean closeIt()
{
log.info(toString());
// Before Close
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE);
if (m_processMsg != null)
return false;
// After Close
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_CLOSE);
if (m_processMsg != null)
return false;
setProcessed(true);
setDocAction(DOCACTION_None);
return true;
@ -1687,6 +1715,11 @@ public class MInOut extends X_M_InOut implements DocAction
public boolean reverseCorrectIt()
{
log.info(toString());
// Before reverseCorrect
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT);
if (m_processMsg != null)
return false;
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
if (!MPeriod.isOpen(getCtx(), getDateAcct(), dt.getDocBaseType()))
{
@ -1778,6 +1811,11 @@ public class MInOut extends X_M_InOut implements DocAction
//
addDescription("(" + reversal.getDocumentNo() + "<-)");
// After reverseCorrect
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSECORRECT);
if (m_processMsg != null)
return false;
m_processMsg = reversal.getDocumentNo();
setProcessed(true);
setDocStatus(DOCSTATUS_Reversed); // may come from void
@ -1792,6 +1830,16 @@ public class MInOut extends X_M_InOut implements DocAction
public boolean reverseAccrualIt()
{
log.info(toString());
// Before reverseAccrual
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL);
if (m_processMsg != null)
return false;
// After reverseAccrual
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSEACCRUAL);
if (m_processMsg != null)
return false;
return false;
} // reverseAccrualIt
@ -1802,6 +1850,16 @@ public class MInOut extends X_M_InOut implements DocAction
public boolean reActivateIt()
{
log.info(toString());
// Before reActivate
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE);
if (m_processMsg != null)
return false;
// After reActivate
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REACTIVATE);
if (m_processMsg != null)
return false;
return false;
} // reActivateIt

View File

@ -340,6 +340,9 @@ public class MInOutConfirm extends X_M_InOutConfirm implements DocAction
}
setIsInDispute(difference);
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_PREPARE);
if (m_processMsg != null)
return DocAction.STATUS_Invalid;
//
m_justPrepared = true;
if (!DOCACTION_Complete.equals(getDocAction()))
@ -382,6 +385,11 @@ public class MInOutConfirm extends X_M_InOutConfirm implements DocAction
if (!DocAction.STATUS_InProgress.equals(status))
return status;
}
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
if (m_processMsg != null)
return DocAction.STATUS_Invalid;
// Implicit Approval
if (!isApproved())
approveIt();
@ -640,6 +648,15 @@ public class MInOutConfirm extends X_M_InOutConfirm implements DocAction
public boolean voidIt()
{
log.info(toString());
// Before Void
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID);
if (m_processMsg != null)
return false;
// After Void
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_VOID);
if (m_processMsg != null)
return false;
return false;
} // voidIt
@ -650,8 +667,17 @@ public class MInOutConfirm extends X_M_InOutConfirm implements DocAction
public boolean closeIt()
{
log.info(toString());
// Before Close
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE);
if (m_processMsg != null)
return false;
// After Close
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_CLOSE);
if (m_processMsg != null)
return false;
setDocAction(DOCACTION_None);
return true;
} // closeIt
@ -662,6 +688,16 @@ public class MInOutConfirm extends X_M_InOutConfirm implements DocAction
public boolean reverseCorrectIt()
{
log.info(toString());
// Before reverseCorrect
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT);
if (m_processMsg != null)
return false;
// After reverseCorrect
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSECORRECT);
if (m_processMsg != null)
return false;
return false;
} // reverseCorrectionIt
@ -672,6 +708,16 @@ public class MInOutConfirm extends X_M_InOutConfirm implements DocAction
public boolean reverseAccrualIt()
{
log.info(toString());
// Before reverseAccrual
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL);
if (m_processMsg != null)
return false;
// After reverseAccrual
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSEACCRUAL);
if (m_processMsg != null)
return false;
return false;
} // reverseAccrualIt
@ -682,6 +728,16 @@ public class MInOutConfirm extends X_M_InOutConfirm implements DocAction
public boolean reActivateIt()
{
log.info(toString());
// Before reActivate
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE);
if (m_processMsg != null)
return false;
// After reActivate
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REACTIVATE);
if (m_processMsg != null)
return false;
return false;
} // reActivateIt

View File

@ -331,7 +331,10 @@ public class MInventory extends X_M_Inventory implements DocAction
// TODO: Add up Amounts
// setApprovalAmt();
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_PREPARE);
if (m_processMsg != null)
return DocAction.STATUS_Invalid;
m_justPrepared = true;
if (!DOCACTION_Complete.equals(getDocAction()))
setDocAction(DOCACTION_Complete);
@ -373,6 +376,11 @@ public class MInventory extends X_M_Inventory implements DocAction
if (!DocAction.STATUS_InProgress.equals(status))
return status;
}
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
if (m_processMsg != null)
return DocAction.STATUS_Invalid;
// Implicit Approval
if (!isApproved())
approveIt();
@ -712,6 +720,11 @@ public class MInventory extends X_M_Inventory implements DocAction
public boolean voidIt()
{
log.info(toString());
// Before Void
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID);
if (m_processMsg != null)
return false;
if (DOCSTATUS_Closed.equals(getDocStatus())
|| DOCSTATUS_Reversed.equals(getDocStatus())
|| DOCSTATUS_Voided.equals(getDocStatus()))
@ -749,6 +762,10 @@ public class MInventory extends X_M_Inventory implements DocAction
return reverseCorrectIt();
}
// After Void
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_VOID);
if (m_processMsg != null)
return false;
setProcessed(true);
setDocAction(DOCACTION_None);
return true;
@ -761,6 +778,14 @@ public class MInventory extends X_M_Inventory implements DocAction
public boolean closeIt()
{
log.info(toString());
// Before Close
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE);
if (m_processMsg != null)
return false;
// After Close
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_CLOSE);
if (m_processMsg != null)
return false;
setDocAction(DOCACTION_None);
return true;
@ -773,6 +798,11 @@ public class MInventory extends X_M_Inventory implements DocAction
public boolean reverseCorrectIt()
{
log.info(toString());
// Before reverseCorrect
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT);
if (m_processMsg != null)
return false;
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
if (!MPeriod.isOpen(getCtx(), getMovementDate(), dt.getDocBaseType()))
{
@ -828,6 +858,10 @@ public class MInventory extends X_M_Inventory implements DocAction
// Update Reversed (this)
addDescription("(" + reversal.getDocumentNo() + "<-)");
// After reverseCorrect
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSECORRECT);
if (m_processMsg != null)
return false;
setProcessed(true);
setDocStatus(DOCSTATUS_Reversed); // may come from void
setDocAction(DOCACTION_None);
@ -842,6 +876,16 @@ public class MInventory extends X_M_Inventory implements DocAction
public boolean reverseAccrualIt()
{
log.info(toString());
// Before reverseAccrual
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL);
if (m_processMsg != null)
return false;
// After reverseAccrual
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSEACCRUAL);
if (m_processMsg != null)
return false;
return false;
} // reverseAccrualIt
@ -852,6 +896,16 @@ public class MInventory extends X_M_Inventory implements DocAction
public boolean reActivateIt()
{
log.info(toString());
// Before reActivate
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE);
if (m_processMsg != null)
return false;
// After reActivate
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REACTIVATE);
if (m_processMsg != null)
return false;
return false;
} // reActivateIt

View File

@ -1390,6 +1390,10 @@ public class MInvoice extends X_C_Invoice implements DocAction
}
}
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_PREPARE);
if (m_processMsg != null)
return DocAction.STATUS_Invalid;
// Add up Amounts
m_justPrepared = true;
if (!DOCACTION_Complete.equals(getDocAction()))
@ -1598,6 +1602,11 @@ public class MInvoice extends X_C_Invoice implements DocAction
if (!DocAction.STATUS_InProgress.equals(status))
return status;
}
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
if (m_processMsg != null)
return DocAction.STATUS_Invalid;
// Implicit Approval
if (!isApproved())
approveIt();
@ -1898,6 +1907,11 @@ public class MInvoice extends X_C_Invoice implements DocAction
public boolean voidIt()
{
log.info(toString());
// Before Void
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID);
if (m_processMsg != null)
return false;
if (DOCSTATUS_Closed.equals(getDocStatus())
|| DOCSTATUS_Reversed.equals(getDocStatus())
|| DOCSTATUS_Voided.equals(getDocStatus()))
@ -1947,6 +1961,11 @@ public class MInvoice extends X_C_Invoice implements DocAction
return reverseCorrectIt();
}
// After Void
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_VOID);
if (m_processMsg != null)
return false;
setProcessed(true);
setDocAction(DOCACTION_None);
return true;
@ -1959,6 +1978,16 @@ public class MInvoice extends X_C_Invoice implements DocAction
public boolean closeIt()
{
log.info(toString());
// Before Close
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE);
if (m_processMsg != null)
return false;
// After Close
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_CLOSE);
if (m_processMsg != null)
return false;
setProcessed(true);
setDocAction(DOCACTION_None);
return true;
@ -1971,6 +2000,11 @@ public class MInvoice extends X_C_Invoice implements DocAction
public boolean reverseCorrectIt()
{
log.info(toString());
// Before reverseCorrect
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT);
if (m_processMsg != null)
return false;
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
if (!MPeriod.isOpen(getCtx(), getDateAcct(), dt.getDocBaseType()))
{
@ -2101,6 +2135,10 @@ public class MInvoice extends X_C_Invoice implements DocAction
if (alloc.processIt(DocAction.ACTION_Complete))
alloc.save();
}
// After reverseCorrect
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSECORRECT);
if (m_processMsg != null)
return false;
return true;
} // reverseCorrectIt
@ -2112,6 +2150,16 @@ public class MInvoice extends X_C_Invoice implements DocAction
public boolean reverseAccrualIt()
{
log.info(toString());
// Before reverseAccrual
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL);
if (m_processMsg != null)
return false;
// After reverseAccrual
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSEACCRUAL);
if (m_processMsg != null)
return false;
return false;
} // reverseAccrualIt
@ -2122,6 +2170,17 @@ public class MInvoice extends X_C_Invoice implements DocAction
public boolean reActivateIt()
{
log.info(toString());
// Before reActivate
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE);
if (m_processMsg != null)
return false;
// After reActivate
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REACTIVATE);
if (m_processMsg != null)
return false;
return false;
} // reActivateIt

View File

@ -479,6 +479,11 @@ public class MJournal extends X_GL_Journal implements DocAction
if (!DOCACTION_Complete.equals(getDocAction()))
setDocAction(DOCACTION_Complete);
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_PREPARE);
if (m_processMsg != null)
return DocAction.STATUS_Invalid;
m_justPrepared = true;
return DocAction.STATUS_InProgress;
} // prepareIt
@ -518,6 +523,11 @@ public class MJournal extends X_GL_Journal implements DocAction
if (!DocAction.STATUS_InProgress.equals(status))
return status;
}
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
if (m_processMsg != null)
return DocAction.STATUS_Invalid;
// Implicit Approval
if (!isApproved())
approveIt();
@ -542,14 +552,28 @@ public class MJournal extends X_GL_Journal implements DocAction
public boolean voidIt()
{
log.info(toString());
// Before Void
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID);
if (m_processMsg != null)
return false;
boolean ok_to_void = false;
if (DOCSTATUS_Drafted.equals(getDocStatus())
|| DOCSTATUS_Invalid.equals(getDocStatus()))
{
setProcessed(true);
setDocAction(DOCACTION_None);
return true;
ok_to_void = true;
} else {
return false;
}
return false;
// After Void
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_VOID);
if (m_processMsg != null)
return false;
return ok_to_void;
} // voidIt
/**
@ -560,13 +584,27 @@ public class MJournal extends X_GL_Journal implements DocAction
public boolean closeIt()
{
log.info(toString());
// Before Close
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE);
if (m_processMsg != null)
return false;
boolean ok_to_close = false;
if (DOCSTATUS_Completed.equals(getDocStatus()))
{
setProcessed(true);
setDocAction(DOCACTION_None);
return true;
ok_to_close = true;
} else {
return false;
}
return false;
// After Close
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_CLOSE);
if (m_processMsg != null)
return false;
return ok_to_close;
} // closeIt
/**
@ -576,7 +614,22 @@ public class MJournal extends X_GL_Journal implements DocAction
*/
public boolean reverseCorrectIt()
{
return reverseCorrectIt(getGL_JournalBatch_ID()) != null;
// Before reverseCorrect
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT);
if (m_processMsg != null)
return false;
boolean ok_correct = (reverseCorrectIt(getGL_JournalBatch_ID()) != null);
if (! ok_correct)
return false;
// After reverseCorrect
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSECORRECT);
if (m_processMsg != null)
return false;
return ok_correct;
} // reverseCorrectIt
/**
@ -615,7 +668,22 @@ public class MJournal extends X_GL_Journal implements DocAction
*/
public boolean reverseAccrualIt()
{
return reverseAccrualIt (getGL_JournalBatch_ID()) != null;
// Before reverseAccrual
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL);
if (m_processMsg != null)
return false;
boolean ok_reverse = (reverseAccrualIt (getGL_JournalBatch_ID()) != null);
if (! ok_reverse)
return false;
// After reverseAccrual
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSEACCRUAL);
if (m_processMsg != null)
return false;
return ok_reverse;
} // reverseAccrualIt
/**
@ -658,6 +726,16 @@ public class MJournal extends X_GL_Journal implements DocAction
public boolean reActivateIt()
{
log.info(toString());
// Before reActivate
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE);
if (m_processMsg != null)
return false;
// After reActivate
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REACTIVATE);
if (m_processMsg != null)
return false;
return false;
} // reActivateIt

View File

@ -377,6 +377,10 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction
}
}
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_PREPARE);
if (m_processMsg != null)
return DocAction.STATUS_Invalid;
// Add up Amounts
m_justPrepared = true;
return DocAction.STATUS_InProgress;
@ -418,6 +422,11 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction
if (!DocAction.STATUS_InProgress.equals(status))
return status;
}
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
if (m_processMsg != null)
return DocAction.STATUS_Invalid;
// Implicit Approval
approveIt();
@ -481,6 +490,15 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction
public boolean voidIt()
{
log.info("voidIt - " + toString());
// Before Void
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID);
if (m_processMsg != null)
return false;
// After Void
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_VOID);
if (m_processMsg != null)
return false;
return false;
} // voidIt
@ -491,6 +509,11 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction
public boolean closeIt()
{
log.info("closeIt - " + toString());
// Before Close
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE);
if (m_processMsg != null)
return false;
MJournal[] journals = getJournals(true);
for (int i = 0; i < journals.length; i++)
{
@ -526,6 +549,11 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction
journal.save();
}
}
// After Close
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_CLOSE);
if (m_processMsg != null)
return false;
return true;
} // closeIt
@ -537,6 +565,11 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction
public boolean reverseCorrectIt()
{
log.info("reverseCorrectIt - " + toString());
// Before reverseCorrect
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT);
if (m_processMsg != null)
return false;
MJournal[] journals = getJournals(true);
// check prerequisites
for (int i = 0; i < journals.length; i++)
@ -582,6 +615,11 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction
}
journal.save();
}
// After reverseCorrect
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSECORRECT);
if (m_processMsg != null)
return false;
return true;
} // reverseCorrectionIt
@ -593,6 +631,11 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction
public boolean reverseAccrualIt()
{
log.info("reverseAccrualIt - " + toString());
// Before reverseAccrual
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL);
if (m_processMsg != null)
return false;
MJournal[] journals = getJournals(true);
// check prerequisites
for (int i = 0; i < journals.length; i++)
@ -636,6 +679,11 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction
}
journal.save();
}
// After reverseAccrual
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSEACCRUAL);
if (m_processMsg != null)
return false;
return true;
} // reverseAccrualIt
@ -646,10 +694,22 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction
public boolean reActivateIt()
{
log.info("reActivateIt - " + toString());
// Before reActivate
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE);
if (m_processMsg != null)
return false;
// setProcessed(false);
if (reverseCorrectIt())
return true;
return false;
if (! reverseCorrectIt())
return false;
// After reActivate
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REACTIVATE);
if (m_processMsg != null)
return false;
return true;
} // reActivateIt

View File

@ -324,6 +324,10 @@ public class MMovement extends X_M_Movement implements DocAction
// Confirmation
if (dt.isInTransit())
createConfirmation();
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_PREPARE);
if (m_processMsg != null)
return DocAction.STATUS_Invalid;
m_justPrepared = true;
if (!DOCACTION_Complete.equals(getDocAction()))
@ -380,6 +384,10 @@ public class MMovement extends X_M_Movement implements DocAction
return status;
}
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
if (m_processMsg != null)
return DocAction.STATUS_Invalid;
// Outstanding (not processed) Incoming Confirmations ?
MMovementConfirm[] confirmations = getConfirmations(true);
for (int i = 0; i < confirmations.length; i++)
@ -630,6 +638,11 @@ public class MMovement extends X_M_Movement implements DocAction
public boolean voidIt()
{
log.info(toString());
// Before Void
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID);
if (m_processMsg != null)
return false;
if (DOCSTATUS_Closed.equals(getDocStatus())
|| DOCSTATUS_Reversed.equals(getDocStatus())
|| DOCSTATUS_Voided.equals(getDocStatus()))
@ -663,6 +676,10 @@ public class MMovement extends X_M_Movement implements DocAction
{
return reverseCorrectIt();
}
// After Void
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_VOID);
if (m_processMsg != null)
return false;
setProcessed(true);
setDocAction(DOCACTION_None);
@ -676,6 +693,15 @@ public class MMovement extends X_M_Movement implements DocAction
public boolean closeIt()
{
log.info(toString());
// Before Close
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE);
if (m_processMsg != null)
return false;
// After Close
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_CLOSE);
if (m_processMsg != null)
return false;
// Close Not delivered Qty
setDocAction(DOCACTION_None);
@ -689,6 +715,11 @@ public class MMovement extends X_M_Movement implements DocAction
public boolean reverseCorrectIt()
{
log.info(toString());
// Before reverseCorrect
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT);
if (m_processMsg != null)
return false;
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
if (!MPeriod.isOpen(getCtx(), getMovementDate(), dt.getDocBaseType()))
{
@ -744,6 +775,11 @@ public class MMovement extends X_M_Movement implements DocAction
reversal.save();
m_processMsg = reversal.getDocumentNo();
// After reverseCorrect
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSECORRECT);
if (m_processMsg != null)
return false;
// Update Reversed (this)
addDescription("(" + reversal.getDocumentNo() + "<-)");
setProcessed(true);
@ -760,6 +796,16 @@ public class MMovement extends X_M_Movement implements DocAction
public boolean reverseAccrualIt()
{
log.info(toString());
// Before reverseAccrual
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL);
if (m_processMsg != null)
return false;
// After reverseAccrual
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSEACCRUAL);
if (m_processMsg != null)
return false;
return false;
} // reverseAccrualIt
@ -770,6 +816,16 @@ public class MMovement extends X_M_Movement implements DocAction
public boolean reActivateIt()
{
log.info(toString());
// Before reActivate
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE);
if (m_processMsg != null)
return false;
// After reActivate
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REACTIVATE);
if (m_processMsg != null)
return false;
return false;
} // reActivateIt

View File

@ -305,13 +305,10 @@ public class MMovementConfirm extends X_M_MovementConfirm implements DocAction
break;
}
}
// User Validation
String valid = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_COMPLETE);
if (valid != null)
{
m_processMsg = valid;
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_PREPARE);
if (m_processMsg != null)
return DocAction.STATUS_Invalid;
}
//
m_justPrepared = true;
@ -355,6 +352,11 @@ public class MMovementConfirm extends X_M_MovementConfirm implements DocAction
if (!DocAction.STATUS_InProgress.equals(status))
return status;
}
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
if (m_processMsg != null)
return DocAction.STATUS_Invalid;
// Implicit Approval
if (!isApproved())
approveIt();
@ -401,6 +403,14 @@ public class MMovementConfirm extends X_M_MovementConfirm implements DocAction
+ ": " + m_inventoryInfo);
}
// User Validation
String valid = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_COMPLETE);
if (valid != null)
{
m_processMsg = valid;
return DocAction.STATUS_Invalid;
}
setProcessed(true);
setDocAction(DOCACTION_Close);
return DocAction.STATUS_Completed;
@ -511,6 +521,15 @@ public class MMovementConfirm extends X_M_MovementConfirm implements DocAction
public boolean voidIt()
{
log.info("voidIt - " + toString());
// Before Void
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID);
if (m_processMsg != null)
return false;
// After Void
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_VOID);
if (m_processMsg != null)
return false;
return false;
} // voidIt
@ -522,6 +541,15 @@ public class MMovementConfirm extends X_M_MovementConfirm implements DocAction
public boolean closeIt()
{
log.info("closeIt - " + toString());
// Before Close
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE);
if (m_processMsg != null)
return false;
// After Close
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_CLOSE);
if (m_processMsg != null)
return false;
// Close Not delivered Qty
setDocAction(DOCACTION_None);
@ -535,6 +563,16 @@ public class MMovementConfirm extends X_M_MovementConfirm implements DocAction
public boolean reverseCorrectIt()
{
log.info("reverseCorrectIt - " + toString());
// Before reverseCorrect
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT);
if (m_processMsg != null)
return false;
// After reverseCorrect
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSECORRECT);
if (m_processMsg != null)
return false;
return false;
} // reverseCorrectionIt
@ -545,6 +583,16 @@ public class MMovementConfirm extends X_M_MovementConfirm implements DocAction
public boolean reverseAccrualIt()
{
log.info("reverseAccrualIt - " + toString());
// Before reverseAccrual
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL);
if (m_processMsg != null)
return false;
// After reverseAccrual
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSEACCRUAL);
if (m_processMsg != null)
return false;
return false;
} // reverseAccrualIt
@ -555,6 +603,16 @@ public class MMovementConfirm extends X_M_MovementConfirm implements DocAction
public boolean reActivateIt()
{
log.info("reActivateIt - " + toString());
// Before reActivate
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE);
if (m_processMsg != null)
return false;
// After reActivate
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REACTIVATE);
if (m_processMsg != null)
return false;
return false;
} // reActivateIt

View File

@ -1341,6 +1341,10 @@ public class MOrder extends X_C_Order implements DocAction
}
}
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_PREPARE);
if (m_processMsg != null)
return DocAction.STATUS_Invalid;
m_justPrepared = true;
// if (!DOCACTION_Complete.equals(getDocAction())) don't set for just prepare
// setDocAction(DOCACTION_Complete);
@ -1634,7 +1638,7 @@ public class MOrder extends X_C_Order implements DocAction
{
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
String DocSubTypeSO = dt.getDocSubTypeSO();
// Just prepare
if (DOCACTION_Prepare.equals(getDocAction()))
{
@ -1648,6 +1652,9 @@ public class MOrder extends X_C_Order implements DocAction
// Binding
if (MDocType.DOCSUBTYPESO_Quotation.equals(DocSubTypeSO))
reserveStock(dt, getLines(true, "M_Product_ID"));
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
if (m_processMsg != null)
return DocAction.STATUS_Invalid;
setProcessed(true);
return DocAction.STATUS_Completed;
}
@ -1667,6 +1674,11 @@ public class MOrder extends X_C_Order implements DocAction
if (!DocAction.STATUS_InProgress.equals(status))
return status;
}
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
if (m_processMsg != null)
return DocAction.STATUS_Invalid;
// Implicit Approval
if (!isApproved())
approveIt();
@ -1963,8 +1975,13 @@ public class MOrder extends X_C_Order implements DocAction
*/
public boolean voidIt()
{
MOrderLine[] lines = getLines(true, "M_Product_ID");
log.info(toString());
// Before Void
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID);
if (m_processMsg != null)
return false;
MOrderLine[] lines = getLines(true, "M_Product_ID");
for (int i = 0; i < lines.length; i++)
{
MOrderLine line = lines[i];
@ -1988,6 +2005,11 @@ public class MOrder extends X_C_Order implements DocAction
if (!createReversals())
return false;
// After Void
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_VOID);
if (m_processMsg != null)
return false;
setProcessed(true);
setDocAction(DOCACTION_None);
return true;
@ -2085,6 +2107,10 @@ public class MOrder extends X_C_Order implements DocAction
public boolean closeIt()
{
log.info(toString());
// Before Close
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE);
if (m_processMsg != null)
return false;
// Close Not delivered Qty - SO/PO
MOrderLine[] lines = getLines(true, "M_Product_ID");
@ -2107,6 +2133,11 @@ public class MOrder extends X_C_Order implements DocAction
m_processMsg = "Cannot unreserve Stock (close)";
return false;
}
// After Close
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_CLOSE);
if (m_processMsg != null)
return false;
setProcessed(true);
setDocAction(DOCACTION_None);
return true;
@ -2119,6 +2150,16 @@ public class MOrder extends X_C_Order implements DocAction
public boolean reverseCorrectIt()
{
log.info(toString());
// Before reverseCorrect
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT);
if (m_processMsg != null)
return false;
// After reverseCorrect
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSECORRECT);
if (m_processMsg != null)
return false;
return voidIt();
} // reverseCorrectionIt
@ -2129,6 +2170,16 @@ public class MOrder extends X_C_Order implements DocAction
public boolean reverseAccrualIt()
{
log.info(toString());
// Before reverseAccrual
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL);
if (m_processMsg != null)
return false;
// After reverseAccrual
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSEACCRUAL);
if (m_processMsg != null)
return false;
return false;
} // reverseAccrualIt
@ -2139,6 +2190,12 @@ public class MOrder extends X_C_Order implements DocAction
public boolean reActivateIt()
{
log.info(toString());
// Before reActivate
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE);
if (m_processMsg != null)
return false;
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
String DocSubTypeSO = dt.getDocSubTypeSO();
@ -2178,6 +2235,10 @@ public class MOrder extends X_C_Order implements DocAction
{
log.info("Existing documents not modified - SubType=" + DocSubTypeSO);
}
// After reActivate
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REACTIVATE);
if (m_processMsg != null)
return false;
setDocAction(DOCACTION_Complete);
setProcessed(false);

View File

@ -1554,6 +1554,10 @@ public final class MPayment extends X_C_Payment
}
}
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_PREPARE);
if (m_processMsg != null)
return DocAction.STATUS_Invalid;
m_justPrepared = true;
if (!DOCACTION_Complete.equals(getDocAction()))
setDocAction(DOCACTION_Complete);
@ -1595,7 +1599,12 @@ public final class MPayment extends X_C_Payment
String status = prepareIt();
if (!DocAction.STATUS_InProgress.equals(status))
return status;
}
}
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
if (m_processMsg != null)
return DocAction.STATUS_Invalid;
// Implicit Approval
if (!isApproved())
approveIt();
@ -1994,6 +2003,11 @@ public final class MPayment extends X_C_Payment
public boolean voidIt()
{
log.info(toString());
// Before Void
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID);
if (m_processMsg != null)
return false;
if (DOCSTATUS_Closed.equals(getDocStatus())
|| DOCSTATUS_Reversed.equals(getDocStatus())
|| DOCSTATUS_Voided.equals(getDocStatus()))
@ -2026,6 +2040,11 @@ public final class MPayment extends X_C_Payment
return reverseCorrectIt();
//
// After Void
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_VOID);
if (m_processMsg != null)
return false;
setProcessed(true);
setDocAction(DOCACTION_None);
return true;
@ -2038,6 +2057,14 @@ public final class MPayment extends X_C_Payment
public boolean closeIt()
{
log.info(toString());
// Before Close
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE);
if (m_processMsg != null)
return false;
// After Close
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_CLOSE);
if (m_processMsg != null)
return false;
setDocAction(DOCACTION_None);
return true;
} // closeIt
@ -2049,6 +2076,10 @@ public final class MPayment extends X_C_Payment
public boolean reverseCorrectIt()
{
log.info(toString());
// Before reverseCorrect
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT);
if (m_processMsg != null)
return false;
// Std Period open?
Timestamp dateAcct = getDateAcct();
@ -2150,6 +2181,10 @@ public final class MPayment extends X_C_Payment
bp.setTotalOpenBalance();
bp.save(get_TrxName());
}
// After reverseCorrect
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSECORRECT);
if (m_processMsg != null)
return false;
m_processMsg = info.toString();
return true;
@ -2175,6 +2210,17 @@ public final class MPayment extends X_C_Payment
public boolean reverseAccrualIt()
{
log.info(toString());
// Before reverseAccrual
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL);
if (m_processMsg != null)
return false;
// After reverseAccrual
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSEACCRUAL);
if (m_processMsg != null)
return false;
return false;
} // reverseAccrualIt
@ -2185,9 +2231,20 @@ public final class MPayment extends X_C_Payment
public boolean reActivateIt()
{
log.info(toString());
if (reverseCorrectIt())
return true;
return false;
// Before reActivate
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE);
if (m_processMsg != null)
return false;
if (! reverseCorrectIt())
return false;
// After reActivate
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REACTIVATE);
if (m_processMsg != null)
return false;
return true;
} // reActivateIt
/**

View File

@ -1,5 +1,5 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
@ -284,6 +284,10 @@ public class MRMA extends X_M_RMA implements DocAction
}
setAmt(amt);
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_PREPARE);
if (m_processMsg != null)
return DocAction.STATUS_Invalid;
m_justPrepared = true;
return DocAction.STATUS_InProgress;
} // prepareIt
@ -323,6 +327,11 @@ public class MRMA extends X_M_RMA implements DocAction
if (!DocAction.STATUS_InProgress.equals(status))
return status;
}
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
if (m_processMsg != null)
return DocAction.STATUS_Invalid;
// Implicit Approval
if (!isApproved())
approveIt();
@ -353,6 +362,15 @@ public class MRMA extends X_M_RMA implements DocAction
public boolean voidIt()
{
log.info("voidIt - " + toString());
// Before Void
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID);
if (m_processMsg != null)
return false;
// After Void
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_VOID);
if (m_processMsg != null)
return false;
// Revoke Credit
return false;
} // voidIt
@ -365,6 +383,15 @@ public class MRMA extends X_M_RMA implements DocAction
public boolean closeIt()
{
log.info("closeIt - " + toString());
// Before Close
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE);
if (m_processMsg != null)
return false;
// After Close
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_CLOSE);
if (m_processMsg != null)
return false;
return true;
} // closeIt
@ -375,6 +402,16 @@ public class MRMA extends X_M_RMA implements DocAction
public boolean reverseCorrectIt()
{
log.info("reverseCorrectIt - " + toString());
// Before reverseCorrect
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT);
if (m_processMsg != null)
return false;
// After reverseCorrect
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSECORRECT);
if (m_processMsg != null)
return false;
return false;
} // reverseCorrectionIt
@ -385,6 +422,16 @@ public class MRMA extends X_M_RMA implements DocAction
public boolean reverseAccrualIt()
{
log.info("reverseAccrualIt - " + toString());
// Before reverseAccrual
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL);
if (m_processMsg != null)
return false;
// After reverseAccrual
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSEACCRUAL);
if (m_processMsg != null)
return false;
return false;
} // reverseAccrualIt
@ -395,6 +442,16 @@ public class MRMA extends X_M_RMA implements DocAction
public boolean reActivateIt()
{
log.info("reActivateIt - " + toString());
// Before reActivate
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE);
if (m_processMsg != null)
return false;
// After reActivate
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REACTIVATE);
if (m_processMsg != null)
return false;
return false;
} // reActivateIt

View File

@ -275,6 +275,11 @@ public class MRequisition extends X_M_Requisition implements DocAction
setTotalLines(totalLines);
save();
}
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_PREPARE);
if (m_processMsg != null)
return DocAction.STATUS_Invalid;
m_justPrepared = true;
return DocAction.STATUS_InProgress;
} // prepareIt
@ -314,6 +319,11 @@ public class MRequisition extends X_M_Requisition implements DocAction
if (!DocAction.STATUS_InProgress.equals(status))
return status;
}
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
if (m_processMsg != null)
return DocAction.STATUS_Invalid;
// Implicit Approval
if (!isApproved())
approveIt();
@ -340,7 +350,20 @@ public class MRequisition extends X_M_Requisition implements DocAction
public boolean voidIt()
{
log.info("voidIt - " + toString());
return closeIt();
// Before Void
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID);
if (m_processMsg != null)
return false;
if (!closeIt())
return false;
// After Void
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_VOID);
if (m_processMsg != null)
return false;
return true;
} // voidIt
/**
@ -351,6 +374,11 @@ public class MRequisition extends X_M_Requisition implements DocAction
public boolean closeIt()
{
log.info("closeIt - " + toString());
// Before Close
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE);
if (m_processMsg != null)
return false;
// Close Not delivered Qty
MRequisitionLine[] lines = getLines();
BigDecimal totalLines = Env.ZERO;
@ -384,6 +412,11 @@ public class MRequisition extends X_M_Requisition implements DocAction
setTotalLines(totalLines);
save();
}
// After Close
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_CLOSE);
if (m_processMsg != null)
return false;
return true;
} // closeIt
@ -394,6 +427,16 @@ public class MRequisition extends X_M_Requisition implements DocAction
public boolean reverseCorrectIt()
{
log.info("reverseCorrectIt - " + toString());
// Before reverseCorrect
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT);
if (m_processMsg != null)
return false;
// After reverseCorrect
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSECORRECT);
if (m_processMsg != null)
return false;
return false;
} // reverseCorrectionIt
@ -404,6 +447,16 @@ public class MRequisition extends X_M_Requisition implements DocAction
public boolean reverseAccrualIt()
{
log.info("reverseAccrualIt - " + toString());
// Before reverseAccrual
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL);
if (m_processMsg != null)
return false;
// After reverseAccrual
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSEACCRUAL);
if (m_processMsg != null)
return false;
return false;
} // reverseAccrualIt
@ -414,10 +467,21 @@ public class MRequisition extends X_M_Requisition implements DocAction
public boolean reActivateIt()
{
log.info("reActivateIt - " + toString());
// Before reActivate
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE);
if (m_processMsg != null)
return false;
// setProcessed(false);
if (reverseCorrectIt())
return true;
return false;
if (! reverseCorrectIt())
return false;
// After reActivate
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REACTIVATE);
if (m_processMsg != null)
return false;
return true;
} // reActivateIt
/*************************************************************************

View File

@ -1,5 +1,5 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
@ -325,6 +325,10 @@ public class MTimeExpense extends X_S_TimeExpense implements DocAction
}
}
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_PREPARE);
if (m_processMsg != null)
return DocAction.STATUS_Invalid;
m_justPrepared = true;
if (!DOCACTION_Complete.equals(getDocAction()))
setDocAction(DOCACTION_Complete);
@ -366,6 +370,11 @@ public class MTimeExpense extends X_S_TimeExpense implements DocAction
if (!DocAction.STATUS_InProgress.equals(status))
return status;
}
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
if (m_processMsg != null)
return DocAction.STATUS_Invalid;
// Implicit Approval
if (!isApproved())
approveIt();
@ -393,7 +402,21 @@ public class MTimeExpense extends X_S_TimeExpense implements DocAction
public boolean voidIt()
{
log.info("voidIt - " + toString());
return closeIt();
// Before Void
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID);
if (m_processMsg != null)
return false;
if (!closeIt())
return false;
// After Void
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_VOID);
if (m_processMsg != null)
return false;
return true;
} // voidIt
/**
@ -404,6 +427,14 @@ public class MTimeExpense extends X_S_TimeExpense implements DocAction
public boolean closeIt()
{
log.info("closeIt - " + toString());
// Before Close
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_CLOSE);
if (m_processMsg != null)
return false;
// After Close
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_CLOSE);
if (m_processMsg != null)
return false;
// Close Not delivered Qty
// setDocAction(DOCACTION_None);
@ -417,6 +448,16 @@ public class MTimeExpense extends X_S_TimeExpense implements DocAction
public boolean reverseCorrectIt()
{
log.info("reverseCorrectIt - " + toString());
// Before reverseCorrect
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT);
if (m_processMsg != null)
return false;
// After reverseCorrect
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSECORRECT);
if (m_processMsg != null)
return false;
return false;
} // reverseCorrectionIt
@ -427,6 +468,16 @@ public class MTimeExpense extends X_S_TimeExpense implements DocAction
public boolean reverseAccrualIt()
{
log.info("reverseAccrualIt - " + toString());
// Before reverseAccrual
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL);
if (m_processMsg != null)
return false;
// After reverseAccrual
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSEACCRUAL);
if (m_processMsg != null)
return false;
return false;
} // reverseAccrualIt
@ -437,6 +488,16 @@ public class MTimeExpense extends X_S_TimeExpense implements DocAction
public boolean reActivateIt()
{
log.info("reActivateIt - " + toString());
// Before reActivate
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE);
if (m_processMsg != null)
return false;
// After reActivate
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REACTIVATE);
if (m_processMsg != null)
return false;
// setProcessed(false);
return false;
} // reActivateIt

View File

@ -1,5 +1,5 @@
/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution *
* Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published *
@ -13,6 +13,7 @@
* For the text or an alternative of this public license, you may reach us *
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
* or via info@compiere.org or http://www.compiere.org/license.html *
* Contributor(s) : Layda Salas - globalqss *
*****************************************************************************/
package org.compiere.model;
@ -21,6 +22,8 @@ package org.compiere.model;
*
* @author Jorg Janke
* @version $Id: ModelValidator.java,v 1.2 2006/07/30 00:58:18 jjanke Exp $
*
* 2007/02/26 laydasalasc - globalqss - Add new timings for all before/after events on documents
*/
public interface ModelValidator
{
@ -34,13 +37,37 @@ public interface ModelValidator
public static final int TYPE_DELETE = 3;
public static final int CHANGETYPE_DELETE = 3;
/** Called before document is prepared */
public static final int TIMING_BEFORE_PREPARE = 1;
public static final int DOCTIMING_BEFORE_PREPARE = 1;
/** Called after document is processed */
public static final int TIMING_AFTER_COMPLETE = 9;
public static final int DOCTIMING_AFTER_COMPLETE = 9;
/** Called before document is prepared */
public static final int TIMING_BEFORE_PREPARE = 1;
public static final int DOCTIMING_BEFORE_PREPARE = 1; // Compatibility with Compiere 260c
/** Called before document is void */
public static final int TIMING_BEFORE_VOID = 2;
/** Called before document is close */
public static final int TIMING_BEFORE_CLOSE = 3;
/** Called before document is reactivate */
public static final int TIMING_BEFORE_REACTIVATE = 4;
/** Called before document is reversecorrect */
public static final int TIMING_BEFORE_REVERSECORRECT = 5;
/** Called before document is reverseaccrual */
public static final int TIMING_BEFORE_REVERSEACCRUAL = 6;
/** Called before document is completed */
public static final int TIMING_BEFORE_COMPLETE = 7;
/** Called after document is prepared */
public static final int TIMING_AFTER_PREPARE = 8;
/** Called after document is completed */
public static final int TIMING_AFTER_COMPLETE = 9;
public static final int DOCTIMING_AFTER_COMPLETE = 9; // Compatibility with Compiere 260c
/** Called after document is void */
public static final int TIMING_AFTER_VOID = 10;
/** Called after document is closed */
public static final int TIMING_AFTER_CLOSE = 11;
/** Called after document is reactivated */
public static final int TIMING_AFTER_REACTIVATE = 12;
/** Called after document is reversecorrect */
public static final int TIMING_AFTER_REVERSECORRECT = 13;
/** Called after document is reverseaccrual */
public static final int TIMING_AFTER_REVERSEACCRUAL = 14;
/**
* Initialize Validation
* @param engine validation engine
@ -89,5 +116,5 @@ public interface ModelValidator
* if not null, the pocument will be marked as Invalid.
*/
public String docValidate (PO po, int timing);
} // ModelValidator