IDEMPIERE-2578 / IDEMPIERE-1715
This commit is contained in:
parent
5e37d9aee4
commit
804116fe13
|
@ -545,6 +545,12 @@ public class MProduction extends X_M_Production implements DocAction {
|
|||
|
||||
@Override
|
||||
public boolean voidIt() {
|
||||
if (log.isLoggable(Level.INFO)) 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()))
|
||||
|
@ -595,6 +601,11 @@ public class MProduction extends X_M_Production 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;
|
||||
|
@ -752,8 +763,8 @@ public class MProduction extends X_M_Production implements DocAction {
|
|||
@Override
|
||||
public boolean reverseAccrualIt() {
|
||||
if (log.isLoggable(Level.INFO)) log.info(toString());
|
||||
// Before reverseCorrect
|
||||
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT);
|
||||
// Before reverseAccrual
|
||||
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL);
|
||||
if (m_processMsg != null)
|
||||
return false;
|
||||
|
||||
|
@ -761,8 +772,8 @@ public class MProduction extends X_M_Production implements DocAction {
|
|||
if (reversal == null)
|
||||
return false;
|
||||
|
||||
// After reverseCorrect
|
||||
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSECORRECT);
|
||||
// After reverseAccrual
|
||||
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSEACCRUAL);
|
||||
if (m_processMsg != null)
|
||||
return false;
|
||||
|
||||
|
@ -773,7 +784,17 @@ public class MProduction extends X_M_Production implements DocAction {
|
|||
|
||||
@Override
|
||||
public boolean reActivateIt() {
|
||||
throw new UnsupportedOperationException();
|
||||
if (log.isLoggable(Level.INFO)) 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;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue