Upd/Dlt/Ins Items: Ins see wrong old value of PO.amountTotal
Brought to you by:
maxtardiveau,
valhuber
Enable the new test in Purchaseorder_update_adjustments_test at 49. Javadoc says the test does an update, delete & insert (of Lineitems) to an order. It seems to fail for me.
To debug:
1 - Set breakpoint at SumRule @ 269 (adjust from insert)
2 - Run the test, when you hit the breakpoint, take a look at the log (attached), noting
a - Step 1 (update qtyOrdered of the Hammer) moves amountTotal 50 => 70 (that is correct)
b - Step 2 (delete the Shovel) adjusts down, but the starting point is 50 (should be 70)
==> As evidenced by theSum, and theParentState.amountTotal
Conform fixed in 1364