You can see the average unit cost price for item through this navigation Cost management -> Inventory accounting -> Released products -> Manage Costs (Tab) -> Costing (Section) -> Cost Object (Option).
Source Code Explanation (1.1):
- Initialize and declare objects.
- Set Item Id = 'F-001' (in my case).
- Get invent sum buffer through item id.
- Check inventory dimension, in case of not found created one.
Source Code Explanation (1.2):
- Create an object of invent cost price cache class.
- Get invent table buffer from invent sum.
- Get from & to unit of measurement.
- Construct secondary to invent unit converter buffer.
- Get the convert value.
- Get the OOTB cost price pieces method from cache class that will return average unit cost price of the item.
Result:
Thank you for sharing!
ReplyDelete