Merge pull request 'fixes bug#AL-3278' (!275) from AL-3278 into master

Reviewed-on: adm/VentaBoletosAdm#275
Reviewed-by: Julio Heredia <julio@rjconsultores.com.br>
Reviewed-by: aristides <aristides@rjconsultores.com.br>
master 1.21.2
wallace 2023-09-21 14:44:56 +00:00
commit 5d542afb85
2 changed files with 11 additions and 3 deletions

View File

@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>br.com.rjconsultores</groupId>
<artifactId>ventaboletosadm</artifactId>
<version>1.21.1</version>
<version>1.21.2</version>
<packaging>war</packaging>
<properties>

View File

@ -83,12 +83,12 @@ public class RelatorioQuadroDemonstrativoMovimentoPassageirosNovoLayout extends
agrupar = true;
if (ida == 0) {
map.put("totalida", rset.getLong("totalida"));
total = total.add(rset.getBigDecimal("totalReceita"));
total = total.add(limpaNulo(rset.getBigDecimal("totalReceita")));
map.put("totalReceita", total);
}
else {
map.put("totalvolta", rset.getLong("totalvolta") + volta);
total = total.add(rset.getBigDecimal("totalReceita"));
total = total.add(limpaNulo(rset.getBigDecimal("totalReceita")));
map.put("totalReceita", total);
}
@ -218,5 +218,13 @@ public class RelatorioQuadroDemonstrativoMovimentoPassageirosNovoLayout extends
}
return semelhancas;
}
private BigDecimal limpaNulo( BigDecimal val ) {
if( val == null ) {
return BigDecimal.ZERO;
}else {
return val;
}
}
}