IDEMPIERE-2377: Add "Prepare" Document Action to all document type (#653)
* IDEMPIERE-2377: Add "Prepare" Document Action to all document type * IDEMPIERE-2377: Adding Prepare action on prepared docs and removeing redundent actions Co-authored-by: carg67@gmail.com
This commit is contained in:
parent
da3dc2c472
commit
4439a74c52
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue