Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0037766Openbravo ERP07. Sales managementpublic2018-01-30 11:152018-02-22 18:18
pramodkumar 
collazoandy4 
highmajoralways
closedfixed 
5
main 
3.0PR18Q2 
dmiguelez
Core
Production - Confirmed Stable
2017-01-10
https://code.openbravo.com/erp/devel/pi/rev/49e2bc878d1e [^]
No
0037766: Sales Invoice Dimensional Report in Excel - error 0/0
If Sales Invoice Dimensional report is executed in excel (pdf is working fine) with invoices that have a total amount of zero an error is raising:


24df6f05 2018-01-26 13:45:58,345 [ajp-bio-127.0.0.1-8009-exec-1] ERROR org.openbravo.erpCommon.ad_reports.ReportInvoiceCustomerDimensionalAnalysesJR - Error
captured:
javax.servlet.ServletException: Error evaluating expression :
Source text : $V{totalProfit}.divide($V{totalAmt}, 10, BigDecimal.ROUND_HALF_UP).multiply( new BigDecimal("100") ).multiply(new BigDecimal($V{totalProfit}.signum()))
at org.openbravo.base.secureApp.HttpSecureAppServlet.renderJR(HttpSecureAppServlet.java:1306)
at org.openbravo.base.secureApp.HttpSecureAppServlet.renderJR(HttpSecureAppServlet.java:1205)
at org.openbravo.erpCommon.ad_reports.ReportInvoiceCustomerDimensionalAnalysesJR.printPageHtml(ReportInvoiceCustomerDimensionalAnalysesJR.java:1036)
at org.openbravo.erpCommon.ad_reports.ReportInvoiceCustomerDimensionalAnalysesJR.doPost(ReportInvoiceCustomerDimensionalAnalysesJR.java:299)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
at org.openbravo.base.HttpBaseServlet.serviceInitialized(HttpBaseServlet.java:228)
at org.openbravo.base.secureApp.HttpSecureAppServlet.service(HttpSecureAppServlet.java:462)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
1.Create any sales invoices with zero amount
2.Open sales invoice dimensional reports and pass the minimum parameter to get the report corresponding to customers.
3.Select the excel format report(Pdf working fine).

No tags attached.
depends on backport 00377813.0PR18Q1 closed collazoandy4 Sales Invoice Dimensional Report in Excel - error 0/0 
depends on backport 00377823.0PR17Q4.1 closed collazoandy4 Sales Invoice Dimensional Report in Excel - error 0/0 
caused by feature request 0033206 closed airaceburu More Sales Invoice Dimensional Report Totals 
Issue History
2018-01-30 11:15pramodkumarNew Issue
2018-01-30 11:15pramodkumarAssigned To => Triage Finance
2018-01-30 11:15pramodkumarModules => Core
2018-01-30 11:15pramodkumarResolution time => 1518390000
2018-01-30 11:15pramodkumarTriggers an Emergency Pack => No
2018-01-30 16:35egoitzTypedesign defect => defect
2018-01-30 16:35egoitzSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=16613#r16613
2018-01-30 16:48egoitzRegression level => Production - Confirmed Stable
2018-01-30 16:54jpcalventeIssue Monitored: jpcalvente
2018-01-30 17:16jfrancesIssue Monitored: jfrances
2018-01-30 17:33dmiguelezAssigned ToTriage Finance => collazoandy4
2018-01-30 22:09collazoandy4Statusnew => scheduled
2018-01-30 23:26collazoandy4Statusscheduled => feedback
2018-01-30 23:27collazoandy4Statusfeedback => scheduled
2018-01-30 23:28collazoandy4Regression introduced by commit => 49e2bc878d1e
2018-01-30 23:34collazoandy4Regression date => 2017-01-10
2018-01-30 23:34collazoandy4Regression introduced by commit49e2bc878d1e => https://code.openbravo.com/erp/devel/pi/rev/49e2bc878d1e [^]
2018-01-31 17:34collazoandy4Note Added: 0102097
2018-02-01 09:55hgbotCheckin
2018-02-01 09:55hgbotNote Added: 0102102
2018-02-01 09:55hgbotStatusscheduled => resolved
2018-02-01 09:55hgbotResolutionopen => fixed
2018-02-01 09:55hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/1036387e70120a45b378f29300bf5590ad7e322d [^]
2018-02-01 09:55hgbotCheckin
2018-02-01 09:55hgbotNote Added: 0102103
2018-02-01 09:55hgbotCheckin
2018-02-01 09:55hgbotNote Added: 0102104
2018-02-01 09:55hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/1036387e70120a45b378f29300bf5590ad7e322d [^] => http://code.openbravo.com/erp/backports/3.0PR18Q1/rev/05baa2c353ce551b12cc59de8288ea62c6ee6614 [^]
2018-02-01 09:55hgbotCheckin
2018-02-01 09:55hgbotNote Added: 0102105
2018-02-01 09:55hgbotCheckin
2018-02-01 09:55hgbotNote Added: 0102106
2018-02-01 09:55hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/backports/3.0PR18Q1/rev/05baa2c353ce551b12cc59de8288ea62c6ee6614 [^] => http://code.openbravo.com/erp/backports/3.0PR17Q4.1/rev/79e59dce5573cc18fcc9a0802d969431e7bff2c3 [^]
2018-02-01 09:55hgbotCheckin
2018-02-01 09:55hgbotNote Added: 0102107
2018-02-01 10:00dmiguelezReview Assigned To => dmiguelez
2018-02-01 10:00dmiguelezNote Added: 0102112
2018-02-01 10:00dmiguelezStatusresolved => closed
2018-02-01 10:00dmiguelezFixed in Version => 3.0PR18Q2
2018-02-01 19:43dmitry_mezentsevRelationship addedcaused by 0033206
2018-02-22 18:18hudsonbotCheckin
2018-02-22 18:18hudsonbotNote Added: 0102703
2018-02-22 18:18hudsonbotCheckin
2018-02-22 18:18hudsonbotNote Added: 0102704

Notes
(0102097)
collazoandy4   
2018-01-31 17:34   
Test Plan
  Go to Sales Invoice window and create a new record:
    Business Partner: Alimentos y Supermercados, S.A
    Create a new record in Lines tab:
      Product: Agua sin Gas 1L
      Net Unit Price: 0
    Complete the invoice
  Create another record in header tab:
    Business Partner: Alimentos y Supermercados, S.A
    Create a new record in Lines tab:
      Product: Bebida Energética 0,5L
    Complete the invoice
  Go to Sales Invoice Dimensional Report window and set:
    From/To Date: Today
    Organization: F&B España Region Norte
    Dimensions: Product
    Check that the report is shown (The two previous invoices) in all the three formats (HTML, PDF, EXCEL) without any error
(0102102)
hgbot   
2018-02-01 09:55   
Repository: erp/devel/pi
Changeset: 1036387e70120a45b378f29300bf5590ad7e322d
Author: Armaignac <collazoandy4 <at> gmail.com>
Date: Tue Jan 30 17:11:54 2018 -0500
URL: http://code.openbravo.com/erp/devel/pi/rev/1036387e70120a45b378f29300bf5590ad7e322d [^]

Fixes issue 37766: Sales Invoice Dimensional Report in Excel - error 0/0

A division by zero was taking place when the total amount of the invoice is zero

A validation was added to avoid division by zero when total amount is zero.

---
M src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalysesXLS.jrxml
---
(0102103)
hgbot   
2018-02-01 09:55   
Repository: erp/devel/pi
Changeset: be19769dbaea3c64737e8f21f960b37549cae36f
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Thu Feb 01 09:53:27 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/be19769dbaea3c64737e8f21f960b37549cae36f [^]

Related to Issue 37766. Code review changes.

Changed comparison to work as other outputs (PDF, HTML).
If the totalAmount is zero, then the margin is zero.

---
M src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalysesXLS.jrxml
---
(0102104)
hgbot   
2018-02-01 09:55   
Repository: erp/backports/3.0PR18Q1
Changeset: 05baa2c353ce551b12cc59de8288ea62c6ee6614
Author: Armaignac <collazoandy4 <at> gmail.com>
Date: Tue Jan 30 17:11:54 2018 -0500
URL: http://code.openbravo.com/erp/backports/3.0PR18Q1/rev/05baa2c353ce551b12cc59de8288ea62c6ee6614 [^]

Fixes issue 37766: Sales Invoice Dimensional Report in Excel - error 0/0

A division by zero was taking place when the total amount of the invoice is zero

A validation was added to avoid division by zero when total amount is zero.

---
M src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalysesXLS.jrxml
---
(0102105)
hgbot   
2018-02-01 09:55   
Repository: erp/backports/3.0PR18Q1
Changeset: d9b6eab2cbe943f9a4cb454423211ebfcffb2d58
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Thu Feb 01 09:53:27 2018 +0100
URL: http://code.openbravo.com/erp/backports/3.0PR18Q1/rev/d9b6eab2cbe943f9a4cb454423211ebfcffb2d58 [^]

Related to Issue 37766. Code review changes.

Changed comparison to work as other outputs (PDF, HTML).
If the totalAmount is zero, then the margin is zero.

---
M src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalysesXLS.jrxml
---
(0102106)
hgbot   
2018-02-01 09:55   
Repository: erp/backports/3.0PR17Q4.1
Changeset: 79e59dce5573cc18fcc9a0802d969431e7bff2c3
Author: Armaignac <collazoandy4 <at> gmail.com>
Date: Tue Jan 30 17:11:54 2018 -0500
URL: http://code.openbravo.com/erp/backports/3.0PR17Q4.1/rev/79e59dce5573cc18fcc9a0802d969431e7bff2c3 [^]

Fixes issue 37766: Sales Invoice Dimensional Report in Excel - error 0/0

A division by zero was taking place when the total amount of the invoice is zero

A validation was added to avoid division by zero when total amount is zero.

---
M src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalysesXLS.jrxml
---
(0102107)
hgbot   
2018-02-01 09:55   
Repository: erp/backports/3.0PR17Q4.1
Changeset: 4f6f953c426099933159401ad6cbb8b9ff5e502a
Author: David Miguelez <david.miguelez <at> openbravo.com>
Date: Thu Feb 01 09:53:27 2018 +0100
URL: http://code.openbravo.com/erp/backports/3.0PR17Q4.1/rev/4f6f953c426099933159401ad6cbb8b9ff5e502a [^]

Related to Issue 37766. Code review changes.

Changed comparison to work as other outputs (PDF, HTML).
If the totalAmount is zero, then the margin is zero.

---
M src/org/openbravo/erpCommon/ad_reports/ReportInvoiceCustomerDimensionalAnalysesXLS.jrxml
---
(0102112)
dmiguelez   
2018-02-01 10:00   
Code Review + Testing Ok
(0102703)
hudsonbot   
2018-02-22 18:18   
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/980a6ad5bbf5 [^]
Maturity status: Test
(0102704)
hudsonbot   
2018-02-22 18:18   
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/980a6ad5bbf5 [^]
Maturity status: Test