Project:
View Revisions: Issue #29076 | [ All Revisions ] [ Back to Issue ] | ||
Summary | 0029076: [Cost Adjustments] / by zero error while calculating backdated cost for movement qty 0 receipt | ||
Revision | 2015-02-26 15:41 by umartirena | ||
Steps To Reproduce | In pgadmin III, open m_inout_post function: * Comment the 3 following lines (not reproducible in pi due to this issue https://issues.openbravo.com/view.php?id=26163 [^]): IF v_Message_Qty != '' THEN RAISE EXCEPTION '%', '@Inline@ '||v_Message_Qty||' '||'@ProductNotNullAndMovementQtyZero@' ; --OBTG:-20000-- END IF; * Save the function. In live.builds as F&B International: * Create a Product for F&B España. Add a Purchase Pricelist of 10. * Go to Goods Receipt and create a Header: - Org: F&B España - Movement Date: 05/02/2015 * Add a line: - Product: The created product - Movement Qty: 10 * Complete it * Create another Goods Receipt Header: - Org: F&B España - Movement Date: 15/02/2015 * Add a line: - Product: The created product - Movement Qty: 0 * Complete it * Create another Goods Receipt Header: - Org: F&B España - Movement Date: 10/02/2015 * Add a line: - Product: The created product - Movement Qty: 12 * Complete it * Run Costing Background process * Realize that following error is obtained: ERROR org.openbravo.costing.CostingBackground - / by zero java.lang.ArithmeticException: / by zero at java.math.BigDecimal.divideAndRound(BigDecimal.java:1424) at java.math.BigDecimal.divide(BigDecimal.java:1398) at java.math.BigDecimal.divide(BigDecimal.java:1513) at org.openbravo.costing.AverageCostAdjustment.getRelatedTransactionsByAlgorithm(AverageCostAdjustment.java:305) at org.openbravo.costing.CostingAlgorithmAdjustmentImp.searchRelatedTransactionCosts(CostingAlgorithmAdjustmentImp.java:160) |
||
Revision | 2015-02-26 13:03 by umartirena | ||
Steps To Reproduce | In pgadmin III, open m_inout_post function: * Comment the 3 following lines: IF v_Message_Qty != '' THEN RAISE EXCEPTION '%', '@Inline@ '||v_Message_Qty||' '||'@ProductNotNullAndMovementQtyZero@' ; --OBTG:-20000-- END IF; * Save the function. In live.builds as F&B International: * Create a Product for F&B España. Add a Purchase Pricelist of 10. * Go to Goods Receipt and create a Header: - Org: F&B España - Movement Date: 05/02/2015 * Add a line: - Product: The created product - Movement Qty: 10 * Complete it * Create another Goods Receipt Header: - Org: F&B España - Movement Date: 15/02/2015 * Add a line: - Product: The created product - Movement Qty: 0 * Complete it * Create another Goods Receipt Header: - Org: F&B España - Movement Date: 10/02/2015 * Add a line: - Product: The created product - Movement Qty: 12 * Complete it * Run Costing Background process * Realize that following error is obtained: ERROR org.openbravo.costing.CostingBackground - / by zero java.lang.ArithmeticException: / by zero at java.math.BigDecimal.divideAndRound(BigDecimal.java:1424) at java.math.BigDecimal.divide(BigDecimal.java:1398) at java.math.BigDecimal.divide(BigDecimal.java:1513) at org.openbravo.costing.AverageCostAdjustment.getRelatedTransactionsByAlgorithm(AverageCostAdjustment.java:305) at org.openbravo.costing.CostingAlgorithmAdjustmentImp.searchRelatedTransactionCosts(CostingAlgorithmAdjustmentImp.java:160) |
||
Revision | 2015-02-26 12:44 by umartirena | ||
Steps To Reproduce | In live.builds as F&B International: * Create a Product for F&B España. Add a Purchase Pricelist of 10. * Go to Goods Receipt and create a Header: - Org: F&B España - Movement Date: 05/02/2015 * Add a line: - Product: The created product - Movement Qty: 10 * Complete it * Create another Goods Receipt Header: - Org: F&B España - Movement Date: 15/02/2015 * Add a line: - Product: The created product - Movement Qty: 0 * Complete it * Create another Goods Receipt Header: - Org: F&B España - Movement Date: 10/02/2015 * Add a line: - Product: The created product - Movement Qty: 12 * Complete it * Run Costing Background process * Realize that following error is obtained: ERROR org.openbravo.costing.CostingBackground - / by zero java.lang.ArithmeticException: / by zero at java.math.BigDecimal.divideAndRound(BigDecimal.java:1424) at java.math.BigDecimal.divide(BigDecimal.java:1398) at java.math.BigDecimal.divide(BigDecimal.java:1513) at org.openbravo.costing.AverageCostAdjustment.getRelatedTransactionsByAlgorithm(AverageCostAdjustment.java:305) at org.openbravo.costing.CostingAlgorithmAdjustmentImp.searchRelatedTransactionCosts(CostingAlgorithmAdjustmentImp.java:160) |
Copyright © 2000 - 2009 MantisBT Group |