bug#22868

dev: Celio
qua:

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@108457 d1611594-4594-4d17-8e1d-87c2c4800839
master
fabio 2021-08-23 19:10:32 +00:00
parent 8ad9bebc1b
commit 0a7d46b7ec
1 changed files with 7 additions and 2 deletions

View File

@ -77,7 +77,6 @@ public class SapHibernateDAO extends GenericHibernateDAO<FechamentoCntcorrente,
List<FechamentoCntCorrenteVO> retorno = new ArrayList<FechamentoCntCorrenteVO>();
for(Object[] tupla : list){
String cnpj = tupla[5].toString().replaceAll("[^0-9]", "");
FechamentoCntCorrenteVO fcc = new FechamentoCntCorrenteVO();
fcc.setFechamentocntcorrenteId( Long.valueOf(tupla[0].toString()));
@ -85,7 +84,13 @@ public class SapHibernateDAO extends GenericHibernateDAO<FechamentoCntcorrente,
fcc.setTotal( (BigDecimal)tupla[2] );
fcc.setUfEmpresa(tupla[3].toString());
fcc.setNumPuntoVenta(tupla[4].toString());
fcc.setCnpjPuntoVenta(cnpj);
try {
String cnpj = tupla[5].toString().replaceAll("[^0-9]", "");
fcc.setCnpjPuntoVenta(cnpj);
}catch (Exception e) {
throw new RuntimeException( "CNPJ fora do padrao no ponto de venda: "+tupla[6] );
}
fcc.setNombpuntoventa(tupla[6].toString());
fcc.setEmpresaId( Integer.valueOf( tupla[7].toString() ) );