Projects:Average Cost Per Invoice Price/Technical Documentation
Contents |
Average Cost Per Invoice Price - Technical Specification
Overview
This article will explain how to proceed in order to create an Algorithm to calculate the Average Cost of a Product based on the Invoice Price.
Technical design
Average Cost Per Invoice Price
- Create a Java file that extends from AverageAlgorithm and overrides the method getReceiptCost() from CostingAlgorithm. This method must retrieve the price from the Invoice instead of doing it from the Order. In this method, if there is not an Invoice to retrieve the price from, an exception must be launched and the process will stop. It will not be able to continue until an Invoice is created.
Database
- The module needs to be created.
- A new Costing Algorithm must be created and associated to the previous Java file.
Dataset
- A dataset must be exported within the module with the new Costing Algorithm.