Reverted [ 1566090 ] Allow to reuse doc no sequence
It has negative consequences on Recurring and possibly other collaterals
This commit is contained in:
parent
fa40b3395c
commit
3a5886e1f1
|
@ -137,11 +137,6 @@ public class MInOut extends X_M_InOut implements DocAction
|
||||||
return retValue;
|
return retValue;
|
||||||
} // createFrom
|
} // createFrom
|
||||||
|
|
||||||
// Goodwill.co.id (Goodwill)
|
|
||||||
/** Reversal Indicator */
|
|
||||||
private static String REVERSE_INDICATOR = "^";
|
|
||||||
// end Goodwill.co.id
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create new Shipment by copying
|
* Create new Shipment by copying
|
||||||
* @param from shipment
|
* @param from shipment
|
||||||
|
@ -161,14 +156,6 @@ public class MInOut extends X_M_InOut implements DocAction
|
||||||
copyValues(from, to, from.getAD_Client_ID(), from.getAD_Org_ID());
|
copyValues(from, to, from.getAD_Client_ID(), from.getAD_Org_ID());
|
||||||
to.set_ValueNoCheck ("M_InOut_ID", I_ZERO);
|
to.set_ValueNoCheck ("M_InOut_ID", I_ZERO);
|
||||||
to.set_ValueNoCheck ("DocumentNo", null);
|
to.set_ValueNoCheck ("DocumentNo", null);
|
||||||
|
|
||||||
// Goodwill.co.id (Goodwill)
|
|
||||||
// old :
|
|
||||||
// to.set_ValueNoCheck ("DocumentNo", null);
|
|
||||||
// new :
|
|
||||||
to.setDocumentNo(REVERSE_INDICATOR + from.getDocumentNo());
|
|
||||||
// end Goodwill.co.id
|
|
||||||
|
|
||||||
//
|
//
|
||||||
to.setDocStatus (DOCSTATUS_Drafted); // Draft
|
to.setDocStatus (DOCSTATUS_Drafted); // Draft
|
||||||
to.setDocAction(DOCACTION_Complete);
|
to.setDocAction(DOCACTION_Complete);
|
||||||
|
@ -1683,10 +1670,6 @@ public class MInOut extends X_M_InOut implements DocAction
|
||||||
line.save(get_TrxName());
|
line.save(get_TrxName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Goodwill.co.id (Goodwill)
|
|
||||||
// for voided Document, M_InOut_ID is added as suffix for Document No
|
|
||||||
setDocumentNo(getDocumentNo() + "#" + getM_InOut_ID());
|
|
||||||
// end Goodwill.co.id
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1763,11 +1746,6 @@ public class MInOut extends X_M_InOut implements DocAction
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Added New Lines By Goodwill.co.id
|
|
||||||
//Reason: To Change Document No when Reverse
|
|
||||||
setDocumentNo(getDocumentNo() + "#" + getM_InOut_ID());
|
|
||||||
//End Of Added Lines
|
|
||||||
|
|
||||||
// Deep Copy
|
// Deep Copy
|
||||||
MInOut reversal = copyFrom (this, getMovementDate(),
|
MInOut reversal = copyFrom (this, getMovementDate(),
|
||||||
|
|
|
@ -80,11 +80,6 @@ public class MInvoice extends X_C_Invoice implements DocAction
|
||||||
list.toArray(retValue);
|
list.toArray(retValue);
|
||||||
return retValue;
|
return retValue;
|
||||||
} // getOfBPartner
|
} // getOfBPartner
|
||||||
|
|
||||||
// Goodwill.co.id (Goodwill)
|
|
||||||
/** Reversal Indicator */
|
|
||||||
public static String REVERSE_INDICATOR = "^";
|
|
||||||
// end Goodwill.co.id
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create new Invoice by copying
|
* Create new Invoice by copying
|
||||||
|
@ -105,12 +100,7 @@ public class MInvoice extends X_C_Invoice implements DocAction
|
||||||
to.set_TrxName(trxName);
|
to.set_TrxName(trxName);
|
||||||
PO.copyValues (from, to, from.getAD_Client_ID(), from.getAD_Org_ID());
|
PO.copyValues (from, to, from.getAD_Client_ID(), from.getAD_Org_ID());
|
||||||
to.set_ValueNoCheck ("C_Invoice_ID", I_ZERO);
|
to.set_ValueNoCheck ("C_Invoice_ID", I_ZERO);
|
||||||
// Goodwill.co.id (Goodwill)
|
to.set_ValueNoCheck ("DocumentNo", null);
|
||||||
// old :
|
|
||||||
//to.set_ValueNoCheck ("DocumentNo", null);
|
|
||||||
// new :
|
|
||||||
to.setDocumentNo(REVERSE_INDICATOR + from.getDocumentNo());
|
|
||||||
// end Goodwill.co.id
|
|
||||||
//
|
//
|
||||||
to.setDocStatus (DOCSTATUS_Drafted); // Draft
|
to.setDocStatus (DOCSTATUS_Drafted); // Draft
|
||||||
to.setDocAction(DOCACTION_Complete);
|
to.setDocAction(DOCACTION_Complete);
|
||||||
|
@ -1962,10 +1952,6 @@ public class MInvoice extends X_C_Invoice implements DocAction
|
||||||
line.save(get_TrxName());
|
line.save(get_TrxName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Goodwill.co.id (Goodwill)
|
|
||||||
// for voided Document, C_Invoice_ID is added as suffix for Document No
|
|
||||||
setDocumentNo(getDocumentNo() + "#" + getC_Invoice_ID());
|
|
||||||
// end Goodwill.co.id
|
|
||||||
addDescription(Msg.getMsg(getCtx(), "Voided"));
|
addDescription(Msg.getMsg(getCtx(), "Voided"));
|
||||||
setIsPaid(true);
|
setIsPaid(true);
|
||||||
setC_Payment_ID(0);
|
setC_Payment_ID(0);
|
||||||
|
@ -2055,10 +2041,6 @@ public class MInvoice extends X_C_Invoice implements DocAction
|
||||||
//
|
//
|
||||||
load(get_TrxName()); // reload allocation reversal info
|
load(get_TrxName()); // reload allocation reversal info
|
||||||
|
|
||||||
// Added New Lines By Goodwill.co.id
|
|
||||||
//Reason: To Change The Document No when Reversed
|
|
||||||
setDocumentNo(getDocumentNo() + "#" + getC_Invoice_ID());
|
|
||||||
// End Of Added Lines
|
|
||||||
// Deep Copy
|
// Deep Copy
|
||||||
MInvoice reversal = copyFrom (this, getDateInvoiced(),
|
MInvoice reversal = copyFrom (this, getDateInvoiced(),
|
||||||
getC_DocType_ID(), isSOTrx(), false, get_TrxName(), true);
|
getC_DocType_ID(), isSOTrx(), false, get_TrxName(), true);
|
||||||
|
|
Loading…
Reference in New Issue