Merge pull request 'fixes bug #AL-3739' (!398) from AL-3739 into master
Reviewed-on: adm/VentaBoletosAdm#398 Reviewed-by: Gleison da Cruz <gleison.cruz@totvs.com.br> Reviewed-by: Valdir Cordeiro <valdir.cordeiro@totvs.com.br>master 1.52.2
commit
3cd4201326
2
pom.xml
2
pom.xml
|
@ -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.52.1</version>
|
<version>1.52.2</version>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
|
|
@ -136,7 +136,7 @@ public class RelatorioComissaoSintetico extends Relatorio {
|
||||||
sql.append(" FROM ");
|
sql.append(" FROM ");
|
||||||
sql.append(" comissao cm ");
|
sql.append(" comissao cm ");
|
||||||
sql.append(" LEFT JOIN punto_venta pv ON ( cm.puntoventa_id = pv.puntoventa_id AND pv.activo = 1 ) ");
|
sql.append(" LEFT JOIN punto_venta pv ON ( cm.puntoventa_id = pv.puntoventa_id AND pv.activo = 1 ) ");
|
||||||
sql.append(" LEFT JOIN (SELECT importe, puntoventa_id, empresa_id FROM conta_corrente_ptovta ");
|
sql.append(" LEFT JOIN (SELECT importe, puntoventa_id, empresa_id, fechoroperacion FROM conta_corrente_ptovta ");
|
||||||
sql.append(" WHERE feccorte BETWEEN :DATA_INICIAL AND :DATA_FINAL ");
|
sql.append(" WHERE feccorte BETWEEN :DATA_INICIAL AND :DATA_FINAL ");
|
||||||
if (!agencia.isEmpty()) {
|
if (!agencia.isEmpty()) {
|
||||||
sql.append(" AND puntoventa_id in ("+agencia+") ");
|
sql.append(" AND puntoventa_id in ("+agencia+") ");
|
||||||
|
@ -146,6 +146,7 @@ public class RelatorioComissaoSintetico extends Relatorio {
|
||||||
}
|
}
|
||||||
sql.append(" AND tipooperacioncc_id = 5) cc on (cc.empresa_id = cm.empresa_id ");
|
sql.append(" AND tipooperacioncc_id = 5) cc on (cc.empresa_id = cm.empresa_id ");
|
||||||
sql.append(" and cc.puntoventa_id = pv.puntoventa_id ");
|
sql.append(" and cc.puntoventa_id = pv.puntoventa_id ");
|
||||||
|
sql.append(" and cc.fechoroperacion = cm.datamovimento ");
|
||||||
sql.append(" and importe is not null) ");
|
sql.append(" and importe is not null) ");
|
||||||
sql.append(" WHERE ");
|
sql.append(" WHERE ");
|
||||||
sql.append(" cm.datamovimento BETWEEN :DATA_INICIAL AND :DATA_FINAL ");
|
sql.append(" cm.datamovimento BETWEEN :DATA_INICIAL AND :DATA_FINAL ");
|
||||||
|
|
Loading…
Reference in New Issue