IDEMPIERE-2287 Overwrite Date on Complete - doesn't update dateacct / move call to setDefiniteDocumentNo to the beginning of completeIt (just after prepareIt)
This commit is contained in:
parent
e875d72fb0
commit
0eb7daffcb
|
@ -132,6 +132,8 @@ implements DocAction
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set the definite document number after completed (if needed)
|
||||||
|
//setDefiniteDocumentNo();
|
||||||
|
|
||||||
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
|
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
|
||||||
if (m_processMsg != null)
|
if (m_processMsg != null)
|
||||||
|
@ -157,9 +159,6 @@ implements DocAction
|
||||||
return DocAction.STATUS_Invalid;
|
return DocAction.STATUS_Invalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the definite document number after completed (if needed)
|
|
||||||
//setDefiniteDocumentNo();
|
|
||||||
|
|
||||||
setProcessed(true);
|
setProcessed(true);
|
||||||
setDocAction(DOCACTION_Close);
|
setDocAction(DOCACTION_Close);
|
||||||
return DocAction.STATUS_Completed;
|
return DocAction.STATUS_Completed;
|
||||||
|
|
|
@ -195,6 +195,8 @@ implements DocAction
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set the definite document number after completed (if needed)
|
||||||
|
//setDefiniteDocumentNo();
|
||||||
|
|
||||||
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
|
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
|
||||||
if (m_processMsg != null)
|
if (m_processMsg != null)
|
||||||
|
@ -224,9 +226,6 @@ implements DocAction
|
||||||
return DocAction.STATUS_Invalid;
|
return DocAction.STATUS_Invalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the definite document number after completed (if needed)
|
|
||||||
//setDefiniteDocumentNo();
|
|
||||||
|
|
||||||
setProcessed(true);
|
setProcessed(true);
|
||||||
setDocAction(DOCACTION_Close);
|
setDocAction(DOCACTION_Close);
|
||||||
return DocAction.STATUS_Completed;
|
return DocAction.STATUS_Completed;
|
||||||
|
|
|
@ -1256,6 +1256,9 @@ public class MInOut extends X_M_InOut implements DocAction
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set the definite document number after completed (if needed)
|
||||||
|
setDefiniteDocumentNo();
|
||||||
|
|
||||||
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
|
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
|
||||||
if (m_processMsg != null)
|
if (m_processMsg != null)
|
||||||
return DocAction.STATUS_Invalid;
|
return DocAction.STATUS_Invalid;
|
||||||
|
@ -1652,9 +1655,6 @@ public class MInOut extends X_M_InOut implements DocAction
|
||||||
return DocAction.STATUS_Invalid;
|
return DocAction.STATUS_Invalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the definite document number after completed (if needed)
|
|
||||||
setDefiniteDocumentNo();
|
|
||||||
|
|
||||||
m_processMsg = info.toString();
|
m_processMsg = info.toString();
|
||||||
setProcessed(true);
|
setProcessed(true);
|
||||||
setDocAction(DOCACTION_Close);
|
setDocAction(DOCACTION_Close);
|
||||||
|
|
|
@ -390,6 +390,9 @@ public class MInventory extends X_M_Inventory implements DocAction
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set the definite document number after completed (if needed)
|
||||||
|
setDefiniteDocumentNo();
|
||||||
|
|
||||||
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
|
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
|
||||||
if (m_processMsg != null)
|
if (m_processMsg != null)
|
||||||
return DocAction.STATUS_Invalid;
|
return DocAction.STATUS_Invalid;
|
||||||
|
@ -579,9 +582,6 @@ public class MInventory extends X_M_Inventory implements DocAction
|
||||||
return DocAction.STATUS_Invalid;
|
return DocAction.STATUS_Invalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the definite document number after completed (if needed)
|
|
||||||
setDefiniteDocumentNo();
|
|
||||||
|
|
||||||
//
|
//
|
||||||
setProcessed(true);
|
setProcessed(true);
|
||||||
setDocAction(DOCACTION_Close);
|
setDocAction(DOCACTION_Close);
|
||||||
|
|
|
@ -1692,6 +1692,9 @@ public class MInvoice extends X_C_Invoice implements DocAction
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set the definite document number after completed (if needed)
|
||||||
|
setDefiniteDocumentNo();
|
||||||
|
|
||||||
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
|
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
|
||||||
if (m_processMsg != null)
|
if (m_processMsg != null)
|
||||||
return DocAction.STATUS_Invalid;
|
return DocAction.STATUS_Invalid;
|
||||||
|
@ -2086,9 +2089,6 @@ public class MInvoice extends X_C_Invoice implements DocAction
|
||||||
return DocAction.STATUS_Invalid;
|
return DocAction.STATUS_Invalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the definite document number after completed (if needed)
|
|
||||||
setDefiniteDocumentNo();
|
|
||||||
|
|
||||||
// Counter Documents
|
// Counter Documents
|
||||||
MInvoice counter = createCounterDoc();
|
MInvoice counter = createCounterDoc();
|
||||||
if (counter != null)
|
if (counter != null)
|
||||||
|
@ -2120,7 +2120,7 @@ public class MInvoice extends X_C_Invoice implements DocAction
|
||||||
setDateInvoiced(new Timestamp (System.currentTimeMillis()));
|
setDateInvoiced(new Timestamp (System.currentTimeMillis()));
|
||||||
if (getDateAcct().before(getDateInvoiced())) {
|
if (getDateAcct().before(getDateInvoiced())) {
|
||||||
setDateAcct(getDateInvoiced());
|
setDateAcct(getDateInvoiced());
|
||||||
MPeriod.testPeriodOpen(getCtx(), getDateAcct(), getC_DocTypeTarget_ID(), getAD_Org_ID());
|
MPeriod.testPeriodOpen(getCtx(), getDateAcct(), getC_DocType_ID(), getAD_Org_ID());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (dt.isOverwriteSeqOnComplete()) {
|
if (dt.isOverwriteSeqOnComplete()) {
|
||||||
|
|
|
@ -594,6 +594,9 @@ public class MJournal extends X_GL_Journal implements DocAction
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set the definite document number after completed (if needed)
|
||||||
|
setDefiniteDocumentNo();
|
||||||
|
|
||||||
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
|
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
|
||||||
if (m_processMsg != null)
|
if (m_processMsg != null)
|
||||||
return DocAction.STATUS_Invalid;
|
return DocAction.STATUS_Invalid;
|
||||||
|
@ -610,9 +613,6 @@ public class MJournal extends X_GL_Journal implements DocAction
|
||||||
return DocAction.STATUS_Invalid;
|
return DocAction.STATUS_Invalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the definite document number after completed (if needed)
|
|
||||||
setDefiniteDocumentNo();
|
|
||||||
|
|
||||||
//
|
//
|
||||||
setProcessed(true);
|
setProcessed(true);
|
||||||
setDocAction(DOCACTION_Close);
|
setDocAction(DOCACTION_Close);
|
||||||
|
|
|
@ -439,6 +439,9 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set the definite document number after completed (if needed)
|
||||||
|
setDefiniteDocumentNo();
|
||||||
|
|
||||||
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
|
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
|
||||||
if (m_processMsg != null)
|
if (m_processMsg != null)
|
||||||
return DocAction.STATUS_Invalid;
|
return DocAction.STATUS_Invalid;
|
||||||
|
@ -494,9 +497,6 @@ public class MJournalBatch extends X_GL_JournalBatch implements DocAction
|
||||||
return DocAction.STATUS_Invalid;
|
return DocAction.STATUS_Invalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the definite document number after completed (if needed)
|
|
||||||
setDefiniteDocumentNo();
|
|
||||||
|
|
||||||
//
|
//
|
||||||
setProcessed(true);
|
setProcessed(true);
|
||||||
setDocAction(DOCACTION_Close);
|
setDocAction(DOCACTION_Close);
|
||||||
|
|
|
@ -354,6 +354,9 @@ public class MMovement extends X_M_Movement implements DocAction
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set the definite document number after completed (if needed)
|
||||||
|
setDefiniteDocumentNo();
|
||||||
|
|
||||||
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
|
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
|
||||||
if (m_processMsg != null)
|
if (m_processMsg != null)
|
||||||
return DocAction.STATUS_Invalid;
|
return DocAction.STATUS_Invalid;
|
||||||
|
@ -532,9 +535,6 @@ public class MMovement extends X_M_Movement implements DocAction
|
||||||
return DocAction.STATUS_Invalid;
|
return DocAction.STATUS_Invalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the definite document number after completed (if needed)
|
|
||||||
setDefiniteDocumentNo();
|
|
||||||
|
|
||||||
//
|
//
|
||||||
setProcessed(true);
|
setProcessed(true);
|
||||||
setDocAction(DOCACTION_Close);
|
setDocAction(DOCACTION_Close);
|
||||||
|
|
|
@ -1869,6 +1869,10 @@ public class MOrder extends X_C_Order implements DocAction
|
||||||
setProcessed(false);
|
setProcessed(false);
|
||||||
return DocAction.STATUS_InProgress;
|
return DocAction.STATUS_InProgress;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set the definite document number after completed (if needed)
|
||||||
|
setDefiniteDocumentNo();
|
||||||
|
|
||||||
// Offers
|
// Offers
|
||||||
if (MDocType.DOCSUBTYPESO_Proposal.equals(DocSubTypeSO)
|
if (MDocType.DOCSUBTYPESO_Proposal.equals(DocSubTypeSO)
|
||||||
|| MDocType.DOCSUBTYPESO_Quotation.equals(DocSubTypeSO))
|
|| MDocType.DOCSUBTYPESO_Quotation.equals(DocSubTypeSO))
|
||||||
|
@ -1882,8 +1886,6 @@ public class MOrder extends X_C_Order implements DocAction
|
||||||
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_COMPLETE);
|
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_COMPLETE);
|
||||||
if (m_processMsg != null)
|
if (m_processMsg != null)
|
||||||
return DocAction.STATUS_Invalid;
|
return DocAction.STATUS_Invalid;
|
||||||
// Set the definite document number after completed (if needed)
|
|
||||||
setDefiniteDocumentNo();
|
|
||||||
setProcessed(true);
|
setProcessed(true);
|
||||||
return DocAction.STATUS_Completed;
|
return DocAction.STATUS_Completed;
|
||||||
}
|
}
|
||||||
|
@ -1987,9 +1989,6 @@ public class MOrder extends X_C_Order implements DocAction
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the definite document number after completed (if needed)
|
|
||||||
setDefiniteDocumentNo();
|
|
||||||
|
|
||||||
setProcessed(true);
|
setProcessed(true);
|
||||||
m_processMsg = info.toString();
|
m_processMsg = info.toString();
|
||||||
//
|
//
|
||||||
|
@ -2130,7 +2129,7 @@ public class MOrder extends X_C_Order implements DocAction
|
||||||
setDateOrdered(new Timestamp (System.currentTimeMillis()));
|
setDateOrdered(new Timestamp (System.currentTimeMillis()));
|
||||||
if (getDateAcct().before(getDateOrdered())) {
|
if (getDateAcct().before(getDateOrdered())) {
|
||||||
setDateAcct(getDateOrdered());
|
setDateAcct(getDateOrdered());
|
||||||
MPeriod.testPeriodOpen(getCtx(), getDateAcct(), getC_DocTypeTarget_ID(), getAD_Org_ID());
|
MPeriod.testPeriodOpen(getCtx(), getDateAcct(), getC_DocType_ID(), getAD_Org_ID());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1944,6 +1944,9 @@ public class MPayment extends X_C_Payment
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set the definite document number after completed (if needed)
|
||||||
|
setDefiniteDocumentNo();
|
||||||
|
|
||||||
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
|
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
|
||||||
if (m_processMsg != null)
|
if (m_processMsg != null)
|
||||||
return DocAction.STATUS_Invalid;
|
return DocAction.STATUS_Invalid;
|
||||||
|
@ -2078,9 +2081,6 @@ public class MPayment extends X_C_Payment
|
||||||
return DocAction.STATUS_Invalid;
|
return DocAction.STATUS_Invalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the definite document number after completed (if needed)
|
|
||||||
setDefiniteDocumentNo();
|
|
||||||
|
|
||||||
//
|
//
|
||||||
setProcessed(true);
|
setProcessed(true);
|
||||||
setDocAction(DOCACTION_Close);
|
setDocAction(DOCACTION_Close);
|
||||||
|
|
|
@ -430,6 +430,9 @@ public class MRMA extends X_M_RMA implements DocAction
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set the definite document number after completed (if needed)
|
||||||
|
setDefiniteDocumentNo();
|
||||||
|
|
||||||
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
|
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
|
||||||
if (m_processMsg != null)
|
if (m_processMsg != null)
|
||||||
return DocAction.STATUS_Invalid;
|
return DocAction.STATUS_Invalid;
|
||||||
|
@ -461,9 +464,6 @@ public class MRMA extends X_M_RMA implements DocAction
|
||||||
return DocAction.STATUS_Invalid;
|
return DocAction.STATUS_Invalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the definite document number after completed (if needed)
|
|
||||||
setDefiniteDocumentNo();
|
|
||||||
|
|
||||||
//
|
//
|
||||||
setProcessed(true);
|
setProcessed(true);
|
||||||
setDocAction(DOCACTION_Close);
|
setDocAction(DOCACTION_Close);
|
||||||
|
|
|
@ -331,6 +331,9 @@ public class MRequisition extends X_M_Requisition implements DocAction
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set the definite document number after completed (if needed)
|
||||||
|
setDefiniteDocumentNo();
|
||||||
|
|
||||||
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
|
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
|
||||||
if (m_processMsg != null)
|
if (m_processMsg != null)
|
||||||
return DocAction.STATUS_Invalid;
|
return DocAction.STATUS_Invalid;
|
||||||
|
@ -348,9 +351,6 @@ public class MRequisition extends X_M_Requisition implements DocAction
|
||||||
return DocAction.STATUS_Invalid;
|
return DocAction.STATUS_Invalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the definite document number after completed (if needed)
|
|
||||||
setDefiniteDocumentNo();
|
|
||||||
|
|
||||||
//
|
//
|
||||||
setProcessed(true);
|
setProcessed(true);
|
||||||
setDocAction(ACTION_Close);
|
setDocAction(ACTION_Close);
|
||||||
|
|
|
@ -216,6 +216,8 @@ public class DocActionTemplate extends PO implements DocAction
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// setDefiniteDocumentNo();
|
||||||
|
|
||||||
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
|
m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
|
||||||
if (m_processMsg != null)
|
if (m_processMsg != null)
|
||||||
return DocAction.STATUS_Invalid;
|
return DocAction.STATUS_Invalid;
|
||||||
|
@ -233,8 +235,6 @@ public class DocActionTemplate extends PO implements DocAction
|
||||||
m_processMsg = valid;
|
m_processMsg = valid;
|
||||||
return DocAction.STATUS_Invalid;
|
return DocAction.STATUS_Invalid;
|
||||||
}
|
}
|
||||||
// setDefiniteDocumentNo();
|
|
||||||
|
|
||||||
// setProcessed(true);
|
// setProcessed(true);
|
||||||
// setDocAction(DOCACTION_Close);
|
// setDocAction(DOCACTION_Close);
|
||||||
return DocAction.STATUS_Completed;
|
return DocAction.STATUS_Completed;
|
||||||
|
@ -248,6 +248,10 @@ public class DocActionTemplate extends PO implements DocAction
|
||||||
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
|
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
|
||||||
if (dt.isOverwriteDateOnComplete()) {
|
if (dt.isOverwriteDateOnComplete()) {
|
||||||
setDateInvoiced(new Timestamp (System.currentTimeMillis()));
|
setDateInvoiced(new Timestamp (System.currentTimeMillis()));
|
||||||
|
if (getDateAcct().before(getDateInvoiced())) {
|
||||||
|
setDateAcct(getDateInvoiced());
|
||||||
|
MPeriod.testPeriodOpen(getCtx(), getDateAcct(), getC_DocType_ID(), getAD_Org_ID());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (dt.isOverwriteSeqOnComplete()) {
|
if (dt.isOverwriteSeqOnComplete()) {
|
||||||
String value = null;
|
String value = null;
|
||||||
|
|
Loading…
Reference in New Issue