Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0033553Openbravo ERP05. Production managementpublic2016-07-28 10:562016-08-11 18:40
ngarcia 
markmm82 
urgentmajoralways
closedfixed 
5
 
3.0PR16Q4 
aferraz
Core
No
0033553: Division by zero error in Standard Costs Report if Decrease or Rejected fields are 0 for produced products in the Process Plan
Division by zero error in Standard Costs Report if Decrease or Rejected fields are 0 for produced products in the Process Plan. The report is shown empty
As group admin role:
   Create a Process Plan, Version and Operation
   Add a record in the I/O Products tab:
      Production Type: Product Production (P+)
      Decrease: 0
      Rejected: 0
   Launch the Standard Costs Report and select the previously created plan and version
   Check the report is shown empty and the log shows:
      ERROR net.sf.jasperreports.engine.fill.JRFillSubreport - Fill 1: exception
net.sf.jasperreports.engine.JRException: Error executing SQL statement for : ReportStandardCostsJR_subreport0
    at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:240)
    ...
Caused by: org.postgresql.util.PSQLException: ERROR: division by zero
No tags attached.
Issue History
2016-07-28 10:56ngarciaNew Issue
2016-07-28 10:56ngarciaAssigned To => Triage Finance
2016-07-28 10:56ngarciaModules => Core
2016-07-28 10:56ngarciaResolution time => 1471471200
2016-07-28 10:56ngarciaTriggers an Emergency Pack => No
2016-07-28 11:03ngarciaIssue Monitored: networkb
2016-07-28 12:09aferrazAssigned ToTriage Finance => markmm82
2016-07-28 18:08markmm82Statusnew => acknowledged
2016-07-29 15:25markmm82Statusacknowledged => scheduled
2016-08-01 21:41markmm82Note Added: 0088713
2016-08-08 14:29hgbotCheckin
2016-08-08 14:29hgbotNote Added: 0088893
2016-08-08 14:29hgbotStatusscheduled => resolved
2016-08-08 14:29hgbotResolutionopen => fixed
2016-08-08 14:29hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/e49203fbb0c9ae2d52c48db4fab1dd521e3edfb6 [^]
2016-08-08 14:30aferrazReview Assigned To => aferraz
2016-08-08 14:30aferrazNote Added: 0088894
2016-08-08 14:30aferrazStatusresolved => closed
2016-08-08 14:30aferrazFixed in Version => 3.0PR16Q4
2016-08-11 18:40hudsonbotCheckin
2016-08-11 18:40hudsonbotNote Added: 0089047

Notes
(0088713)
markmm82   
2016-08-01 21:41   
Test Plan
As group admin role:
   Create a Process Plan, Version and Operation
   Add a record in the I/O Products tab:
      Production Type: Product Production (P+)
      Decrease: 0
      Rejected: 0
   Launch the Standard Costs Report and select the previously created plan and version
   Check the report is shown and log shows any error.
(0088893)
hgbot   
2016-08-08 14:29   
Repository: erp/devel/pi
Changeset: e49203fbb0c9ae2d52c48db4fab1dd521e3edfb6
Author: Mark <markmm82 <at> gmail.com>
Date: Mon Aug 01 02:13:20 2016 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/e49203fbb0c9ae2d52c48db4fab1dd521e3edfb6 [^]

Fixes issue 33553: Avoid division by zero error in Standard Costs Report

A Division by zero error in Standard Costs Report was happening if Decrease or Rejected fields are 0 for produced products in the Process Plan. To avoid it, a validation was included to the report.

---
M src/org/openbravo/erpCommon/ad_reports/ReportStandardCostsJR_subreport0.jrxml
---
(0088894)
aferraz   
2016-08-08 14:30   
Code review + Testing OK
(0089047)
hudsonbot   
2016-08-11 18:40   
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/edaa05b1fb18 [^]
Maturity status: Test