Fixes IDEMPIERE-63 - Document number is updated again when document completed after reactivation
This commit is contained in:
parent
c252c4475c
commit
d0e3514ba6
|
@ -1833,14 +1833,20 @@ public class MOrder extends X_C_Order implements DocAction
|
|||
private void setDefiniteDocumentNo() {
|
||||
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
|
||||
if (dt.isOverwriteDateOnComplete()) {
|
||||
/* a42niem - BF IDEMPIERE-63 - check if document has been completed before */
|
||||
if (this.getProcessedOn().compareTo(Env.ZERO) == 0) {
|
||||
setDateOrdered(new Timestamp (System.currentTimeMillis()));
|
||||
}
|
||||
}
|
||||
if (dt.isOverwriteSeqOnComplete()) {
|
||||
/* a42niem - BF IDEMPIERE-63 - check if document has been completed before */
|
||||
if (this.getProcessedOn().compareTo(Env.ZERO) == 0) {
|
||||
String value = DB.getDocumentNo(getC_DocType_ID(), get_TrxName(), true, this);
|
||||
if (value != null)
|
||||
setDocumentNo(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Shipment
|
||||
|
|
Loading…
Reference in New Issue