fixes bug #7493
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/Integracion/IntegracaoReceitaDespesa/trunk/IntegracaoReceitaDespesa@56128 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
4d159a3066
commit
494a1ca4e8
|
@ -201,7 +201,7 @@ public class Totalbus {
|
||||||
sb.append(" and e.empresa_id = " + empresaId);
|
sb.append(" and e.empresa_id = " + empresaId);
|
||||||
}
|
}
|
||||||
sb.append(" and cd.activo = 1 ");
|
sb.append(" and cd.activo = 1 ");
|
||||||
sb.append(" and tee.indtipo = 1 ");
|
sb.append(" and tee.indtipo = 1 ");
|
||||||
//sb.append(" and cd.usuario_id=7061 ");
|
//sb.append(" and cd.usuario_id=7061 ");
|
||||||
sb.append(" group by ");
|
sb.append(" group by ");
|
||||||
sb.append(" cd.feccorte, ");
|
sb.append(" cd.feccorte, ");
|
||||||
|
@ -231,8 +231,13 @@ public class Totalbus {
|
||||||
receita.setDataLancamento(rs.getDate(1));
|
receita.setDataLancamento(rs.getDate(1));
|
||||||
receita.setDataMovimento(rs.getDate(1));
|
receita.setDataMovimento(rs.getDate(1));
|
||||||
receita.setLocalArrecadação(rs.getInt(6));
|
receita.setLocalArrecadação(rs.getInt(6));
|
||||||
receita.setValorLancamento(df.format(rs.getBigDecimal(4)));
|
if (rs.getBigDecimal(4).signum() == -1){
|
||||||
receita.setIdentificadorReceitaDespesa("R");
|
receita.setIdentificadorReceitaDespesa("D");
|
||||||
|
receita.setValorLancamento(df.format(rs.getBigDecimal(4).multiply(new BigDecimal(-1))));
|
||||||
|
} else {
|
||||||
|
receita.setIdentificadorReceitaDespesa("R");
|
||||||
|
receita.setValorLancamento(df.format(rs.getBigDecimal(4)));
|
||||||
|
}
|
||||||
despesas.add(receita);
|
despesas.add(receita);
|
||||||
}
|
}
|
||||||
} catch (Exception e){
|
} catch (Exception e){
|
||||||
|
@ -263,7 +268,7 @@ public class Totalbus {
|
||||||
sb.append(" left join ptovta_integra pi on e.empresa_id = pi.empresa_id and pi.puntoventa_id = pv.puntoventa_id ");
|
sb.append(" left join ptovta_integra pi on e.empresa_id = pi.empresa_id and pi.puntoventa_id = pv.puntoventa_id ");
|
||||||
sb.append(" where ");
|
sb.append(" where ");
|
||||||
sb.append(" cd.feccorte = ? ");
|
sb.append(" cd.feccorte = ? ");
|
||||||
sb.append(" and tee.indtipo = 0 ");
|
sb.append(" and tee.indtipo = 0 ");
|
||||||
if (puntoventaId != null && !puntoventaId.equals(-1)){
|
if (puntoventaId != null && !puntoventaId.equals(-1)){
|
||||||
sb.append(" and cd.puntoventa_id = " + puntoventaId);
|
sb.append(" and cd.puntoventa_id = " + puntoventaId);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue