fixes bug#13770
dev:julio qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@90540 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
b4f8f2bb13
commit
e8145d6882
|
@ -83,7 +83,15 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO {
|
|||
sql.append(" ei.porcredestadual as porc_red_estadual, ");
|
||||
sql.append(" ei.tributacaoimportacao as tributacao_importacao, ");
|
||||
sql.append(" ei.codigocontabilestadual as codigocontabil_estadual, ");
|
||||
sql.append(" ei.codigocontabilmunicipal as codigocontabil_municipal ");
|
||||
sql.append(" ei.codigocontabilmunicipal as codigocontabil_municipal, ");
|
||||
sql.append(" coalesce(ei.indtarifamunicipal,0) as indtarifamunicipal, ");
|
||||
sql.append(" coalesce(ei.indseguromunicipal,0) as indseguromunicipal, ");
|
||||
sql.append(" coalesce(ei.indtxembarquemunicipal,0) as indtxembarquemunicipal, ");
|
||||
sql.append(" coalesce(ei.indpedagiomunicipal,0) as indpedagiomunicipal, ");
|
||||
sql.append(" coalesce(ei.indtarifaestadual,0) as indtarifaestadual,");
|
||||
sql.append(" coalesce(ei.indseguroestadual,0) as indseguroestadual, ");
|
||||
sql.append(" coalesce(ei.indtxembarqueestadual,0) as indtxembarqueestadual, ");
|
||||
sql.append(" coalesce(ei.indpedagioestdual,0) as indpedagioestdual ");
|
||||
sql.append("from boleto c ");
|
||||
sql.append(" join bpe bpe on c.boleto_id = bpe.boleto_id and bpe.activo = 1 ");
|
||||
sql.append(" join estado e on e.codibge = bpe.uf ");
|
||||
|
@ -158,6 +166,14 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO {
|
|||
registro.setMunicipioDestino(rs.getString("municipio_destino"));
|
||||
registro.setEstadoDestino(rs.getString("estado_destino"));
|
||||
registro.setCrt(rs.getInt("crt"));
|
||||
registro.setIndPedagioMunicipal(rs.getInt("indpedagiomunicipal") == 1);
|
||||
registro.setIndSeguroMunicipal(rs.getInt("indseguromunicipal") == 1);
|
||||
registro.setIndTarifaMunicipal(rs.getInt("indtarifamunicipal") == 1);
|
||||
registro.setIndTxEmbarqueMunicipal(rs.getInt("indtxembarquemunicipal") == 1);
|
||||
registro.setIndPedadioEstdual(rs.getInt("indpedagioestdual") == 1);
|
||||
registro.setIndSeguroEstadual(rs.getInt("indseguroestadual") == 1);
|
||||
registro.setIndTarifaEstadual(rs.getInt("indtarifaestadual") == 1);
|
||||
registro.setIndTxEmbarqueEstadual(rs.getInt("indtxembarqueestadual") == 1);
|
||||
registro.setValortributado(valortributado);
|
||||
registro.setValortotal(valortotal);
|
||||
|
||||
|
|
|
@ -38,7 +38,15 @@ public class ExportacaoBPEBase {
|
|||
private Integer crt;
|
||||
private String xml;
|
||||
private String xmlAnterior;
|
||||
|
||||
private Boolean indTarifaMunicipal;
|
||||
private Boolean indSeguroMunicipal;
|
||||
private Boolean indTxEmbarqueMunicipal;
|
||||
private Boolean indPedagioMunicipal;
|
||||
private Boolean indTarifaEstadual;
|
||||
private Boolean indSeguroEstadual;
|
||||
private Boolean indTxEmbarqueEstadual;
|
||||
private Boolean indPedadioEstdual;
|
||||
|
||||
private List<ExportacaoBPETipoBPE> listaRegistroBPE;
|
||||
private List<ExportacaoBPETipoDPE> listaRegistroDPE;
|
||||
private List<ExportacaoBPETipoOBE> listaRegistroOBE;
|
||||
|
@ -299,6 +307,70 @@ public class ExportacaoBPEBase {
|
|||
this.xml = xml;
|
||||
}
|
||||
|
||||
public Boolean getIndTarifaMunicipal() {
|
||||
return indTarifaMunicipal;
|
||||
}
|
||||
|
||||
public void setIndTarifaMunicipal(Boolean indTarifaMunicipal) {
|
||||
this.indTarifaMunicipal = indTarifaMunicipal;
|
||||
}
|
||||
|
||||
public Boolean getIndSeguroMunicipal() {
|
||||
return indSeguroMunicipal;
|
||||
}
|
||||
|
||||
public void setIndSeguroMunicipal(Boolean indSeguroMunicipal) {
|
||||
this.indSeguroMunicipal = indSeguroMunicipal;
|
||||
}
|
||||
|
||||
public Boolean getIndTxEmbarqueMunicipal() {
|
||||
return indTxEmbarqueMunicipal;
|
||||
}
|
||||
|
||||
public void setIndTxEmbarqueMunicipal(Boolean indTxEmbarqueMunicipal) {
|
||||
this.indTxEmbarqueMunicipal = indTxEmbarqueMunicipal;
|
||||
}
|
||||
|
||||
public Boolean getIndPedagioMunicipal() {
|
||||
return indPedagioMunicipal;
|
||||
}
|
||||
|
||||
public void setIndPedagioMunicipal(Boolean indPedagioMunicipal) {
|
||||
this.indPedagioMunicipal = indPedagioMunicipal;
|
||||
}
|
||||
|
||||
public Boolean getIndTarifaEstadual() {
|
||||
return indTarifaEstadual;
|
||||
}
|
||||
|
||||
public void setIndTarifaEstadual(Boolean indTarifaEstadual) {
|
||||
this.indTarifaEstadual = indTarifaEstadual;
|
||||
}
|
||||
|
||||
public Boolean getIndSeguroEstadual() {
|
||||
return indSeguroEstadual;
|
||||
}
|
||||
|
||||
public void setIndSeguroEstadual(Boolean indSeguroEstadual) {
|
||||
this.indSeguroEstadual = indSeguroEstadual;
|
||||
}
|
||||
|
||||
public Boolean getIndTxEmbarqueEstadual() {
|
||||
return indTxEmbarqueEstadual;
|
||||
}
|
||||
|
||||
public void setIndTxEmbarqueEstadual(Boolean indTxEmbarqueEstadual) {
|
||||
this.indTxEmbarqueEstadual = indTxEmbarqueEstadual;
|
||||
}
|
||||
|
||||
public Boolean getIndPedadioEstdual() {
|
||||
return indPedadioEstdual;
|
||||
}
|
||||
|
||||
public void setIndPedadioEstdual(Boolean indPedadioEstdual) {
|
||||
this.indPedadioEstdual = indPedadioEstdual;
|
||||
}
|
||||
|
||||
public List<ExportacaoBPETipoBPE> getListaRegistroBPE() {
|
||||
return listaRegistroBPE;
|
||||
}
|
||||
|
|
|
@ -132,24 +132,18 @@ public class ExportacaoBPEVo {
|
|||
for (TBPe.InfBPe.InfValorBPe.Comp comp : tbpe.getInfBPe().getInfValorBPe().getComp()) {
|
||||
|
||||
if (comp.getTpComp().equals(TipoComp.PEDAGIO)) {
|
||||
vTxEmbarque = comp.getVComp() == null ? "0.0" : comp.getVComp();
|
||||
// isentos = isentos.add(isEstadual && !det.getIndPedagioEstdual() ? new BigDecimal(comp.getVComp() == null ? "0.0" : comp.getVComp()) : BigDecimal.ZERO);
|
||||
// isentos = isentos.add(!isEstadual && !det.getIndPedagioMunicipal() ? new BigDecimal(comp.getVComp() == null ? "0.0" : comp.getVComp()) : BigDecimal.ZERO);
|
||||
// pedagio = isReceitaTerceiros ? new BigDecimal(comp.getVComp() == null ? "0.0" : comp.getVComp()) : BigDecimal.ZERO;
|
||||
vPedagio = (isInterMunicipal && !registro.getIndPedadioEstdual()) ? (comp.getVComp() == null ? "0.0" : comp.getVComp()) : "0.0";
|
||||
vPedagio = (!isInterMunicipal && !registro.getIndPedagioMunicipal()) ? (comp.getVComp() == null ? "0.0" : comp.getVComp()) : "0.0";
|
||||
}
|
||||
|
||||
if (comp.getTpComp().equals(TipoComp.TAXA_EMBARQUE)) {
|
||||
vPedagio = comp.getVComp() == null ? "0.0" : comp.getVComp();
|
||||
// isentos = isentos.add(isEstadual && !det.getIndTxembarqueEstadual() ? new BigDecimal(comp.getVComp() == null ? "0.0" : comp.getVComp()) : BigDecimal.ZERO);
|
||||
// isentos = isentos.add(!isEstadual && !det.getIndTxembarqueMunicipal() ? new BigDecimal(comp.getVComp() == null ? "0.0" : comp.getVComp()) : BigDecimal.ZERO);
|
||||
// taxaEmbarque = isReceitaTerceiros ? new BigDecimal(comp.getVComp() == null ? "0.0" : comp.getVComp()) : BigDecimal.ZERO;
|
||||
vTxEmbarque = (isInterMunicipal && !registro.getIndTxEmbarqueEstadual()) ? (comp.getVComp() == null ? "0.0" : comp.getVComp()) : "0.0";
|
||||
vTxEmbarque = (!isInterMunicipal && !registro.getIndTxEmbarqueMunicipal()) ? (comp.getVComp() == null ? "0.0" : comp.getVComp()) : "0.0";
|
||||
}
|
||||
|
||||
if (comp.getTpComp().equals(TipoComp.SEGURO)) {
|
||||
vSeguro = comp.getVComp() == null ? "0.0" : comp.getVComp();
|
||||
// isentos = isentos.add(isEstadual && !det.getIndSeguroEstadual() ? new BigDecimal(comp.getVComp() == null ? "0.0" : comp.getVComp()) : BigDecimal.ZERO);
|
||||
// isentos = isentos.add(!isEstadual && !det.getIndSeguroMunicipal() ? new BigDecimal(comp.getVComp() == null ? "0.0" : comp.getVComp()) : BigDecimal.ZERO);
|
||||
// seguro = isReceitaTerceiros ? new BigDecimal(comp.getVComp() == null ? "0.0" : comp.getVComp()) : BigDecimal.ZERO;
|
||||
vSeguro = (isInterMunicipal && !registro.getIndSeguroEstadual()) ? (comp.getVComp() == null ? "0.0" : comp.getVComp()) : "0.0";
|
||||
vSeguro = (!isInterMunicipal && !registro.getIndSeguroMunicipal()) ? (comp.getVComp() == null ? "0.0" : comp.getVComp()) : "0.0";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue