Costing
Costing is the cornerstone of selling products. Costing is the process of calculating costs for sold goods. With properly tuned costing you'll have a realtime P/L and balance statement.
Technical Details
Costs are calculated from Cost Details. Cost Details are information that is created from documents that effect costs, such as purchase orders and invoices.
Cost Details are created at the following "moments", in the code MCostDetail:
- createInventory
- createInvoice
- createMatchInvoice
- createMovement
- createOrder (called from Doc_MatchPO)
- createProduction
- createShipment
Costing
From the available cost details, different types of costs can be calculated.
Costing records can be created manually running the process:
org.compiere.process.CostCreate
The process checks for non-processed Cost Details and processes these.
Cost Details are processed calling
org.compiere.model.MCostDetail.processProduct(MProduct, String)