Purchase order workflow enable and disable the posting buttons.

Purchase order workflow -> enable and disable the posting buttons.

\Classes\PurchTableType\mayInvoiceBeUpdated

//For PO workflow begin
select firstonly workflowConfigurationTable
where workflowConfigurationTable.TemplateName == “PurchOrderApproval”
&& workflowConfigurationTable.Enabled == Noyes::Yes;

if(workflowConfigurationTable.RecId)
{
ok = ok && (purchTable.State == PurchReqWorkflowState::WorkflowCompleted);
}
//For PO workflow end

\Classes\PurchTableType\mayPurchaseOrderBeUpdated

//For PO workflow begin
select firstonly workflowConfigurationTable
where workflowConfigurationTable.TemplateName == “PurchOrderApproval”
&& workflowConfigurationTable.Enabled == Noyes::Yes;

if(workflowConfigurationTable.RecId)
{
ok = ok && (purchTable.State == PurchReqWorkflowState::WorkflowCompleted);
}
//For PO workflow end