Production Order Reversal, Negative Inventory and Date Material Policy on Customer Return

Description

I got a critical problem when:

  1. I have a Warehouse with "Disallow Negative Inventory" checked

  2. Create a Production Order for an End Product to be produced on a locator from that Warehouse, and complete the document

  3. Create and complete a Sales Order -> Shipment -> Invoice (Customer) selling the End Product

  4. Reverse the Production Order

    (the system don't check the negative inventory here)

  5. Create a RMA and then try to do the Customer Return,

    you will got an "Negative Inventory not allowed" error in due to the date material policy "autoBalanceNegative" feature.

For the Production Order reversal problem I think that we should change the implementation of createTransactions method to check the inventory as other documents like InOut, Inventory and others do:

And for the Customer Return, the autoBalanceNegative will block transactions in due to negative inventory. I found a similiar problem from another user reported here

WDY ?

Environment

None

Assignee

Unassigned

Reporter

Murilo Habermann Torquato

Labels

None

Tested By

None

Affects versions

Priority

Blocker
Configure