Openbravo Issue Tracking System - Modules
View Issue Details
0034670ModulesFIFO Costing Algorithmpublic2016-12-01 18:062016-12-02 15:07
maite 
Triage Omni OMS 
urgentmajoralways
closedno change required 
5
 
 
aferraz
0034670: CostingServer should check if current algorithm supports adjustments, when trying to adjust remainder value in inventory closing
CostingServer.java "check if closing inventory needs to be adjusted due to a remainder value" inside checkCostAdjustments method, line 314. In case current algorithm is not compatible with cost adjustments functionality (what happens with FIFO algorithm) following error is raised in the log so it is not possible to validate new costing rule: 'The algorithm used to calculate the cost of the transaction does not implement cost adjustments.'
1. In an instance using FIFO algorithm
2. Access Costing Rule window and create new rule for Average algorithm
3. Run "Validate costing rule" process and realize that error is raised
4. Check the log and you will find 'The algorithm used to calculate the cost of the transaction does not implement cost adjustments.'
It is necessary to check is algorithm implements cost adjustments functionality:

CostingAlgorithmAdjustmentImp costAdjImp = getAlgorithmAdjustmentImp(trx
          .getCostingAlgorithm().getJavaClassName());

And line in CostingServer.java file needs to also include this verification:

// check if closing inventory needs to be adjusted due to a remainder value
    if (trxType == TrxType.InventoryClosing && BigDecimal.ZERO.compareTo(currentStock) == 0){
No tags attached.
related to defect 0033599 closed nonofrancisco Openbravo ERP Cannot validate a new Costing Rule after validating a costing rule with FIFO algorithm if there exists negative stock 
depends on defect 0034671 closed Triage Omni OMS Modules "InventoryClosing" transaction type needs to be included in "isOutgoingTrx" method in FifoAlgorithm,java 
Issue History
2016-12-01 18:06maiteNew Issue
2016-12-01 18:06maiteAssigned To => Triage Finance
2016-12-01 18:06maiteModules => Core
2016-12-01 18:06maiteResolution time => 1482361200
2016-12-01 18:06maiteTriggers an Emergency Pack => No
2016-12-01 18:14maiteRelationship addeddepends on 0034671
2016-12-02 11:45aferrazRelationship addedrelated to 0033599
2016-12-02 15:06aferrazReview Assigned To => aferraz
2016-12-02 15:06aferrazNote Added: 0092041
2016-12-02 15:06aferrazStatusnew => closed
2016-12-02 15:06aferrazResolutionopen => no change required
2016-12-02 15:07aferrazProjectOpenbravo ERP => Modules
2016-12-02 15:07aferrazCategory04. Warehouse management => FIFO Costing Algorithm
2016-12-02 15:08aferrazNote Edited: 0092041bug_revision_view_page.php?bugnote_id=0092041#r13951

Notes
(0092041)
aferraz   
2016-12-02 15:06   
(edited on: 2016-12-02 15:08)
http://forge.openbravo.com/plugins/mwiki/index.php/FIFO#Negative_Stock [^]