There are situations when you want to buy/sell products with a price of zero (free-of-charge orders).
In the scenario above, we maintain a price list version with a price of zero. When we create the purchase order line, the default is a price of zero. Everything works as expected, except in the following special situation involving a price update in the price list version.
Product A, Price list version price = 0.00
1. Create PO line, Product=A, Price=0.00. Complete PO.
2. Change price list version for Product A to price=100.00
3. Create MR for PO line in step 1. => not OK because MR picks up price from updated price list version and creates the following posting:
Debit Inventory 100
Credit NIR 100
There should be a posting of zero because the purchase order created in step 1. was issued with a price of zero.
Only subsequent POs should adopt a default price from the price list of 100.
, please verify the attached patch, thanks.
Thanks Heng Sin, works as expected. Please deploy in public repo.