RMD - Arquivo Exportação para QS (fixes bug #6374)
Tempo: 02 horas git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@45799 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
847f4b9f1e
commit
eb5d8a4b5f
|
@ -160,7 +160,7 @@ public class FiscalHibernateDAO extends GenericHibernateDAO<String, String> impl
|
|||
sql.append(" r3.totparcial AS aliquota, ");
|
||||
sql.append(" r3.valoracumulado AS imposto, ");
|
||||
sql.append(" ifi.fiscalimpressora_id AS numpdv, ");
|
||||
sql.append(" ifi.numcnpj AS cnpj, ");
|
||||
sql.append(" e.cnpj AS cnpj, ");
|
||||
sql.append(" r2.totgeral AS gtFinal, ");
|
||||
sql.append(" anterior.totgeral AS gtInicial ");
|
||||
sql.append("FROM fiscal_r2 r2 ");
|
||||
|
@ -168,13 +168,13 @@ public class FiscalHibernateDAO extends GenericHibernateDAO<String, String> impl
|
|||
sql.append(" ON r3.crz = r2.crz ");
|
||||
sql.append(" AND r2.numserie20 = r3.numserie20 ");
|
||||
sql.append(" AND r3.datamov = r2.datamov ");
|
||||
sql.append(" left join fiscal_impressora ifi ");
|
||||
sql.append(" inner join fiscal_impressora ifi ");
|
||||
sql.append(" ON ifi.numserie20 = r2.numserie20 ");
|
||||
sql.append(" left join empresa e ");
|
||||
sql.append(" ON TRANSLATE(ifi.numcnpj, ' / - . ', ' ') = e.cnpj, ");
|
||||
sql.append(" (SELECT numserie20, ");
|
||||
sql.append(" crz, ");
|
||||
sql.append(" totgeral ");
|
||||
sql.append(" inner join fiscal_t2 t2 ");
|
||||
sql.append(" ON ifi.fiscalimpressora_id = t2.fiscalimpressora_id ");
|
||||
sql.append(" inner join empresa e ");
|
||||
sql.append(" ON TRANSLATE(t2.cnpj, ' / - . ', ' ') = e.cnpj, ");
|
||||
sql.append(" (SELECT numserie20, crz, totgeral ");
|
||||
sql.append(" FROM fiscal_r2) anterior ");
|
||||
sql.append("WHERE r2.datamov BETWEEN :datIni AND :datFim ");
|
||||
sql.append(" AND e.empresa_id = :empresaId ");
|
||||
|
@ -197,7 +197,7 @@ public class FiscalHibernateDAO extends GenericHibernateDAO<String, String> impl
|
|||
sql.append(" r3.totparcial, ");
|
||||
sql.append(" r3.valoracumulado, ");
|
||||
sql.append(" ifi.fiscalimpressora_id, ");
|
||||
sql.append(" ifi.numcnpj, ");
|
||||
sql.append(" e.cnpj, ");
|
||||
sql.append(" r2.totgeral, ");
|
||||
sql.append(" anterior.totgeral ");
|
||||
sql.append("ORDER BY r2.datamov, ");
|
||||
|
|
Loading…
Reference in New Issue