fixes bug #7150
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@53157 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
d1e214e55d
commit
9f4a2a5117
|
@ -205,12 +205,13 @@ public class FiscalHibernateDAO extends GenericHibernateDAO<String, String> impl
|
||||||
sql.append(" r2.totgeral AS gtFinal, ");
|
sql.append(" r2.totgeral AS gtFinal, ");
|
||||||
sql.append(" anterior.totgeral AS gtInicial ");
|
sql.append(" anterior.totgeral AS gtInicial ");
|
||||||
sql.append("FROM fiscal_r2 r2 ");
|
sql.append("FROM fiscal_r2 r2 ");
|
||||||
|
sql.append(" inner join fiscal_impressora ifi ");
|
||||||
|
sql.append(" ON ifi.numserie20 = r2.numserie20 ");
|
||||||
sql.append(" inner join fiscal_r3 r3 ");
|
sql.append(" inner join fiscal_r3 r3 ");
|
||||||
sql.append(" ON r3.crz = r2.crz ");
|
sql.append(" ON r3.crz = r2.crz ");
|
||||||
sql.append(" AND r2.numserie20 = r3.numserie20 ");
|
sql.append(" AND r2.numserie20 = r3.numserie20 ");
|
||||||
sql.append(" AND r3.datamov = r2.datamov ");
|
sql.append(" AND r3.datamov = r2.datamov ");
|
||||||
sql.append(" inner join fiscal_impressora ifi ");
|
sql.append(" AND r3.fiscalimpressora_id = ifi.fiscalimpressora_id ");
|
||||||
sql.append(" ON ifi.numserie20 = r2.numserie20 ");
|
|
||||||
sql.append(" inner join fiscal_t2 t2 ");
|
sql.append(" inner join fiscal_t2 t2 ");
|
||||||
sql.append(" ON ifi.fiscalimpressora_id = t2.fiscalimpressora_id ");
|
sql.append(" ON ifi.fiscalimpressora_id = t2.fiscalimpressora_id ");
|
||||||
sql.append(" inner join empresa e ");
|
sql.append(" inner join empresa e ");
|
||||||
|
@ -218,6 +219,7 @@ public class FiscalHibernateDAO extends GenericHibernateDAO<String, String> impl
|
||||||
sql.append(" (SELECT numserie20, crz, totgeral ");
|
sql.append(" (SELECT numserie20, crz, totgeral ");
|
||||||
sql.append(" FROM fiscal_r2) anterior ");
|
sql.append(" FROM fiscal_r2) anterior ");
|
||||||
sql.append("WHERE r2.datamov BETWEEN ? AND ? ");
|
sql.append("WHERE r2.datamov BETWEEN ? AND ? ");
|
||||||
|
sql.append(" AND r2.activo = 1 ");
|
||||||
sql.append(" AND e.empresa_id = ? ");
|
sql.append(" AND e.empresa_id = ? ");
|
||||||
sql.append(" AND r3.totparcial not in (");
|
sql.append(" AND r3.totparcial not in (");
|
||||||
sql.append("'" + SituacaoTributaria.CANCELADO.getValue() + "'").append(", ");
|
sql.append("'" + SituacaoTributaria.CANCELADO.getValue() + "'").append(", ");
|
||||||
|
|
Loading…
Reference in New Issue