Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030448Openbravo ERP04. Warehouse managementpublic2015-07-29 11:482015-08-20 23:16
ngarcia 
aferraz 
immediatemajoralways
closedfixed 
5
 
 
dmiguelez
Core
No
0030448: Landed Cost cannot be processed if the cost of the included goods receipt line is not calculated
Landed Cost cannot be processed if the cost of the included goods receipt line is not calculated
As group admin role:
   Unschedule the Costing Background process
   Create a Goods Receipt for a product and complete it
   Create a service product
   Create a Landed Cost Type, assign the previously created product and select the Distribution by Amount algorithm
   Create a Landed Cost and add a record in the Cost tab
   Add the previously created goods receipt and line in the Receipt tab
   Try to process it and check an empty error message is shown
   The log shows:
      867946fe 699096 [http-5080-1] ERROR org.openbravo.costing.LandedCostProcessHandler - Error in LandedCostProcessHandler: null
java.lang.NullPointerException
    at java.util.Calendar.setTime(Calendar.java:1092)
    at java.text.SimpleDateFormat.format(SimpleDateFormat.java:876)
    at java.text.SimpleDateFormat.format(SimpleDateFormat.java:869)
    at java.text.DateFormat.format(DateFormat.java:333)
    at org.openbravo.costing.CostingUtils.periodClosed(CostingUtils.java:543)
    at org.openbravo.costing.CostAdjustmentProcess.doChecks(CostAdjustmentProcess.java:113)
    at org.openbravo.costing.CostAdjustmentProcess.processCostAdjustment(CostAdjustmentProcess.java:81)
    at org.openbravo.costing.CostAdjustmentProcess.doProcessCostAdjustment(CostAdjustmentProcess.java:329)
    at org.openbravo.costing.LandedCostProcess.generateCostAdjustment(LandedCostProcess.java:258)
    at org.openbravo.costing.LandedCostProcess.processLandedCost(LandedCostProcess.java:97)
    at org.openbravo.costing.LandedCostProcess.doProcessLandedCost(LandedCostProcess.java:282)
    at org.openbravo.costing.LandedCostProcessHandler.execute(LandedCostProcessHandler.java:45)
No tags attached.
Issue History
2015-07-29 11:48ngarciaNew Issue
2015-07-29 11:48ngarciaAssigned To => Triage Finance
2015-07-29 11:48ngarciaModules => Core
2015-07-29 11:48ngarciaTriggers an Emergency Pack => No
2015-07-29 11:49ngarciaIssue Monitored: networkb
2015-07-29 11:50ngarciaResolution time => 1441663200
2015-07-29 17:21ngarciaResolution time1441663200 => 1438380000
2015-07-29 17:21ngarciaPriorityurgent => immediate
2015-08-06 14:13aferrazAssigned ToTriage Finance => aferraz
2015-08-07 10:00aferrazNote Added: 0079243
2015-08-07 10:02aferrazNote Edited: 0079243bug_revision_view_page.php?bugnote_id=0079243#r9174
2015-08-17 11:03hgbotCheckin
2015-08-17 11:03hgbotNote Added: 0079384
2015-08-17 11:03hgbotStatusnew => resolved
2015-08-17 11:03hgbotResolutionopen => fixed
2015-08-17 11:03hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/955c70f3434d3f42e0e0b46ecf9957ff4b30e579 [^]
2015-08-17 11:04dmiguelezReview Assigned To => dmiguelez
2015-08-17 11:04dmiguelezNote Added: 0079385
2015-08-17 11:04dmiguelezStatusresolved => closed
2015-08-20 23:16hudsonbotCheckin
2015-08-20 23:16hudsonbotNote Added: 0079555

Notes
(0079243)
aferraz   
2015-08-07 10:00   
(edited on: 2015-08-07 10:02)
Test Plan:

As QA Admin:

Create a Goods Receipt for a product and complete it.
Create a Landed Cost and add a record in the Cost tab.
Add the previously created goods receipt in the Receipt tab.
Try to process it and check "It is not possible to process a Landed Cost that has some Receipts assigned whose cost is not available" error message is shown.

Add the previously created goods receipt line in the Receipt tab.
Try to process it and check "It is not possible to process a Landed Cost that has some Receipts assigned whose cost is not available" error message is shown.

Go to Process Request and schedule Costing Background process

Create another Landed Cost and add a record in the Cost tab.
Add the previously created goods receipt in the Receipt tab.
Process the landed cost.
Check "Process completed successfully" message is shown.

Create another Landed Cost and add a record in the Cost tab.
Add the previously created goods receipt and goods receipt line in the Receipt tab.
Process the landed cost.
Check "Process completed successfully" message is shown.

(0079384)
hgbot   
2015-08-17 11:03   
Repository: erp/devel/pi
Changeset: 955c70f3434d3f42e0e0b46ecf9957ff4b30e579
Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com>
Date: Fri Aug 07 09:45:38 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/955c70f3434d3f42e0e0b46ecf9957ff4b30e579 [^]

Fixes bug 30448: Wrong message when processing a LC with no calculated receipt

Query to check that when processing a Landed Cost all related receipt lines have their cost already calculated was wrong.
In that case, LandedCostReceiptWithoutCosts error was not shown and a NPE was raised later.

---
M src/org/openbravo/costing/LandedCostProcess.java
---
(0079385)
dmiguelez   
2015-08-17 11:04   
Code Review + Testing Ok
(0079555)
hudsonbot   
2015-08-20 23:16   
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/8c91718397a5 [^]
Maturity status: Test