fixes bug#18267
qua: Juliane dev: Wallace Ajuste na consulta SQL e no retorno para geração do arquivo git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@100361 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
a29832e160
commit
b6a3efd234
|
@ -270,7 +270,10 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO {
|
||||||
sql.append(" bpe.nprot, ");
|
sql.append(" bpe.nprot, ");
|
||||||
sql.append(" coalesce(c.numserie_bpe, '1') as numserie_bpe, ");
|
sql.append(" coalesce(c.numserie_bpe, '1') as numserie_bpe, ");
|
||||||
sql.append(" c.categoria_id, ");
|
sql.append(" c.categoria_id, ");
|
||||||
sql.append(" e.codestabelecimento as cod_estabelecimento, ");
|
/**
|
||||||
|
* Mantis 18267
|
||||||
|
*/
|
||||||
|
sql.append(" ei.codestabelecimento as cod_estabelecimento, ");
|
||||||
sql.append(" ep.crtbpe as crt, ");
|
sql.append(" ep.crtbpe as crt, ");
|
||||||
sql.append(" ((case when coalesce(r.indtribtarifa,0) = 1 then c.preciopagado else 0 end) + (case when coalesce(r.indtribtaxaembarque,0) = 1 then c.importetaxaembarque else 0 end) + (case when coalesce(r.indtribpedagio,0) = 1 then c.importepedagio else 0 end)) as valortributado, ");
|
sql.append(" ((case when coalesce(r.indtribtarifa,0) = 1 then c.preciopagado else 0 end) + (case when coalesce(r.indtribtaxaembarque,0) = 1 then c.importetaxaembarque else 0 end) + (case when coalesce(r.indtribpedagio,0) = 1 then c.importepedagio else 0 end)) as valortributado, ");
|
||||||
sql.append(" ei.porcredbaseicms as red_base_calc_estadual, ");
|
sql.append(" ei.porcredbaseicms as red_base_calc_estadual, ");
|
||||||
|
@ -377,7 +380,10 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO {
|
||||||
sql.append(" bpe.nprot, ");
|
sql.append(" bpe.nprot, ");
|
||||||
sql.append(" coalesce(c.numserie_bpe, '1') as numserie_bpe, ");
|
sql.append(" coalesce(c.numserie_bpe, '1') as numserie_bpe, ");
|
||||||
sql.append(" c.categoria_id, ");
|
sql.append(" c.categoria_id, ");
|
||||||
sql.append(" e.codestabelecimento as cod_estabelecimento, ");
|
/**
|
||||||
|
* Mantis 18267
|
||||||
|
*/
|
||||||
|
sql.append(" ei.codestabelecimento as cod_estabelecimento, ");
|
||||||
sql.append(" ep.crtbpe as crt, ");
|
sql.append(" ep.crtbpe as crt, ");
|
||||||
sql.append(" ((case when coalesce(r.indtribtarifa,0) = 1 then c.preciopagado else 0 end) + (case when coalesce(r.indtribtaxaembarque,0) = 1 then c.importetaxaembarque else 0 end) + (case when coalesce(r.indtribpedagio,0) = 1 then c.importepedagio else 0 end)) as valortributado, ");
|
sql.append(" ((case when coalesce(r.indtribtarifa,0) = 1 then c.preciopagado else 0 end) + (case when coalesce(r.indtribtaxaembarque,0) = 1 then c.importetaxaembarque else 0 end) + (case when coalesce(r.indtribpedagio,0) = 1 then c.importepedagio else 0 end)) as valortributado, ");
|
||||||
sql.append(" ei.porcredbaseicms as red_base_calc_estadual, ");
|
sql.append(" ei.porcredbaseicms as red_base_calc_estadual, ");
|
||||||
|
|
|
@ -101,7 +101,10 @@ public class ExportacaoBpe {
|
||||||
private void adicionarRegistroBPETipoBEP(final StringBuilder sb, ExportacaoBPETipoBPE tipoBPE, boolean isVersao131) {
|
private void adicionarRegistroBPETipoBEP(final StringBuilder sb, ExportacaoBPETipoBPE tipoBPE, boolean isVersao131) {
|
||||||
|
|
||||||
String tipoRegistro = "BPE";
|
String tipoRegistro = "BPE";
|
||||||
String estabelecimento = tipoBPE.getEstabelecimento();
|
/**
|
||||||
|
* Mantis 18267
|
||||||
|
*/
|
||||||
|
String estabelecimento = StringUtils.isBlank(tipoBPE.getEstabelecimento()) ? VAZIO : tipoBPE.getEstabelecimento();
|
||||||
String chaveEletrônica = tipoBPE.getChaveEletronica();
|
String chaveEletrônica = tipoBPE.getChaveEletronica();
|
||||||
String serie = tipoBPE.getSerie();
|
String serie = tipoBPE.getSerie();
|
||||||
String numero = tipoBPE.getNumero();
|
String numero = tipoBPE.getNumero();
|
||||||
|
|
Loading…
Reference in New Issue