Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0035300Openbravo ERP04. Warehouse managementpublic2017-02-17 13:412017-03-15 20:21
ngarcia 
mcobas 
urgentmajoralways
closedfixed 
5
 
3.0PR17Q2 
markmm82
Core
No
0035300: Empty error message when applying a cost adjustment to a transaction associated to a work effort line
Empty error message when applying a cost adjustment to a transaction associated to a work effort line
As group admin role:
   Create two products and set them as Production
   Create an Activity
   Do not set a Cost Center to it
   Create a Process Plan, a Version and an Operation
   Assign the previously created Activity to it
   Add the previously created two products to it: one as P+ and the other one as P-
   Create a Work Requirement and assign the previously created Process Plan and process it
   Create a goods receipt and add the P- product
   Create Work Effort from the Work Requirement and validate it
   Launch the Costing Background Process and check it finishes successfully
   The cost of the transactions associated to work effort lines should be 0 as the cost center was not defined (see related issue)
   Go to P- product, select the transaction associated to the work effort and click on Manual Cost Adjustment button
   Set a Total Cost Amount and select Incremental and Unit Cost
   Check an empty error message is shown. The logs shows:
      ERROR org.openbravo.costing.ManualCostAdjustmentProcessHandler - Error in CostAdjustmentProcessHandler: null
java.lang.NullPointerException
    at java.math.BigDecimal.multiply(BigDecimal.java:1302)
    at org.openbravo.costing.CostingAlgorithmAdjustmentImp.searchManufacturingProduced(CostingAlgorithmAdjustmentImp.java:284)
    at org.openbravo.costing.CostingAlgorithmAdjustmentImp.addCostDependingTrx(CostingAlgorithmAdjustmentImp.java:190)
    at org.openbravo.costing.CostingAlgorithmAdjustmentImp.searchRelatedTransactionCosts(CostingAlgorithmAdjustmentImp.java:155)
No tags attached.
related to feature request 0025105 new Triage Omni OMS The Production cost should be calculated independently if the Cost center is defined in the Production Run 
Issue History
2017-02-17 13:41ngarciaNew Issue
2017-02-17 13:41ngarciaAssigned To => Triage Finance
2017-02-17 13:41ngarciaModules => Core
2017-02-17 13:41ngarciaResolution time => 1489100400
2017-02-17 13:41ngarciaTriggers an Emergency Pack => No
2017-02-17 13:46ngarciaRelationship addedrelated to 0025105
2017-02-17 13:46ngarciaIssue Monitored: networkb
2017-02-17 14:54markmm82Assigned ToTriage Finance => collazoandy4
2017-02-22 17:44IntegritasIssue Monitored: Integritas
2017-02-24 14:07ngarciaSummaryEmpty error message when applying a manual cost adjustment to a transaction associated to a work effort line => Empty error message when applying a cost adjustment to a transaction associated to a work effort line
2017-02-24 14:07ngarciaDescription Updatedbug_revision_view_page.php?rev_id=14675#r14675
2017-03-07 18:41hgbotCheckin
2017-03-07 18:41hgbotNote Added: 0094811
2017-03-07 18:41hgbotStatusnew => resolved
2017-03-07 18:41hgbotResolutionopen => fixed
2017-03-07 18:41hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/11a7d575cf55dddbf47253f4a8e54b59f84b0cba [^]
2017-03-07 18:43markmm82Review Assigned To => markmm82
2017-03-07 18:43markmm82Note Added: 0094812
2017-03-07 18:43markmm82Statusresolved => closed
2017-03-07 18:43markmm82Fixed in Version => 3.0PR17Q2
2017-03-08 18:09markmm82Assigned Tocollazoandy4 => mcobas
2017-03-15 20:21hudsonbotCheckin
2017-03-15 20:21hudsonbotNote Added: 0095276

Notes
(0094811)
hgbot   
2017-03-07 18:41   
Repository: erp/devel/pi
Changeset: 11a7d575cf55dddbf47253f4a8e54b59f84b0cba
Author: Miguel <martencobasmiguel <at> gmail.com>
Date: Tue Mar 07 12:15:04 2017 -0500
URL: http://code.openbravo.com/erp/devel/pi/rev/11a7d575cf55dddbf47253f4a8e54b59f84b0cba [^]

Fixes issue 35300: Empty error message when applying a manual cost adjustment
to a transaction associated to a work effort line

This happens trying to multiply by a line component cost not calculated. If the
component cost is not calculated then it have a null value and multiplication fails.

Only multiplies for the Component Cost in the case that it be different than null.

---
M src/org/openbravo/costing/CostingAlgorithmAdjustmentImp.java
---
(0094812)
markmm82   
2017-03-07 18:43   
Code review + Testing OK
(0095276)
hudsonbot   
2017-03-15 20:21   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/54e102bef53e [^]
Maturity status: Test