WorkFlow Stopped Error while Invoicing Purchase Order.

Hi All,

I’m getting this following error when I try to Invoice the purchase order


this is my On-hand form.

Please suggest why this error occurs.


Physical Stock is blank, you have none.

Invoicing a purchase order should not be removing stock, how are you invoicing it and what are you actually invoicing?

I don’t see any development related issue here, so moved to user forum.

Hi Adam,

Actually, we had received the 2 qty by product receipt. After the receipt, the item has been issued for a sale.
Now we are trying to invoice the purchase order which has been already received and issued.

So do you invoiced the sales order before invoicing the purchase order?

If the purchase order is +ve then why would the invoice process is trying to pick from the inventory? Does your purchase order related to anything? (example - project)

Yes, We had invoiced sales order before invoicing the purchase order.

We had the same question here. Please suggest an answer.

The Purchase order is related to a Sales order (Project item requirements).

Hi Kranthi,

Any suggestions?.

The sales order related to that item requirement is already invoiced, so you need to check why the purchase order invoice is posting item requirement consumption.

Does the Item consumption on project parameter is marked to post the consumption automatically when the purchase order packing slip or invoiced is posted?

Yes it is checked, we unchecked Item Consumption and tried still we got the error.

Where can we put a breakpoint to debug this issue?

Try disabling the workflow and posting it manually (in a TEST environment), so that it would be easy to investigate.

May be you can start from here, \Classes\PurchFormLetter_Invoice\endUpdate

Tried… The debugger was not hitting in that method …

Could you please tell us from where the error is coming in SO or PO…? Because we don’t know how to proceed with this issue.

The purchase order invoice is trying to consume the material on project immediately after the PO invoice, that what is causing the error. The code will be running on IL, so have you tried by disabling the Execute business logic on IL from Tools → options?

Hi Kranthi,

The Execute Business Logic on IL is already disabled.

still, the debugger is not hitting? any other suggestions?

Check from where that error comes, add break points and back trace from there.




Hi, Kranthi.

We have tried debugging on this method and it returns false and the InventOnHandCheckType is physical.

Please suggest how to proceed further on this.

Hi All,

Any suggestions…?

That why you are getting the error.

You need to check why it is returning false.

InventOnHandCheckType is Physical and the boolean doDirectOnhandCheck becomes true in InventUpdateOnhand class…

How can I fix this?

For other POs boolean doDirectOnhandCheck is false

Try recalculating onhand for that item. See below code example.

static void recalcInventSum(Args _args)
    InventSumReCalcItem      inventSumReCalcItem;
    inventSumReCalcItem = new InventSumReCalcItem("Item",true,CheckFix::Fix); // replace item with your ItemId

If you still see the issue, then continue debugging.


Thanks kranthi… I have checked this method too… I wii try ur code and get back to you…