There are 2 purchase/sales price list versions for a price list and a given product "A"
Price list version "2018" Valid From: 1/1/2018 List Price=1000, Standard Price 900
Price list version "2019" Valid From: 1/1/2019 List Price=1100, Standard Price 1000
An order (either purchase or sales) with "Date Ordered" before <= 31/12/2018 should pick up the prices from price list version 2018 while "date ordered" >=1/1/2019 should pick up the prices from price list version 2019. However, it seems the product price callout always picks up the prices from the latest price list version. So an order with order date 30/11/2018 - for example - derives list price, price and unit price from price list version 2019 instead of 2018. I checked the environment variables and m_pricelist_version_id always seems to be correctly populated.
I have also simulated this behavior in the public demo system.
, please verify the attached patch, thanks.
Thanks Heng Sin, works as expected. Please deploy in public repo.