leonardo 2016-02-11 13:32:08 +00:00
parent 95f66770a2
commit 1cf9955b54
1 changed files with 5 additions and 3 deletions

View File

@ -228,7 +228,7 @@ public class Totalbus {
public List<DespesaReceita> getDepositos(Integer puntoventaId, Integer empresaId, Date fechaParam){
List<DespesaReceita> depositos = new ArrayList<DespesaReceita>();
StringBuilder sb = new StringBuilder();
sb.append("select fdep.fechamentodeposito_id, fdep.valor, fdep.numdeposito, fdep.fecha_deposito ");
sb.append("select fdep.fechamentodeposito_id, fdep.valor, fdep.numdeposito, fdep.fecmodif ");
sb.append("from fechamento_deposito fdep ");
//sb.append("inner join insti_financeira i on i.instifinanceira_id = fdep.instifinanceira_id ");
sb.append("where fecha_deposito = :fecha and fdep.activo = 1 ");
@ -239,7 +239,9 @@ public class Totalbus {
strFechamentos.append("from fechamento_cct_deposito fd ");
strFechamentos.append("inner join fechamento_cntcorrente fc on fc.fechamentocntcorrente_id = fd.fechamentocntcorrente_id ");
strFechamentos.append("inner join PUNTO_VENTA pv on FC.PUNTOVENTA_ID = PV.PUNTOVENTA_ID ");
strFechamentos.append("left join empresa_contabancaria ec on ec.empresa_id = fc.empresa_id and ec.activo = 1 ");
strFechamentos.append("JOIN EMPRESA e ON e.EMPRESA_ID = FC.EMPRESA_ID ");
strFechamentos.append("LEFT JOIN PTOVTA_EMPRESA pve ON PVE.EMPRESA_ID = e.empresa_id AND PVE.PUNTOVENTA_ID = PV.PUNTOVENTA_ID AND PVE.activo = 1 ");
strFechamentos.append("left join empresa_contabancaria ec on EC.EMPRESA_ID = PVE.EMPRESA_ID AND EC.EMPRESACONTABANCARIA_ID = PVE.EMPRESACONTABANCARIA_ID AND EC.ACTIVO = 1 ");
strFechamentos.append("left join INSTI_FINANCEIRA if on EC.INSTIFINANCEIRA_ID = if.INSTIFINANCEIRA_ID and if.ACTIVO = 1 ");
strFechamentos.append("where fd.fechamentodeposito_id = :fechamentodepositoId and fd.activo <> 0 and fc.activo <> 0 ");
@ -301,7 +303,7 @@ public class Totalbus {
deposito.setDataLancamento(rs.getDate(4));
deposito.setDataMovimento(rs.getDate(4));
deposito.setLocalArrecadação(pvId);
deposito.setValorLançamento(rs.getBigDecimal(2).toString());
deposito.setValorLançamento(df.format(rs.getBigDecimal(2)));
deposito.setIdentificadorReceitaDespesa("D");
deposito.setCodigoReceitaDespesa(codRecDesp);
deposito.setDescricaoDetalhada(banco + agencia + contaCorrente + numDep + valor + ref);