bug#11600
dev: julio qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@84581 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
ecf1a29866
commit
b41fe4cb45
|
@ -439,15 +439,28 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO {
|
|||
tipoViagem = "IM";
|
||||
}
|
||||
|
||||
if (isReceitaTerceiros) {
|
||||
BigDecimal pedagio = BigDecimal.ZERO;
|
||||
BigDecimal seguro = BigDecimal.ZERO;
|
||||
BigDecimal taxaEmbarque = BigDecimal.ZERO;
|
||||
|
||||
if (isReceitaTerceiros && (det.isInterEstadual() && det.getIndTxembarqueEstadual() || !det.isInterEstadual() && det.getIndTxembarqueMunicipal()))
|
||||
taxaEmbarque = det.getTaxaEmbarque() == null ? BigDecimal.ZERO : det.getTaxaEmbarque();
|
||||
|
||||
if (isReceitaTerceiros && (det.isInterEstadual() && det.getIndPedagioEstdual() || !det.isInterEstadual() && det.getIndPedagioMunicipal()))
|
||||
pedagio = det.getPedagio() == null ? BigDecimal.ZERO : det.getPedagio();
|
||||
|
||||
if (isReceitaTerceiros && (det.isInterEstadual() && det.getIndSeguroEstadual() || !det.isInterEstadual() && det.getIndSeguroMunicipal()))
|
||||
seguro = det.getSeguro() == null ? BigDecimal.ZERO : det.getSeguro();
|
||||
|
||||
// if (isReceitaTerceiros) {
|
||||
rdis.add(new FiscalRdi(det.getEstadoOrigem(), tipoViagem, det.getTipoReceita(), det.getTarifa(),
|
||||
det.getSeguro(), det.getTaxaEmbarque(), det.getPedagio(), passagem, isentos, outros, det.getRedBaseCalcIcms(),
|
||||
seguro, taxaEmbarque, pedagio, passagem, isentos, outros, det.getRedBaseCalcIcms(),
|
||||
baseCalculo, aliquota, icms, cp, credPres, icmsRec));
|
||||
} else {
|
||||
rdis.add(new FiscalRdi(det.getEstadoOrigem(), tipoViagem, det.getTipoReceita(), det.getTarifa(),
|
||||
ZERO, ZERO, ZERO, passagem, isentos, outros, det.getRedBaseCalcIcms(),
|
||||
baseCalculo, aliquota, icms, cp, credPres, icmsRec));
|
||||
}
|
||||
// } else {
|
||||
// rdis.add(new FiscalRdi(det.getEstadoOrigem(), tipoViagem, det.getTipoReceita(), det.getTarifa(),
|
||||
// ZERO, ZERO, ZERO, passagem, isentos, outros, det.getRedBaseCalcIcms(),
|
||||
// baseCalculo, aliquota, icms, cp, credPres, icmsRec));
|
||||
// }
|
||||
}
|
||||
|
||||
return rdis;
|
||||
|
@ -761,8 +774,11 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO {
|
|||
sql.append(" inner join empresa e on e.empresa_id = m.empresa_id ");
|
||||
sql.append(" inner join bpe bpe on bpe.boleto_id = bori.boleto_id ");
|
||||
sql.append(" inner join estado est_bpe on bpe.uf = est_bpe.codibge ");
|
||||
|
||||
// sql.append(" left join boleto b on b.boleto_id = coalesce(bori.boletoanterior_id, bori.boletooriginal_id) ");
|
||||
sql.append(" left join boleto b on b.boleto_id = bori.boletooriginal_id ");
|
||||
sql.append(" left join bpe bpeori on b.boleto_id = bpeori.boleto_id ");
|
||||
|
||||
sql.append(" inner join punto_venta ptv on ptv.puntoventa_id = bori.puntoventa_id ");
|
||||
sql.append(" inner join parada ori on (b.origen_id = ori.parada_id ) ");
|
||||
sql.append(" inner join parada des on (b.destino_id = des.parada_id ) ");
|
||||
|
|
Loading…
Reference in New Issue