Wrong ordered qty when reactivating a purchase order and setting a line to zero

Description

Test case as GardenWorld Admin

  • Verify storage for Mulch product, in seed it has Ordered=0

  • Create a Purchase Order for product Mulch with Qty=3

  • Complete the Purchase Order

    • In storage the Mulch product changes to Ordered=3

    • In PO Line the numbers are Qty=3, POQty=3, Delivered=0, OnOrder=3

  • Create a Material receipt for the PO and complete

    • In storage the Mulch product changes to Ordered=0 (and the OnHand is increased by 3)

    • In PO Line the numbers are Qty=3, POQty=3, Delivered=3, OnOrder=0

  • Reactivate the Purchase Order and change the Qty to zero

  • Complete again the Purchase Order

    • In storage the Mulch product changes to Ordered=-3

    • In PO Line the numbers are Qty=0, POQty=0, Delivered=3, OnOrder=-3

  • Create another Material receipt for the PO and complete - fill Qty with -3 (although the create from shows 0)

    • In storage the Mulch product stays in Ordered=-3 (*Error, must be zero*)

    • In PO Line the numbers are Qty=0, POQty=0, Delivered=0, OnOrder=-3 (*Error, OnOrder must be zero*)

Environment

None
Fixed

Assignee

Carlos Ruiz

Reporter

Carlos Ruiz

Labels

None

Tested By

None

Fix versions

Priority

Major