Projects:Org based avg costing
Contents
|
Introduction
Currently Openbravo ERP is not considering multi-organization based average costing. This project aims to fix this issue.
- Developers:
- Eduardo Argal <ear at openbravo dot com>
- Gorka Ion Damián <gda at openbravo dot com>
- Rafa Roda Palacios <rro at openbravo dot com>
- Issue: 0011317
- Project branch: https://code.openbravo.com/erp/devel/pi-costorg/
Functional Specification
Scope
This project will review the whole cycle of average costing in order to enable it as multi-organization:
- Costs definition.
- Costs calculation (generation).
- By reception of material.
- By manufacturing of products.
- Costs accounting.
- Costs reporting.
User roles & profiles
Warehousing manager: the person who controls the warehouses ins and outs as well as the valuation of their stock.
Production manager: the person who controls the manufacturing of products as well as the cost associated to their production.
Accounting manager: the person who controls the finances of a company both by controlling that every transaction happening in the company has been accounted and by preparing the financial reports.
Business process definition
Warehousing manager:
- The warehousing manager of a manufacturing company is accepting receipts of materials (goods receipts) in each of the company factories (branches) around the country.
- Each of these factories' warehouse receives the same materials.
- Anyway, the warehousing manager would like to know the reception cost of each material per each of the factories. In other words, he would like to see whether a material costs more to be received in a factory than in another one.
- Besides, he would like this material cost calculation to be triggered automatically on each material reception, without having to manually run a process.
Production manager:
- The production manager of a manufacturing company is controlling the manufacturing of products (completion of work requirements) in each of the company factories (branches) around the country.
- Each of these factories produces the same products.
- Anyway, the production manager would like to know the production cost of each product per each of the factories. In other words she would like to see whether a product costs more to be manufactured in a factory than in another one.
- Besides, he would like this product cost calculation to be triggered automatically on each product manufacturing, without having to manually run a process.
Accounting manager:
- The accounting manager of a manufacturing company is preparing the financial reports for each of the branches (factories or organizations) of the company.
- One of the accounting concepts to be accounted is the materials cost.
- She wants the cost of each material to be properly split and accounted in its corresponding branch (factory or organization).
- Once a material cost has been accounted, she expects this material cost not to be changed. In other words, the material cost already accounted:
- is un-accounted if it will be recalculated.
- can not be re-calculated if the period where it was accounted is closed.
User stories
Warehousing manager:
- John, the warehousing manager of a manufacturing company, is accepting receipts of materials (goods receipts) in each of the company factories (branches) around the country.
- Each of these factories' warehouse receives the same materials.
- Anyway, the warehousing manager would like to know the reception cost of each material per each of the factories. In other words, he would like to see whether a material costs more to be received in a factory than in another one.
- Besides, he would like this material cost calculation to be triggered automatically on each material reception, without having to manually run a process.
Production manager:
- Mary, the production manager of a manufacturing company, is controlling the manufacturing of products (validation of work efforts) in each of the company factories (branches) around the country.
- Each of these factories produces the same products.
- Anyway, the production manager would like to know the manufacturing cost of each product per each of the factories. In other words she would like to see whether a product costs more to be manufactured in a factory than in another one.
- Besides, she would like this product cost calculation to be triggered automatically on each product manufacturing, without having to manually run a process.
Accounting manager:
- Sarah, the accounting manager of a manufacturing company, is preparing the financial reports for each of the branches (factories or organizations) of the company.
- One of the accounting concepts to be accounted is the materials cost.
- She wants the cost of each material to be properly split and accounted in its corresponding branch (factory or organization).
- Once a material cost has been accounted, she expects this material cost not to be changed. In other words, the material cost already accounted:
- is un-accounted if it will be recalculated.
- can not be re-calculated if the period where it was accounted is closed.
Functional Requirements Based on Business Processes
Costing definition
Num | Requirement | Importance | Status |
1.1 |
Costing method is defined in the Product window (Master Data Management >> Product) selecting a value of the non-mandatory Cost Type closed drop-down list:
None of these values is defaulted (since this drop-down list is not mandatory). | Must have | Complete |
1.2 |
Changes in Cost Type method have be to checked and validated before saving:
| Must have |
Costing calculation
Num | Requirement | Importance | Status |
2.1 |
Costing calculation of received materials can be launched manually at any time via the Generate Average Costs process (Warehouse Management >> Transactions >> Generate Average Costs). This process:
| Must have | |
2.2 |
The material cost calculation is automatically triggered when completing goods receipts if the costing method of a product appearing in the receipt lines is Organization Average. | Must have |
Num | Requirement | Importance | Status |
2.3 |
Costing calculation of manufactured products can be launched manually at any time via the Create Production Costs process (Production Management >> Transactions >> Create Production Costs). This process:
| Must have | |
2.4 |
The product cost calculation is automatically triggered when completing products manufacturing (validating work efforts) if the costing method of a product appearing in the production lines is Organization Average or Global Average (current behaviour). | Must have |
Costing accounting
Num | Requirement | Importance | Status |
3.1 |
If a material cost is accounted in an open period, it can not be re-calculated nor modified:
| Must have | |
3.2 |
When closing a period, the material costs accounted during this period can not be re-calculated nor modified:
| Must have |
Costing reporting
Num | Requirement | Importance | Status |
4.1 |
Warehousing reports need to be adapted to display the costing per organization:
| Must have | |
4.2 |
Production reports need to be adapted to display the costing per organization:
| Must have | |
4.3 |
Accounting reports need to be adapted to display the costing per organization: [TBD] | Must have |
User Interface Mockups
[TBD] Mockups of reports with organization drop-down list
Open discussion items
- RRO: point 1.2:
- Are the checks proposed correct?
- Should we include a check for the transition from Global Average to Global Standard value? DME: I thinks so. Eduardo will also add definition of actions that will be triggered by this change.
- Which messages should be displayed for each check?
- RRO: points 2.3 and 2.4:
- To be reviewed by GDA.
- Is there a check of the product costing method missing in the current procedures?
- RRO: points 3.1 and 3.2: since 3.1 is more restrictive than 3.2, is 3.1 enough? DME: For me 3.1 is enough.
- RRO: points 4.1, 4.2 and 4.3:
- Is any report missing?
- Which is the proposed solution for them? Organization drop-down (mandatory?) in the filter window? DME: The solution was to go just with current reports assuming most common case of one organization one warehouse.
- RRO: Costing tab:
- Why is Production check-box editable? Can we make a Manual Costing line of type production?
- Should Manual check-box to be read-only and defaulted to Yes? Then the processes that insert data into Costing should set its value to No. DME: I think this is a good point.
- RRO: Naming convention? We are having some processes related to cost calculation and they all differ in the action name:
- Generate Average Costs
- Create Production Costs
- Calculate Standard Costs
- DME: IMHO migration from one costing method to another product by product (as this attribute is defined at the product level) could be a bit annoying for those having big products catalogue. I propose to have a script which could have Product category / All as an input parameter.
Closed discussion items
Technical Documentation
Costing definition
Functional requirement 1.1: Cost Type drop-down list values.
Modify Cost type reference list with values:
- AVO (Organization Average)
- AV (Global Average)
- ST (Global Standard)
Functional requirement 1.2: Cost Type checks on product saving.
Modify M_PRODUCT_TRG trigger to make the checks proposed in Functional requirement 1.2.
Costing calculation
Functional requirement 2.1: Generate Average Costs process.
Modify M_GENERATE_AVERAGE_COSTS procedure in order to:
- If costing method is Organization Average reset the average cost calculation for each organization.
- If costing method is Organization Average the records created in the Costing tab are set as permanent.
Functional requirement 2.2: Generate Average Costs triggering when completing goods receipt.
Functional requirement 2.3: Create Production Costs process.
MA_PRODUCTION_COST_GENERATE procedure
Functional requirement 2.4: Create Production Costs triggering when validating work efforts.
MA_WORKEFFORT_VALIDATE procedure
Costing accounting
[TBD]
Costing reporting
Functional requirements 4.1, 4.2 and 4.3: Cost retrieving per organization.
Modify M_GET_PRODUCT_COST function in order to:
- Accept Organization parameter.
- Filter data based on organization if costing method is Organization Average.
- When a product is both produced and purchased prioritize the production cost over the purchase cost.
Modify every occurrence of M_GET_PRODUCT_COST function in the following XSQL, JRXML and function files in order to pass the proper organization parameter:
- erpCommon/ad_forms/DocMatchInv_data.xsql (1 occurrence)
- erpCommon/ad_forms/ProductInfo_data.xsql (1 occurrence)
- erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalyses_data.xsql (3 occurrences)
- erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalysesJR_data.xsql (3 occurrences)
- erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalysesComparativeJR.jrxml (2 occurrences)
- erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalysesNoComparativeJR.jrxml (1 occurrence)
- erpCommon/ad_reports/ReportValuationStock_data.xsql (2 occurrences)
- src-db/database/model/functions/M_GET_PARETO_ABC.xml (4 occurrences)
- src-db/database/model/functions/M_UPDATE_PARETO_PRODUCT.xml (4 occurrences)
Development Status
Costing definition
Type of file | Path | Change made | Comments | Status |
Database file | src-db/database/sourcedata/AD_REF_LIST.xml |
Modified Cost Type reference list. Changed names of:
Added record Organization Average with description Average costing per Organization. and value AVO. | Resolves Functional requirement 1.1 | Complete |
Costing calculation
Type of file | Path | Change made | Comments | Status |
M_GENERATE_AVERAGE_COSTS | src-db/database/model/functions/M_GENERATE_AVERAGE_COSTS.xml | Multi-organization support enhancement | Add capability for new cost type "Organizational average" | On going |
MA_PRODUCTION_COST_GENERATE | src-db/database/model/functions/MA_PRODUCTION_COST_GENERATE.xml | Multi-organization support enhancement | Add capability for new cost type "Organizational average" | Complete |
MA_PRODUCTION_COST | src-db/database/model/functions/MA_PRODUCTION_COST.xml | Multi-organization support enhancement | Add capability for new cost type "Organizational average" | Complete |
Costing accounting
Type of file | Path | Change made | Comments | Status |
Costing reporting
Type of file | Path | Change made | Comments | Status |