Openbravo Issue Tracking System - Modules
View Issue Details
0027488ModulesPayment Aging Balance Reportpublic2014-08-28 10:042014-10-15 18:15
maite 
fsoto82 
urgentmajoralways
closedfixed 
5
 
 
vmromanos
0027488: "Error evaluation expression" SUMDOUBTFULTOTAL when running report
In that case, problem is with expression
$V{SUMDOUBTFULTOTAL}.divide( $V{SUMNETTOTAL}, 5, RoundingMode.HALF_UP ).multiply(new BigDecimal("100"))
because, under some circumstances, variable $V{SUMDOUBTFULTOTAL} is null or $V{SUMNETTOTAL} is zero
Launch report where variable $V{SUMDOUBTFULTOTAL} is null or $V{SUMNETTOTAL} is zero
Expressions containing SUMDOUBTFULTOTAL need to be reviewed verifying if variables are null or zero to properly handle situation in AgingScheduleDetailHTML.jrxml , AgingScheduleDetailPDFDoubtfulDebt.jrxml and AgingScheduleDetailXLSDoubtfulDebt.jrxml.

Expression needs to be changed to:

$V{SUMDOUBTFULTOTAL}.divide( $V{SUMNETTOTAL}.doubleValue() == 0 ? new BigDecimal("1"):$V{SUMNETTOTAL}, 5, RoundingMode.HALF_UP ).multiply(new BigDecimal("100"))

No tags attached.
diff 27488.diff (3,074) 2014-08-28 10:16
https://issues.openbravo.com/file_download.php?file_id=7170&type=bug
Issue History
2014-08-28 10:04maiteNew Issue
2014-08-28 10:04maiteAssigned To => dmiguelez
2014-08-28 10:09maiteIssue Monitored: networkb
2014-08-28 10:16maiteFile Added: 27488.diff
2014-09-01 16:29jonalegriaesarteResolution time => 1411855200
2014-10-03 05:47fsoto82Statusnew => scheduled
2014-10-03 05:47fsoto82Assigned Todmiguelez => fsoto82
2014-10-03 05:47fsoto82fix_in_branch => pi
2014-10-15 17:57hgbotCheckin
2014-10-15 17:57hgbotNote Added: 0070975
2014-10-15 17:57hgbotStatusscheduled => resolved
2014-10-15 17:57hgbotResolutionopen => fixed
2014-10-15 17:57hgbotFixed in SCM revision => http://code.openbravo.com/erp/mods/org.openbravo.agingbalance/rev/d8e87dec85b308fbbbc24ca04582ef5af5763fb7 [^]
2014-10-15 17:58vmromanosReview Assigned To => vmromanos
2014-10-15 17:58vmromanosNote Added: 0070976
2014-10-15 17:58vmromanosStatusresolved => closed
2014-10-15 18:15vmromanosNote Added: 0070977

Notes
(0070975)
hgbot   
2014-10-15 17:57   
Repository: erp/mods/org.openbravo.agingbalance
Changeset: d8e87dec85b308fbbbc24ca04582ef5af5763fb7
Author: Fernando Soto <fernando.soto <at> peoplewalking.com>
Date: Thu Oct 09 00:21:37 2014 -0500
URL: http://code.openbravo.com/erp/mods/org.openbravo.agingbalance/rev/d8e87dec85b308fbbbc24ca04582ef5af5763fb7 [^]

Fixed bug 27488: "Error evaluation expression" SUMDOUBTFULTOTAL when run report

Fixed reports to void division by 0.

---
M src/org/openbravo/agingbalance/ad_reports/AgingScheduleDetailHTML.jrxml
M src/org/openbravo/agingbalance/ad_reports/AgingScheduleDetailPDFDoubtfulDebt.jrxml
M src/org/openbravo/agingbalance/ad_reports/AgingScheduleDetailXLSDoubtfulDebt.jrxml
---
(0070976)
vmromanos   
2014-10-15 17:58   
Code review OK
(0070977)
vmromanos   
2014-10-15 18:15   
Released new module version 3.1.36