Openbravo Issue Tracking System - Modules
View Issue Details
0033379ModulesFIFO Costing Algorithmpublic2016-06-29 18:572016-07-14 14:16
ngarcia 
markmm82 
urgentmajoralways
closedfixed 
5
 
 
aferraz
0033379: Cannot validate a new Costing Rule after validating a costing rule with FIFO algorithm
Cannot validate a new Costing Rule after validating a costing rule with FIFO algorithm
As system admin role:
   Install FIFO Costing Algorithm module
As group admin role:
   Check there exists stock for an organization
   Validate a costing rule with FIFO Costing Algorithm for that organization
   Launch the Costing Background process and check it finishes successfully
   Validate a new costing rule for the same organization with Average Algorithm
   The following error message is shown: Session is closed!
   The log shows:
      ERROR org.openbravo.costing.CostingUtils -
org.openbravo.base.exception.OBException: @OBWFA_NotOutgoingTransaction@ @Organization@: F&B US, Inc., @Product@: Orange Juice bio, @Date@: 29-06-2016
    at org.openbravo.costing.algorithm.fifo.FifoAlgorithm.getOutgoingTransactionCost(FifoAlgorithm.java:152)
    at org.openbravo.costing.CostingAlgorithm.getInventoryDecreaseCost(CostingAlgorithm.java:363)
    at org.openbravo.costing.CostingAlgorithm.getInventoryClosingCost(CostingAlgorithm.java:397)
    at org.openbravo.costing.CostingAlgorithm.getTransactionCost(CostingAlgorithm.java:127)
    at org.openbravo.costing.algorithm.fifo.FifoAlgorithm.getTransactionCost(FifoAlgorithm.java:123)
    at org.openbravo.costing.CostingServer.process(CostingServer.java:106)
    at org.openbravo.costing.CostingUtils.getTransactionCost(CostingUtils.java:113)
    at org.openbravo.costing.CostingRuleProcess.updateInventoriesCostAndProcessInitInventories(CostingRuleProcess.java:582)
    at org.openbravo.costing.CostingRuleProcess.execute(CostingRuleProcess.java:133)
    at org.openbravo.costing.CostingRuleProcessActionHandler.doExecute(CostingRuleProcessActionHandler.java:66)
No tags attached.
has duplicate defect 0034671 closed Triage Omni OMS Modules "InventoryClosing" transaction type needs to be included in "isOutgoingTrx" method in FifoAlgorithm,java 
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 
Issue History
2016-06-29 18:57ngarciaNew Issue
2016-06-29 18:57ngarciaAssigned To => Triage Finance
2016-06-29 18:57ngarciaModules => Core
2016-06-29 18:57ngarciaResolution time => 1468965600
2016-06-29 18:57ngarciaTriggers an Emergency Pack => No
2016-06-29 18:59ngarciaIssue Monitored: networkb
2016-06-30 14:56aferrazAssigned ToTriage Finance => markmm82
2016-07-11 21:04markmm82Statusnew => scheduled
2016-07-13 18:11ngarciaPriorityimmediate => urgent
2016-07-14 14:13hgbotCheckin
2016-07-14 14:13hgbotNote Added: 0088486
2016-07-14 14:13hgbotStatusscheduled => resolved
2016-07-14 14:13hgbotResolutionopen => fixed
2016-07-14 14:13hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.costing.algorithm.fifo/rev/7d5b2828e4d1f6dac01421189bae77298d5b3514 [^]
2016-07-14 14:13hgbotCheckin
2016-07-14 14:13hgbotNote Added: 0088487
2016-07-14 14:15aferrazProjectOpenbravo ERP => Modules
2016-07-14 14:16aferrazCategory04. Warehouse management => FIFO Costing Algorithm
2016-07-14 14:16aferrazReview Assigned To => aferraz
2016-07-14 14:16aferrazNote Added: 0088488
2016-07-14 14:16aferrazStatusresolved => closed
2016-08-02 14:19ngarciaRelationship addedrelated to 0033599
2016-12-01 19:51aferrazRelationship addedrelated to 0034671
2016-12-02 15:06aferrazRelationship deletedrelated to 0034671
2016-12-02 15:06aferrazRelationship addedhas duplicate 0034671

Notes
(0088486)
hgbot   
2016-07-14 14:13   
Repository: erp/pmods/org.openbravo.costing.algorithm.fifo
Changeset: 7d5b2828e4d1f6dac01421189bae77298d5b3514
Author: Mark <markmm82 <at> gmail.com>
Date: Wed Jul 13 14:29:59 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.costing.algorithm.fifo/rev/7d5b2828e4d1f6dac01421189bae77298d5b3514 [^]

Fixes issue 33379: Allow to validate new Costing Rule after run FIFO algorithm

Now is possible to validate a new Costing Rule after validating a costing rule with FIFO algorithm. The InventoryOpening type was added to the list checked by the isIncomingTrx method, and similar to InventoryClosing to the isOutcomingTrx. This way when a new costing rule run after validate previous costing rule with fifo algorithm, transactions of InventoryOpening creates entries inside OBWFA_Input_Stack. Then when the average costing rule is validated the transactions of type = InventoryClosing will use these entries and the process finishes well.

---
M src/org/openbravo/costing/algorithm/fifo/FifoAlgorithm.java
---
(0088487)
hgbot   
2016-07-14 14:13   
Repository: erp/pmods/org.openbravo.costing.algorithm.fifo
Changeset: b88be31b1dfcc622ea5318bf85daa9b41ba08573
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Thu Jul 14 14:03:26 2016 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.costing.algorithm.fifo/rev/b88be31b1dfcc622ea5318bf85daa9b41ba08573 [^]

Related to issue 33379: Update module version

---
M src-db/database/sourcedata/AD_MODULE.xml
---
(0088488)
aferraz   
2016-07-14 14:16   
Code review + Testing OK