NOTE !!! Production Order Documennt Action BUG !!!
--HG-- branch : EDII
This commit is contained in:
parent
50b7552e27
commit
83aed9efeb
|
|
@ -40,7 +40,7 @@ public class MID_PPO extends X_ps_ppo implements DocAction, DocOptions{
|
|||
public boolean processIt(String action) throws Exception {
|
||||
log.warning("Processing Action=" + action + " - DocStatus=" + getDocStatus() + " - DocAction=" + getDocAction());
|
||||
DocumentEngine engine = new DocumentEngine(this, getDocStatus());
|
||||
return engine.processIt(action, getDocAction());
|
||||
return engine.processIt(getDocAction(), getDocAction());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -56,7 +56,8 @@ public class MID_PPO extends X_ps_ppo implements DocAction, DocOptions{
|
|||
@Override
|
||||
public String prepareIt() {
|
||||
setC_DocType_ID(getC_DocTypeTarget_ID());
|
||||
|
||||
if(getDocAction().equals(DocAction.ACTION_Void))
|
||||
return DocAction.STATUS_InProgress;
|
||||
List<MID_PPOLine> lines = new Query(getCtx(), MID_PPOLine.Table_Name, "ps_ppo_ID =? ", get_TrxName())
|
||||
.setParameters(new Object[] { getps_ppo_ID() })
|
||||
.setOnlyActiveRecords(true)
|
||||
|
|
@ -135,12 +136,15 @@ public class MID_PPO extends X_ps_ppo implements DocAction, DocOptions{
|
|||
@Override
|
||||
public boolean voidIt() {
|
||||
int count = new Query(getCtx(), MInventory.Table_Name, " ps_ppo_ID =? AND DocStatus NOT IN ('RE','VO')", get_TrxName())
|
||||
.setParameters(new Object[] { getps_ppo_ID() })
|
||||
.setOnlyActiveRecords(true)
|
||||
.count();
|
||||
if(count>0){
|
||||
processMsg = "Reverse All Inventory Issue and Receipt before Void !!!";
|
||||
return false;
|
||||
}
|
||||
setDocAction(DocAction.ACTION_None);
|
||||
setDocStatus(DocAction.STATUS_Voided);
|
||||
setProcessed(true);
|
||||
return true;
|
||||
}
|
||||
|
|
@ -252,6 +256,9 @@ public class MID_PPO extends X_ps_ppo implements DocAction, DocOptions{
|
|||
throw new IllegalArgumentException("Option array parameter is null");
|
||||
if (docAction == null)
|
||||
throw new IllegalArgumentException("Doc action array parameter is null");
|
||||
for (int i = 0; i < options.length; i++) {
|
||||
options[i] = null;
|
||||
}
|
||||
index = 0;
|
||||
if (docStatus.equals(DocumentEngine.STATUS_Drafted) || docStatus.equals(DocumentEngine.STATUS_Invalid)) {
|
||||
options[index++] = DocumentEngine.ACTION_Complete;
|
||||
|
|
|
|||
Loading…
Reference in New Issue