by Mike.Sheen » Wed Aug 31, 2022 5:16 pm
There is a system setting, UpdateLastCost - which when set to False will cause Purchase Invoices, GRN's and Shipment BookIns to NOT set the last cost (IN_Main.LCost) when activating.
As our business logic objects all typically follow a pattern where the system settings they are interested in are cached into a SystemSettings class at the time of the business logic being created, a Plugin could selectively set that value to control the behaviour.
So, PurchaseInvoice.SystemSettings.UpdateLastCost set to False won't change the actual system setting, but the cached copy it uses, which makes the Purchase Invoice behave as if it was set to False. Same applies to Purchase Orders and BookIns.
Mike Sheen
Chief Software Engineer
Jiwa Financials
If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution