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> <modelVersion>4.0.0</modelVersion>
<groupId>br.com.rjconsultores</groupId> <groupId>br.com.rjconsultores</groupId>
<artifactId>ventaboletosadm</artifactId> <artifactId>ventaboletosadm</artifactId>
<version>1.21.1</version> <version>1.21.2</version>
<packaging>war</packaging> <packaging>war</packaging>
<properties> <properties>

View File

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