diff --git a/org.adempiere.base/src/org/compiere/process/DocumentEngine.java b/org.adempiere.base/src/org/compiere/process/DocumentEngine.java index 27ef5d1a3a..30edda8921 100644 --- a/org.adempiere.base/src/org/compiere/process/DocumentEngine.java +++ b/org.adempiere.base/src/org/compiere/process/DocumentEngine.java @@ -965,17 +965,17 @@ public class DocumentEngine implements DocAction options[index++] = DocumentEngine.ACTION_Prepare; options[index++] = DocumentEngine.ACTION_Void; } - // Draft/Invalid .. DR/IN + // Draft/In Process/Invalid .. DR/IP/IN else if (docStatus.equals(DocumentEngine.STATUS_Drafted) + || docStatus.equals(DocumentEngine.STATUS_InProgress) || docStatus.equals(DocumentEngine.STATUS_Invalid)) { options[index++] = DocumentEngine.ACTION_Complete; - // options[index++] = DocumentEngine.ACTION_Prepare; + options[index++] = DocumentEngine.ACTION_Prepare; options[index++] = DocumentEngine.ACTION_Void; } - // In Process .. IP - else if (docStatus.equals(DocumentEngine.STATUS_InProgress) - || docStatus.equals(DocumentEngine.STATUS_Approved)) + // Approved .. AP + else if (docStatus.equals(DocumentEngine.STATUS_Approved)) { options[index++] = DocumentEngine.ACTION_Complete; options[index++] = DocumentEngine.ACTION_Void; @@ -1010,7 +1010,6 @@ public class DocumentEngine implements DocAction || docStatus.equals(DocumentEngine.STATUS_InProgress) || docStatus.equals(DocumentEngine.STATUS_Invalid)) { - options[index++] = DocumentEngine.ACTION_Prepare; // Draft Sales Order Quote/Proposal - Process if ("Y".equals(isSOTrx) && ("OB".equals(orderType) || "ON".equals(orderType))) @@ -1148,7 +1147,6 @@ public class DocumentEngine implements DocAction || docStatus.equals(DocumentEngine.STATUS_InProgress) || docStatus.equals(DocumentEngine.STATUS_Invalid)) { - options[index++] = DocumentEngine.ACTION_Prepare; options[index++] = DocumentEngine.ACTION_Close; } // Complete .. CO @@ -1163,15 +1161,8 @@ public class DocumentEngine implements DocAction */ else if (AD_Table_ID == MProduction.Table_ID) { - // Draft .. DR/IP/IN - if (docStatus.equals(DocumentEngine.STATUS_Drafted) - || docStatus.equals(DocumentEngine.STATUS_InProgress) - || docStatus.equals(DocumentEngine.STATUS_Invalid)) - { - options[index++] = DocumentEngine.ACTION_Prepare; - } // Complete .. CO - else if (docStatus.equals(DocumentEngine.STATUS_Completed)) + if (docStatus.equals(DocumentEngine.STATUS_Completed)) { if (periodOpen) { options[index++] = DocumentEngine.ACTION_Reverse_Correct; @@ -1189,7 +1180,6 @@ public class DocumentEngine implements DocAction || docStatus.equals(DocumentEngine.STATUS_InProgress) || docStatus.equals(DocumentEngine.STATUS_Invalid)) { - options[index++] = DocumentEngine.ACTION_Prepare; options[index++] = DocumentEngine.ACTION_Close; } // Complete .. CO @@ -1208,7 +1198,6 @@ public class DocumentEngine implements DocAction || docStatus.equals(DocumentEngine.STATUS_InProgress) || docStatus.equals(DocumentEngine.STATUS_Invalid)) { - options[index++] = DocumentEngine.ACTION_Prepare; options[index++] = DocumentEngine.ACTION_Close; } // Complete .. CO @@ -1227,7 +1216,6 @@ public class DocumentEngine implements DocAction || docStatus.equals(DocumentEngine.STATUS_InProgress) || docStatus.equals(DocumentEngine.STATUS_Invalid)) { - options[index++] = DocumentEngine.ACTION_Prepare; options[index++] = DocumentEngine.ACTION_Close; } // Complete .. CO