Projects:Cost Adjustments/DevelopmentAndDesignNotes
Contents |
Introduction
In this document basic notes and requirements are listed to be considered during project design and development.
Notes from Cost Engine development project
Functional Specs
Business Process definition:
- New document Cost Adjustment.
- Changes on calculated cost (landed cost, invoiced order, cancelled transaction,...) are included using this document.
- Each transaction might have different cost adjustments associated.
- The Cost Adjustment has a date it is applied on, which can be different than the original calculation date.
- Algorithms shall provide a method to populate the cost adjustment lines with the related transactions and amounts.
- Lines are related to the transaction it is related to, the amount to adjust and the type of adjustment (cogs or inventory)
- Each line has to define which document types need to be accounted.
Functional Requirements
Id | Requirement | Importance | Status |
4.1 | New Cost Adjustment window | Must have | Not started |
4.2 | New Cost Adjustment process | Must have | Not started |
It is possible to modify the cost calculated for a transaction on a later date, for example for landed costs or invoicing. This is done using the Cost Adjustment document. On this document is set the amount to be adjusted, the date when the cost adjustment happens and the transaction(s) the adjustment applies to. When the adjustment is processed the corresponding costing algorithm determines which transactions needs to be adjusted. Using Cost Adjustments it is possible to see the evolution of the cost related to the transaction over the time. The main scenario to use adjustments are for Purchase Invoices. The cost of the Receipts is calculated based on the related Purchase Order. When the receipt is invoiced it has to be checked if a cost adjustment is needed.
Technical specs
New document for each cost calculation.
Cost Adjustment window
Read only transactional window with all cost adjustments.
Header
- Document Number and Document Type
- Fields to identify each cost adjustment document.
- Date
- Date when adjustment takes place. Used for accounting.
- Inventory amount
- Total amount that needs to be updated on the inventory valuation account.
- COGS amount
- Total amount that needs to be updated on the COGS account.
- Table Id and Record Id
- Fields to identify the document that originates the adjustment.
Lines
- Transaction Id
- Transaction the adjustmen applies to.
- Type
- COGS or Inventory
- Amount
- The amount to be adjusted for this transaction and type.
Cost Adjustment process
Process to manage cost calculations. If a new cost is added to an already calculated transaction it has to call the corresponding algorithm api to make the needed adjustments on related transactions. It has to check that the amounst are correct. A new record on the M_Transaction_Cost table is created for each line.
Notes Preliminary
- Support for backdated transactions.
- Ability to recalculate costs of backdated transactions, including all that could be affected.
- This cost adjustment is done on a specific date. TBD
- The process will only search for backdated transactions until the given date. Affected transactions can be on any date.
- Changes on Costing Algorithm to add methods that need to be implemented by other algorithms. Should not break the API.
- Maybe using a new class for adjustments ?
- The cost adjustements engine should consider any scenario requiring a cost adjustment that can be delivered by a module. Some examples are (not necessarily to be developed within this project):
- Fix of backdated transactions.
- Landed cost.
- Cost by invoice price.
- Currently cost calculation is deferred until the shipment is invoiced.
- With cost adjustment cost can be calculated on shipment process as usual and adjusted when invoice arrives with a price difference.
- Fix of incorrect cost calculations.
- The price of the Purchase Order was incorrect.
- The receipt didn't have an order and the default cost was not the desired.
- Are there 3 types of cost adjustments?
- The date/process order was incorrect. (Backdated transactions)
- The amount of a transaction was incorrect. Generally an incoming transaction.
- The balance on a given date for a product is incorrect. Because of rounding differences or because of fixed issues the balance of a product might need to be updated on a given date.
- The balance update type:
- Is it an adjustment type, or just a process that could require later adjustments of Date type
- Creates closing/starting inventories both with same quantities. The cost of the closing inventory should be the current balance. The cost of the starting inventory should be the desired balance amount.
- In case the balance is set for current date there is no need to adjust the costs.
- In case the balance is set for past date cost of closing inventory is calculated using current date, so an adjustment is required.
- The amount of an outgoing transaction is always correct if it is registered in the application in the correct order.
- Outgoing transactions can only generate cost adjustments if they are registered in the application in an incorrect order.
- Incoming transactions can generate cost adjustment if the calculated price/amount needs to be changed of it they are registered in the application in an incorrect order.
- Costing background process processes the transactions using the processing date which is stored including the time. But the movement dates are stored including only the date.
- We have to design/decide how are the backdated transactions ordered when there are several transactions on the same date.
- Legacy engine orders transactions by: M_INOUT.MOVEMENTDATE, M_INOUTLINE.MOVEMENTQTY DESC
- Could be a nice to have feature the ability to set the time of the day when the transaction happen.
- A not so nice solution could be to edit the transaction process date of backdated transactions. Or be able to set it in the cost adjustment document.
Notes Jun-23th-2014
- Cost adjustments is a new document that it is generated by 3 different processes:
- Standard Cost Correction: This searches for transactions that are not accurately calculated.
- Backdated transactions. Transactions that were not logged in the system in the proper order.
- Differences in order/invoice prices.
- Landed Cost: Process to assign different costs to an existing transaction, usually good receipts.
- Balance amount update: Process to set a balance amount of a product on an specific date.
- This process is achieved using opening/closing inventories.
- The closing inventory is calculated using the current balance.
- The opening inventory is calculated using the desired balance.
- This process will ensure that the ledger balance and the inventory balance matches on the given date.
- Standard Cost Correction: This searches for transactions that are not accurately calculated.
- Cost adjustments must be optional. We cannot force users to use it.
- We should think on an initialization process through inventories.
- There is a performance concern on the first cost adjustment process as more transactions will be needed to process.
- A execution of a Balance amount update process might be required to initialize cost adjustments.
- When the balance amount is updated any transaction prior to that process is considered as adjusted.
- If a cost adjustment is done to any of them the balance on the given date would change.
- What happens is a backdated transaction is registered in the system after a balance update is done?
- Balance for 31st of January is set to be 1000EUR.
- Later a receipt of 25th of January is registered on 10th of February.
- The receipt cost is calculated generating a new average cost as of 10th February.
- The receipt cannot be adjusted to 25th of January as it would change the balance of 1000EUR.
- Shall the cost and the average be calculated at all?
- Shall the cost be adjusted from the 1st of February?
- Manufacturing product have to be considered when searching for affected transactions.
- If the cost of a Raw Material (P- production type) is adjusted. The related produced product transactions costs need to be updated accordingly.
- The Standard Cost Correction process ensures a sync point on the given date between the ledger and the inventory. This process updates both of them.
- A backdated transaction will require to update both ledger and inventory.
- A difference in order/invoice price does not require to update the ledger of the related receipt as it is done by the match inv document. But related transactions do need to update both ledger and inventory.
- When a shipment is adjusted it is required to update the COGS account.
- The Standard Cost Correction computes the adjustments of all transactions affected. Even those in a date after the reference date.
- It is possible to register backdated transactions on dates before the last adjustment process.
- The adjustments are cumulative so it is possible to adjust more than once every transaction.
- The posting of the adjustments is done in a different process.
- The Cost Adjustment document does not generate postings when it is processed.
- When an adjustment is done on a reference date there can be related transactions after the reference date whose adjustment has to be posted on a later date.
- A new document/process is needed to post the adjustment.
- This process searches for adjustments done on a date before the reference date of the process and post them to the ledger on the reference date.
- As the adjustment is done on a date different than the posting the valued stock report amount and the ledger balance only matches on the dates the adjustments are posted.
- When a period is closed it should be checked that all the adjustments have been posted.
- Should we allow a easy process where all adjustments are posted on the same date than the original transaction?
- A formula to detect the transactions that require an adjustment has to be defined.
- Based on this formula the transactions need to be flagged as:
- Needs adjustments.
- Do not need adjustment.
- Unknown status.
- This formula can be reviewed when:
- Transaction cost is calculated by Cost Engine.
- A backdated document is processed.
- By a background process executed periodically.
- A purchase invoice is processed with a difference in price.
- The formula should consider partial invoicing of a receipt.
- It has to be considered the case of receipts invoiced in more than one invoice and only one of them changes the price.
- It has to considered the possibility of reactivating of a invoice and changing the price.
- A invoice is processed with a wrong price.
- The cost adjustment is done with the wrong price.
- The invoice is reactivated and the price changed to the correct one, which is the order price.
- There are 2 possibilities:
- A new cost adjustment is done so the sum of both adjustments is zero.
- The original adjustment is deleted. We would require to unpost it in case it is already posted.
- The original adjustment needs to be reactivated or canceled when the invoice is reactivated. New process to consider (reactivating/canceling of existing adjustments).
- Based on this formula the transactions need to be flagged as:
- Based on previous bullet. It should be possible to reactivate or cancel processed cost adjustments.
- Incorrect landed cost.
- Reopening and modification of a purchase invoice.
- Reopening and modification of a purchase order whose receipt is processed and cost calculated.
- Is it possible?
- Should we create an adjustment?
- Transactions have to be ordered by the document date and then the transaction process date.
- If this order is different than ordering just by the transaction process date there is a backdated transaction.
- The backdated transaction is calculated on the last second of the movement date.
- If there is more than one transaction backdated on the same movement date they are calculated in the same order they were registered.
- How affect to cost adjustments a change in the Costing Rule.
- When a new costing rule is processed we can:
- Do nothing and let the cost adjustment process check the corresponding rule/algorithm on each transaction.
- Force to do a cost adjustment before processing the new rule. What is the formula to know that user wants to use adjustments?
- Set as adjusted all prior transactions.
- We already do closing/opening inventories when a costing rule is processed. but user is not able to correct the opening inventory costs.
- The are still able to create an adjustment setting the desired balance on the costing rule processing date.
- Even though the rule or algorithm is changed it might still be feasible to create an adjustment on a date before the rule was changed and be able to search all the related transactions after the rule change.
- What happens if the backdated transaction has a movement date whose algorithm in use does not support adjustments.
- When a new costing rule is processed we can: