Costing Rules
![]() | Back to Warehouse Management |
Contents |
Introduction
A costing rule can be applied during cost calculation. Each costing rule requires a costing algorithm and a valid from date to properly calculate the cost of material's transactions. The "Warehouse" can be configured as a dimension to take into account while calculating costs.
Costing rules can only be created for legal entities, that is either "legal with accounting" organizations or "legal without accounting" organizations.
Product transactions costs can be calculated for both legal entities types, however only "legal with accounting" organizations support "perpetual" inventory posting as "legal without accounting" organizations do not support any type of posting.
It is important to remark that a costing rule can be validated if a "Currency" is configured for the legal entity in the organization window, therefore costs are calculated in that given currency.
A valid costing rule once created and validated for a legal entity organization will automatically be assigned to the products of that organization, therefore it can be reviewed in the Costing Rule tab of "Product" window.
Costing rules allow to define whether backdated transactions booked for products on a later date need to be adjusted therefore corresponding "backdated transaction" cost adjustments are also created and booked to get the correct cost of those products.
Notice that "Costing Rules" is a feature implemented by the new Costing Engine, therefore a costing rule can be created and validated within an Openbravo instance managing costs only if it has been migrated to the new "Costing Engine".
Openbravo recommends to migrate instances using the "legacy" costing engine to the new costing engine.
Please review the Costing Migration Process article.
Note that the new costing engine is included in Openbravo 3 starting from MP13.
New Openbravo instances or instances which did not calculate cost do not need to migrate to the new "costing" engine but just to create and validate a "Costing Rule" by having into account that:
- First costing rule created allows not to enter any date in the field "Starting Date", which means that all existing product transactions are going to be cost calculated.
- A blank date in the field "Starting Date" implies also a blank date in the field "Fix Backdated From" date unless a different date is entered in this field. "Fix Backdated From" date can be same or later than "Starting Date".
- Openbravo will show an error in case there are product transactions whose costs need to be calculated with a movement date on a "Closed" period. In those cases it will not be possible to post any cost transaction to the ledger unless the corresponding period is open for legal with accounting entities.
- First costing rule created allows also to specify a date in the field "Starting Date", i.e. 01-01-2014:
- In that case all transactions with a transaction process date prior to that date will also be cost calculated at a zero cost.
- All transactions with a transaction process date on January 1st, 2014 and later on are going to be cost calculated at the corresponding cost.
- Second costing rule does not allow to enter a "Starting Date" as current date is taken by default, therefore first costing rule ends when second costing rule starts and so on.
- Same applies to "Fix Backdated From" date defaulted to current date unless a specific date later than "current" date is entered.
Costing Rule
The costing rule window allows to define and validate costing rules.
As shown in the image above a "Costing Rule" can be defined and assigned to an organization for which the cost of the transactions need to be calculated.
There can only be one rule valid at a time for an organization which besides needs to be a "Legal Entity" organization type. The valid time period of the costing rule is set by the Starting Date entered.
Once assigned the costing rule applies to every product transaction recorded on the Legal Entity and all its children.
The main property to set in a costing rule is the Costing Algorithm to used while calculating costs.
The Standard and the Average algorithms are available by default. Additional algorithms such as FIFO, LIFO can be implemented by extension modules.
Moreover, costs are calculated at organization level by default, however it is also possible to have the costs calculated for each Warehouse's organization.
This can be achieved by using the Warehouse Dimension flag of the costing rule.
Costing rules need to be validated to start using them. That is done by using the button "Validate Costing Rule".
Once a Costing Rule is validated it is not possible to modify or delete it.
If a costing rule needs to be change that is get by creating a new costing rule with the new setup required.
Let's imagine that an organization requires a new costing algorithm to be used for cost calculation. In that case a new costing rule needs to be created.
The new rule overwrites the existing one starting from a new and later "Starting Date".
In this case:
- it is necessary to close the existing costing rule, that means to close the inventory valuated at the "old" rule
- and to initialize the inventory which will be valuated at the "new" costing rule starting from a given date
The closing and initialization inventory balances are managed as Physical Inventories in the new costing engine.
Two physical inventories are created for each organization and warehouse the costing rule applies to:
- the closing physical inventory empties the stock of products, therefore the Quantity Count is set to 0.
The cost of the products is the one calculated using the costing rule configured so far, regardless it is not shown in the physical inventory. - The opening inventory fills in again the stock, therefore the Quantity Count is once again set to the Quantity on-hand.
The cost of the products is shown and it is the one calculated using the costing rule configured so far.
Note that the cost of the new transactions of those products will be calculated by using the new costing rule.
The costing rule validation process does several checks:
- for instances managing cost which have not been migrated to the new costing engine will not be able to validate costing rules
- for instances do not managing cost do not need to migrate therefore will be able to create and validate costing rules
- and finally, for instance already managing cost under the new costing engine infrastructure:
- in the case of products included in transactions which were cost calculated using a rule, if a new rule is configured all their transactions need to be calculated first according to that previous rule.
- in the case of products included in transactions which were not cost calculated by any rule, if a new rule is configured all their transactions must not be cost calculated.
Fix Backdated Transactions
As already described a costing rule can also define whether backdated transactions booked for a product need to be fixed therefore the corresponding backdated transaction cost adjustment are created and booked for that product in order to get the correct cost of the product.
To make this work, one of the following two actions can be taken:
- use an existing and validated Costing Rule.
This way fix backdated transactions feature gets activated by using the process button "Fix Backdated Transactions".
This option allows entering a "Fix Backdated From" date as starting date, before running the process. - create and validate a new Costing Rule.
This way fix backdated transactions feature gets activated by checking Backdated Transactions Fixed check-box and filling in a Fix Backdated From date before validating the costing rule.
Both ways:
- "Starting date" of the costing rule will be set as "Fix Backdated From" date whenever the end-user does not enter a "Fix Backdated From" date.
- "Fix Backdated From" date needs to be a valid date within an open period.
Initialization
The initialization tab is a read-only tab which allows to review the "Closing" / "Opening" physical inventory created to validate a costing rule. Every time that a costing rule is validated a new record is created for each Organization and Warehouse. This record contains links to the physical inventories created.
Full list of Costing Rules window fields and their descriptions is available in the Costing Rules Screen Reference.
![]() | Back to Warehouse Management |