Projects:FifoCostAlgorithm
Contents
FIFO Costing Algorithm
This module provides a new Costing Algorithm to be used in the new Costing Engine.
- License: Comercial
- Category: Module
This module was sponsored by Agility ERP.
Introduction
FIFO, which stands for "first-in-first-out," is an inventory costing method which assumes that the first items placed in inventory are the first sold. Therefore materials are issued from the oldest supply in stock and that the cost of those units when placed in stock is the cost of those same units when issued. Finally the inventory at the end of a year consists of the goods most recently placed in inventory. FIFO will be one of the methods used to determine Cost of Goods Sold in Openbravo.
- Example:
Setup
Requirements
The Openbravo instance must be in MP14 or in a later one, and must be Migrated to the new Costing Engine introduced in MP13 (By default new instances of Openbravo starting from MP13 are Migrated to the new Costing Engine).
Installation
As System Administrator the user can access to the window General Setup || Application || Module Management. There is possible to install new modules by clicking on Add Modules. Search for this module, named FIFO Costing Algorithm and install it. The system must be rebuilt after.
Configuration
Once the module has been installed, the new Costing Algorithm has been created, but it has not been assigned yet to the Costing Process. To do so, the Client Administrator should go to the window Master Data Management || Product Setup || Costing Rules and create a new Costing Rule.
- Organization: The Organization to which this new Algorithm will be applied.
- Costing Algorithm: FIFO Costing Algorithm.
- Starting Date: The date from which this algorithm will start to be used in the Costing Process.
- Warehouse Dimension: If checked the cost of the Product will be calculated independently per each Warehouse, if not, it will be calculated once for all the Organization.
Click on Validate the Costing Rule to finish the setup. Now the next time that the Costing Process is run, this Costing Rule will be used, and therefore, the new costing Algorithm.
User Guide
Basics
Once the setup is complete, FIFO Costing Algorithm will be used to calculate the Cost of each Transaction. For doing so there will be two Tables: Input Stack and Output Stack. All the incoming movements, those that increases the stock, will be stored in the first table (Input Stack). The outgoing movements will consume that table and will register it on the second one (Output Stack)
Note: As indicated in New Cost Engine Documentation Manufactoring Costs are not fully implemented as of today. Therefore Manufactoring Costs can not calculated using FIFO, and they are calculated using Averange Algorithm
The Input Stack has the following fields:
- Transaction: The material transaction that originates the input.
- Quantity: The units of product of the transaction.
- Cost: The total cost amount of the transaction.
- Remaining Quantity: The units from this transaction that are still available for consumption.
- Remaining Cost: The cost of the units available for consumption.
- Date: The date when the input took place.
The Output Stack has the following fields:
- Transaction: The material transaction that originates the output.
- Input Stack: The related input stack record the cost is taken from.
- Quantity: The quantity that it is taken from the input stack.
- Cost: The proportional cost that is taken from the input stack.
- Date: The date when the output took place.
Each Input transaction will have one and only one entry in the Input Stack table.
Each Output transaction might have several entries in the output stack, each of them related to the same or different Input Stack record.
Both tables are represented in the new Tab FIFO Stacks, visible in the Product Window. In this Tab the user can see how the Transactions modify these Tables and how they are related to each other.
Example
The example described in the Introduction section would look like this:
- Physical Inventory initialization and 2 Receptions. They are stored in the Input Stack. (Note that the cost is the total Transaction cost, not the unitary cost).
- 1 Shipment. The first available cost is used
- 1 Reception.
- 1 Shipment.
- 1 Shipment. It uses the remaining cost of one record and a part of another.
- In the Transactions Tab, the user can check the calculated cost of each of the previous Transactions.
Advanced Scenarios
There are two scenarios that are managed a little bit different due to their complexity: Voiding documents and when negative stock is allowed.
Void a document
When a document is voided another document (so a transaction) is created to reflect this change. FIFO Costing Algorithm manages this action in a different manner depending on the type of the transaction: Incoming or Outgoing.
- Void Outgoing Transactions.
When an Outgoing Transaction is voided, the FIFO Stack reflects this movement. For doing so each Stack is modified.
A new row is created in the Output Stack with negative quantity and cost. The related Input Stack rows that were consumed by the original transaction are updated, increasing the Remaining Quantity and the Remaining Cost by the same amount that was originally consumed. This way both Stacks are in a status similar as if the original Transaction never happened.
Following the previous example, the first Shipment is voided. Notice that the related Input Stack is updated and its Remaining Quantity and Remaining Cost are restored.
- Void Incoming Transactions:
In a similar way, when an Incoming Transaction is voided, both Stacks need to be updated. A new line is inserted in the Outuput Stack with the Quantity and Cost set with the remaining of the original Input Stack row since it is pointed to it and therefore the Remaining Quantity and the Remaining Stock of the Input Stack are set to zero.
If there were Output Stack rows that consumed the Input Stack row that was voided, then a new line is inserted in the Outuput Stack consuming the next Input Stack.
Following the previous example, the last Goods Receipt is voided. Two lines are created in the Output Stack, one that consumes the Remaining Quantity of the original Input row and another that consumes the Remaining Stock of of the next Input row/s. (In blue is the Output row that consumes the Input row that is being Voided, then generating another Output to be consumed).
Negative Stock
When the option to allow negative stock is enabled, it is possible to create an Outgoing Transaction for more quantity than the available stock.
In this scenario, the FIFO Costing Algorithm is not able to calculate the cost of the Transacion, because there will be more quantity in the Output Stack than the available in the Input Stack. Therefore, this Transaction will remain in a Pending Status. Meaning that it will remain with its cost not calculated until there is an increase in the stock that allows the algorithm to calculate its cost.
In the FIFO Stacks this is reflected by an Output row that is not related to an Input row. Notice that the Cost will remain empty until there is an available Input row to consume.
Besides that, it will not be possible to validate a new costing rule until negative stock or remainder valuation is regularized.