private void BuscarNotaDeCorretagem_CabecalhoDaCorretora(ref NotaDeCorretagemExtratoRequest pParametros, ref AcessaDados pAcessoDados, ref NotaDeCorretagemExtratoResponse lRetorno) { using (DbCommand lDbCommand = pAcessoDados.CreateCommand(CommandType.StoredProcedure, "prc_NC_DadosFinanceiro_Sel")) { pAcessoDados.AddInParameter(lDbCommand, "cd_cliente", DbType.Int32, pParametros.ConsultaCodigoCliente); pAcessoDados.AddInParameter(lDbCommand, "dt_datmov", DbType.Date, pParametros.ConsultaDataMovimento); pAcessoDados.AddInParameter(lDbCommand, "cd_empresa", DbType.Int32, pParametros.ConsultaCodigoCorretora); pAcessoDados.AddInParameter(lDbCommand, "tp_mercado", DbType.String, pParametros.ConsultaTipoDeMercado); if (pParametros.ConsultaProvisorio) { pAcessoDados.AddInParameter(lDbCommand, "in_broker", DbType.String, "C"); } using (DataTable lDataTable = pAcessoDados.ExecuteOracleDataTable(lDbCommand)) { if (null != lDataTable && lDataTable.Rows.Count > 0) { lRetorno.Relatorio.CabecalhoCorretora.CpfCnpj = lDataTable.Rows[0]["CD_CGC"].DBToString(); lRetorno.Relatorio.CabecalhoCorretora.DataPregao = lDataTable.Rows[0]["DT_NEGOCIO"].DBToDateTime(); lRetorno.Relatorio.CabecalhoCorretora.EmailCorretora = lDataTable.Rows[0]["CD_EMAIL"].DBToString(); lRetorno.Relatorio.CabecalhoCorretora.EnderecoCorretora = lDataTable.Rows[0]["ENDERECO_CORR"].DBToString(); lRetorno.Relatorio.CabecalhoCorretora.NomeCorretora = lDataTable.Rows[0]["DS_RSOC_LOC"].DBToString(); lRetorno.Relatorio.CabecalhoCorretora.NumeroNota = lDataTable.Rows[0]["NR_NOTA"].DBToString(); lRetorno.Relatorio.CabecalhoCorretora.SiteCorretora = lDataTable.Rows[0]["CD_INTERNET"].DBToString(); lRetorno.Relatorio.CabecalhoCorretora.TelefonesCorretora = lDataTable.Rows[0]["TELEFONES_CORR"].DBToString(); } } } }
private void BuscarNotaDeCorretagem_CabecalhoDoCliente(ref NotaDeCorretagemExtratoRequest pParametros, ref AcessaDados pAcessoDados, ref NotaDeCorretagemExtratoResponse lRetorno) { using (DbCommand lDbCommand = pAcessoDados.CreateCommand(CommandType.StoredProcedure, "prc_NC_DadosFinanceiro_Sel")) { pAcessoDados.AddInParameter(lDbCommand, "cd_cliente", DbType.Int32, pParametros.ConsultaCodigoCliente); pAcessoDados.AddInParameter(lDbCommand, "dt_datmov", DbType.Date, pParametros.ConsultaDataMovimento); pAcessoDados.AddInParameter(lDbCommand, "cd_empresa", DbType.Int32, pParametros.ConsultaCodigoCorretora); pAcessoDados.AddInParameter(lDbCommand, "tp_mercado", DbType.String, pParametros.ConsultaTipoDeMercado); if (pParametros.ConsultaProvisorio) { pAcessoDados.AddInParameter(lDbCommand, "in_broker", DbType.String, "C"); } using (var lDataTable = pAcessoDados.ExecuteOracleDataTable(lDbCommand)) { if (null != lDataTable && lDataTable.Rows.Count > 0) { lRetorno.Relatorio.CabecalhoCliente.Agencia = lDataTable.Rows[0]["DS_AGENCIA"].DBToString(); lRetorno.Relatorio.CabecalhoCliente.ContaCorrente = lDataTable.Rows[0]["NR_CTACORR"].DBToString(); lRetorno.Relatorio.CabecalhoCliente.NrBanco = lDataTable.Rows[0]["CD_BANCO"].DBToString(); lRetorno.Relatorio.CabecalhoCliente.NrNota = lDataTable.Rows[0]["NR_NOTA"].DBToInt32(); lRetorno.Relatorio.CabecalhoCliente.EnderecoCliente = lDataTable.Rows[0]["endereco_cli"].DBToString(); lRetorno.Relatorio.CabecalhoCliente.CepCidadeUFCliente = lDataTable.Rows[0]["cep_cidd_uf_cli"].DBToString(); lRetorno.Relatorio.CabecalhoCliente.CodCliente = lDataTable.Rows[0]["CD_CLIENTE_CC"].DBToInt32(); lRetorno.Relatorio.CabecalhoCliente.CpfCnpj = lDataTable.Rows[0]["CD_CPFCGC"].DBToString(); lRetorno.Relatorio.CabecalhoCliente.DvCliente = lDataTable.Rows[0]["DV_CLIENTE_ORI"].DBToInt32(); lRetorno.Relatorio.CabecalhoCliente.NomeCliente = lDataTable.Rows[0]["NM_CLIENTE"].DBToString(); } } } }
/// <summary> /// Raliza a consulta de Nota de Corretagem de um cliente. /// </summary> /// <param name="pParametros">Código do cliente no Sinacor.</param> /// <returns>Lista com dados do extrato do cliente.</returns> public NotaDeCorretagemExtratoResponse ConsultarNotaDeCorretagem(NotaDeCorretagemExtratoRequest pParametros) { var lRetorno = new NotaDeCorretagemExtratoResponse(); var lAcessaDados = new AcessaDados(); log4net.Config.XmlConfigurator.Configure(); try { lRetorno.Relatorio.CodigoCliente = pParametros.ConsultaCodigoCliente; lAcessaDados.ConnectionStringName = "SINACOR"; this.BuscarNotaDeCorretagem_CabecalhoDoCliente(ref pParametros, ref lAcessaDados, ref lRetorno); this.BuscarNotaDeCorretagem_CabecalhoDaCorretora(ref pParametros, ref lAcessaDados, ref lRetorno); this.BuscarNotaDeCorretagem_ListaDeNegocios(ref pParametros, ref lAcessaDados, ref lRetorno); this.BuscarNotaDeCorretagem_Rodape(ref pParametros, ref lAcessaDados, ref lRetorno); lRetorno.StatusResposta = MensagemResponseStatusEnum.OK; } catch (Exception ex) { gLogger.Error("ConsultarNotaDeCorretagem", ex); lRetorno.DescricaoResposta = ex.ToString(); lRetorno.StatusResposta = MensagemResponseStatusEnum.ErroNegocio; } finally { lAcessaDados = null; } return(lRetorno); }
private void BuscarNotaDeCorretagem_ListaDeNegociosBmf(ref NotaDeCorretagemExtratoRequest pParametros, ref AcessaDados pAcessoDados, ref NotaDeCorretagemExtratoResponse pRetorno) { var lNotaDeCorretagemExtratoInfo = new NotaDeCorretagemExtratoBmfInfo(); using (DbCommand lComando = pAcessoDados.CreateCommand(CommandType.StoredProcedure, "PRC_NC_NEGOCIACAO_BMF_SEL")) { pAcessoDados.AddInParameter(lComando, "pCd_cliente", DbType.Int32, pParametros.ConsultaCodigoClienteBmf); pAcessoDados.AddInParameter(lComando, "pDt_negocio", DbType.Date, pParametros.ConsultaDataMovimento); var lTabela = pAcessoDados.ExecuteOracleDataTable(lComando); foreach (DataRow dr in lTabela.Rows) { lNotaDeCorretagemExtratoInfo = new NotaDeCorretagemExtratoBmfInfo(); lNotaDeCorretagemExtratoInfo.Sentido = dr["C_V"].DBToString(); lNotaDeCorretagemExtratoInfo.Mercadoria = dr["Mercadoria"].DBToString(); lNotaDeCorretagemExtratoInfo.Mercadoria_Serie = dr["Mercadoria_Serie"].ToString(); lNotaDeCorretagemExtratoInfo.Vencimento = dr["Vencimento"].DBToDateTime(); lNotaDeCorretagemExtratoInfo.Quantidade = dr["Quantidade"].DBToInt32(); lNotaDeCorretagemExtratoInfo.PrecoAjuste = dr["Preco_Ajuste"].DBToDecimal(); lNotaDeCorretagemExtratoInfo.TipoNegocio = dr["Tipo_do_Negocio"].ToString(); lNotaDeCorretagemExtratoInfo.ValorOperacao = dr["Vlr_Operacao_Ajuste"].DBToDecimal(); lNotaDeCorretagemExtratoInfo.DC = dr["Vlr_Operacao_Ajuste"].DBToDecimal() < 0 ? "D" : "C"; lNotaDeCorretagemExtratoInfo.Observacao = dr["OBS"].ToString(); lNotaDeCorretagemExtratoInfo.TaxaOperacional = dr["Taxa_Operacional"].DBToDecimal(); pRetorno.RelatorioBmf.ListaNotaDeCorretagemExtratoBmfInfo.Add(lNotaDeCorretagemExtratoInfo); } } }
private void BuscarNotaDeCorretagem_Rodape(ref NotaDeCorretagemExtratoRequest pParametros, ref AcessaDados pAcessoDados, ref NotaDeCorretagemExtratoResponse lRetorno) { using (DbCommand lDbCommand = pAcessoDados.CreateCommand(CommandType.StoredProcedure, "prc_NC_DadosFinanceiro_Sel")) { pAcessoDados.AddInParameter(lDbCommand, "cd_cliente", DbType.Int32, pParametros.ConsultaCodigoCliente); pAcessoDados.AddInParameter(lDbCommand, "dt_datmov", DbType.Date, pParametros.ConsultaDataMovimento); pAcessoDados.AddInParameter(lDbCommand, "cd_empresa", DbType.Int32, pParametros.ConsultaCodigoCorretora); pAcessoDados.AddInParameter(lDbCommand, "tp_mercado", DbType.String, pParametros.ConsultaTipoDeMercado); if (pParametros.ConsultaProvisorio) { pAcessoDados.AddInParameter(lDbCommand, "in_broker", DbType.String, "C"); } using (DataTable lDataTable = pAcessoDados.ExecuteOracleDataTable(lDbCommand)) { if (null != lDataTable && lDataTable.Rows.Count > 0) { lRetorno.Relatorio.Rodape.CompraOpcoes = lDataTable.Rows[0]["VL_CPAOPC"].DBToDecimal(); lRetorno.Relatorio.Rodape.CompraVista = lDataTable.Rows[0]["VL_CPAVIS"].DBToDecimal(); lRetorno.Relatorio.Rodape.VendaOpcoes = lDataTable.Rows[0]["VL_VDAOPC"].DBToDecimal(); lRetorno.Relatorio.Rodape.VendaVista = lDataTable.Rows[0]["VL_VDAVIS"].DBToDecimal(); lRetorno.Relatorio.Rodape.Debentures = lDataTable.Rows[0]["VL_DEBENT"].DBToDecimal(); lRetorno.Relatorio.Rodape.OperacoesTermo = lDataTable.Rows[0]["VL_TERMO"].DBToDecimal(); lRetorno.Relatorio.Rodape.OperacoesFuturo = lDataTable.Rows[0]["VL_FUTURO"].DBToDecimal(); lRetorno.Relatorio.Rodape.OperacoesTitulosPublicos = lDataTable.Rows[0]["VL_TITPUB"].DBToDecimal(); lRetorno.Relatorio.Rodape.ValorDasOperacoes = lDataTable.Rows[0]["VL_TOTNEG"].DBToDecimal(); lRetorno.Relatorio.Rodape.ValorAjusteFuturo = lDataTable.Rows[0]["VL_FUTURO"].DBToDecimal(); lRetorno.Relatorio.Rodape.IRSobreCorretagem = lDataTable.Rows[0]["VL_IRCORR"].DBToDecimal(); lRetorno.Relatorio.Rodape.IRRFSobreDayTrade = lDataTable.Rows[0]["VL_IRRF_DESPESA"].DBToDecimal(); lRetorno.Relatorio.Rodape.ValorLiquidoOperacoes = lDataTable.Rows[0]["VL_LIQ_OPERACOES"].DBToDecimal(); lRetorno.Relatorio.Rodape.TaxaLiquidacao = lDataTable.Rows[0]["VL_EMOLUM_CB"].DBToDecimal(); lRetorno.Relatorio.Rodape.TaxaLiquidacao_DC = lDataTable.Rows[0]["VL_EMOLUM_CB_CD"].DBToString(); lRetorno.Relatorio.Rodape.TaxaDeRegistro = lDataTable.Rows[0]["VL_TAXREG_CB"].DBToDecimal(); lRetorno.Relatorio.Rodape.TaxaDeRegistro_DC = lDataTable.Rows[0]["VL_TAXREG_CB_CD"].DBToString(); lRetorno.Relatorio.Rodape.Total_123_A = lDataTable.Rows[0]["VL_LIQNOT_CB"].DBToDecimal(); lRetorno.Relatorio.Rodape.Total_123_A_DC = lDataTable.Rows[0]["VL_LIQNOT_CB_CD"].DBToString(); lRetorno.Relatorio.Rodape.TaxaTerOpcFut = lDataTable.Rows[0]["VL_TAXPTA"].DBToDecimal(); lRetorno.Relatorio.Rodape.TaxaTerOpcFut_DC = lDataTable.Rows[0]["vl_taxpta_CD"].DBToString(); lRetorno.Relatorio.Rodape.TaxaANA = lDataTable.Rows[0]["VL_TAXANA"].DBToDecimal(); lRetorno.Relatorio.Rodape.TaxaANA_DC = lDataTable.Rows[0]["VL_TAXANA_CD"].DBToString(); lRetorno.Relatorio.Rodape.Emolumentos = lDataTable.Rows[0]["VL_EMOLUM_BV"].DBToDecimal(); lRetorno.Relatorio.Rodape.Emolumentos_DC = lDataTable.Rows[0]["VL_EMOLUM_BV_CD"].DBToString(); lRetorno.Relatorio.Rodape.Corretagem = lDataTable.Rows[0]["VL_VALCOR"].DBToDecimal(); lRetorno.Relatorio.Rodape.Corretagem_DC = (lDataTable.Rows[0]["VL_VALCOR"].DBToDecimal() > 0 ? "C" : "D"); lRetorno.Relatorio.Rodape.ISS = lDataTable.Rows[0]["VL_ISS"].DBToDecimal(); lRetorno.Relatorio.Rodape.ISS_DC = "D"; //lDataTable.Rows[0]["VL_ISS_CD"].DBToString(); lRetorno.Relatorio.Rodape.IRRFOperacoes = lDataTable.Rows[0]["VL_IROPER"].DBToDecimal(); lRetorno.Relatorio.Rodape.IRRFOperacoes_DC = (lDataTable.Rows[0]["VL_IROPER"].DBToDecimal() > 0 ? "C" : "D"); lRetorno.Relatorio.Rodape.VLBaseOperacoesIRRF = lDataTable.Rows[0]["VL_BASEIROPER"].DBToDecimal(); lRetorno.Relatorio.Rodape.VLBaseOperacoesIRRF_DC = lDataTable.Rows[0]["VL_IROPER_CD"].DBToString(); lRetorno.Relatorio.Rodape.ValorLiquidoNota = lDataTable.Rows[0]["VL_LIQNOT"].DBToDecimal(); lRetorno.Relatorio.Rodape.Outras = lDataTable.Rows[0]["VL_DESP_NOTA"].DBToDecimal(); lRetorno.Relatorio.Rodape.DescOutras = lDataTable.Rows[0]["DS_DESP_NOTA"].DBToString(); } } } }
public NotaDeCorretagemExtratoResponse ConsultarNotaDeCorretagemBmf(NotaDeCorretagemExtratoRequest pParametros) { var lRetorno = new NotaDeCorretagemExtratoResponse(); try { lRetorno = new NotaDeCorretagemDbLib().ConsultarNotaDeCorretagemBmf(pParametros); } catch (Exception ex) { gLogger.Error(string.Concat("Erro ao consultar Nota de Corretagem de BMF ; Cliente: ", pParametros.ConsultaCodigoCliente.ToString()), ex); lRetorno.DescricaoResposta = ex.ToString(); lRetorno.StatusResposta = Library.MensagemResponseStatusEnum.ErroPrograma; } return(lRetorno); }
private void BuscarNotaDeCorretagem_ListaDeNegocios(ref NotaDeCorretagemExtratoRequest pParametros, ref AcessaDados pAcessoDados, ref NotaDeCorretagemExtratoResponse lRetorno) { DataTable lTabela = null; DbCommand lComando = null; bool lDadosHistoricos = DateTime.Today.Subtract(pParametros.ConsultaDataMovimento).Days > 14; var lProc_NotaCorretagem = lDadosHistoricos ? "prc_NC_NegociosRealizados_Sel" : "prc_NC_Negociacao_Sel"; var lNotaDeCorretagemExtratoInfo = new NotaDeCorretagemExtratoInfo(); lComando = pAcessoDados.CreateCommand(CommandType.StoredProcedure, lProc_NotaCorretagem); pAcessoDados.AddInParameter(lComando, "cd_cliente", DbType.Int32, pParametros.ConsultaCodigoCliente); pAcessoDados.AddInParameter(lComando, "dt_datmov", DbType.Date, pParametros.ConsultaDataMovimento); pAcessoDados.AddInParameter(lComando, "dt_negocio", DbType.Date, pParametros.ConsultaDataMovimento); pAcessoDados.AddInParameter(lComando, "tp_mercado", DbType.String, pParametros.ConsultaTipoDeMercado); if (pParametros.ConsultaProvisorio && !lDadosHistoricos) { pAcessoDados.AddInParameter(lComando, "in_broker", DbType.String, "C"); } lTabela = pAcessoDados.ExecuteOracleDataTable(lComando); foreach (DataRow dr in lTabela.Rows) { lNotaDeCorretagemExtratoInfo = new NotaDeCorretagemExtratoInfo(); lNotaDeCorretagemExtratoInfo.EspecificacaoTitulo = dr["cd_especif"].DBToString(); lNotaDeCorretagemExtratoInfo.NomeBolsa = dr["nm_resu_bolsa"].DBToString(); lNotaDeCorretagemExtratoInfo.NomeEmpresa = dr["nm_nomres"].ToString(); lNotaDeCorretagemExtratoInfo.Observacao = dr["in_negocio"].ToString(); lNotaDeCorretagemExtratoInfo.Quantidade = dr["qt_qtdesp"].DBToInt32(); lNotaDeCorretagemExtratoInfo.TipoMercado = dr["ds_mercado"].ToString(); lNotaDeCorretagemExtratoInfo.TipoOperacao = dr["cd_natope"].ToString(); lNotaDeCorretagemExtratoInfo.ValorNegocio = dr["vl_negocio"].DBToDecimal(); lNotaDeCorretagemExtratoInfo.ValorTotal = dr["vl_totneg"].DBToDecimal(); lNotaDeCorretagemExtratoInfo.CodigoCliente = pParametros.ConsultaCodigoCliente; lNotaDeCorretagemExtratoInfo.CodigoNegocio = dr["cd_negocio"].DBToString(); lNotaDeCorretagemExtratoInfo.DC = dr["cd_natope"].DBToString().Equals("C") ? "D" : "C"; lRetorno.Relatorio.ListaNotaDeCorretagemExtratoInfo.Add(lNotaDeCorretagemExtratoInfo); } }
private void BuscarNotaDeCorretagem_RodapeBmf(ref NotaDeCorretagemExtratoRequest pParametros, ref AcessaDados pAcessoDados, ref NotaDeCorretagemExtratoResponse pRetorno) { using (DbCommand lDbCommand = pAcessoDados.CreateCommand(CommandType.StoredProcedure, "PRC_NC_RODAPE_BMF_SEL")) { pAcessoDados.AddInParameter(lDbCommand, "pcd_cliente", DbType.Int32, pParametros.ConsultaCodigoClienteBmf); pAcessoDados.AddInParameter(lDbCommand, "pdt_datmov", DbType.Date, pParametros.ConsultaDataMovimento); if (pParametros.ConsultaProvisorio) { pAcessoDados.AddInParameter(lDbCommand, "in_broker", DbType.String, "C"); } using (DataTable lDataTable = pAcessoDados.ExecuteOracleDataTable(lDbCommand)) { if (lDataTable.Rows.Count > 0) { pRetorno.RelatorioBmf.Rodape.DsCpfCnpj = lDataTable.Rows[0]["DsCpfCnpj"].ToString(); pRetorno.RelatorioBmf.Rodape.NumeroDaNota = lDataTable.Rows[0]["Nr_Nota"].ToString(); pRetorno.RelatorioBmf.Rodape.DataPregao = lDataTable.Rows[0]["Data_Pregao"].DBToDateTime(); pRetorno.RelatorioBmf.Rodape.VendaDisponivel = lDataTable.Rows[0]["VendaDiposnivel"].DBToDecimal(); pRetorno.RelatorioBmf.Rodape.CompraDisponivel = lDataTable.Rows[0]["CompraDiposnivel"].DBToDecimal(); pRetorno.RelatorioBmf.Rodape.VendaOpcoes = lDataTable.Rows[0]["VendaOpcoes"].DBToDecimal(); pRetorno.RelatorioBmf.Rodape.CompraOpcoes = lDataTable.Rows[0]["CompraOpcoes"].DBToDecimal(); pRetorno.RelatorioBmf.Rodape.ValorNegocios = lDataTable.Rows[0]["ValorNegocios"].DBToDecimal(); pRetorno.RelatorioBmf.Rodape.IRRF = lDataTable.Rows[0]["IRRF"].DBToDecimal(); pRetorno.RelatorioBmf.Rodape.IRRFDayTrade = lDataTable.Rows[0]["IRRFDayTrade"].DBToDecimal(); pRetorno.RelatorioBmf.Rodape.TaxaOperacional = lDataTable.Rows[0]["TaxaOperacional"].DBToDecimal(); pRetorno.RelatorioBmf.Rodape.TaxaRegistroBmf = lDataTable.Rows[0]["TaxaRegistroBmf"].DBToDecimal(); pRetorno.RelatorioBmf.Rodape.TaxaBmf = lDataTable.Rows[0]["TaxaBmf"].DBToDecimal(); pRetorno.RelatorioBmf.Rodape.ISS = lDataTable.Rows[0]["ISS"].DBToDecimal(); pRetorno.RelatorioBmf.Rodape.AjustePosicao = lDataTable.Rows[0]["AjustePosicao"].DBToDecimal(); pRetorno.RelatorioBmf.Rodape.AjusteDayTrade = lDataTable.Rows[0]["AjusteDayTrade"].DBToDecimal(); pRetorno.RelatorioBmf.Rodape.TotalDespesas = lDataTable.Rows[0]["TotalDespesas"].DBToDecimal(); pRetorno.RelatorioBmf.Rodape.IrrfCorretagem = lDataTable.Rows[0]["IrrfCorretagem"].DBToDecimal(); pRetorno.RelatorioBmf.Rodape.TotalContaNormal = lDataTable.Rows[0]["TotalContaNormal"].DBToDecimal(); pRetorno.RelatorioBmf.Rodape.TotalLiquido = lDataTable.Rows[0]["TotalLiquido"].DBToDecimal(); pRetorno.RelatorioBmf.Rodape.TotalLiquidoNota = lDataTable.Rows[0]["TotalLiquidoNota"].DBToDecimal(); } } } }
private void BuscarNotaDeCorretagem_Rodape(ref NotaDeCorretagemExtratoRequest pParametros, ref AcessaDados pAcessoDados, ref NotaDeCorretagemExtratoResponse pRetorno) { /*"prc_NC_DadosFinanceiro_Sel"))*/ using (DbCommand lDbCommand = pAcessoDados.CreateCommand(CommandType.StoredProcedure, "prc_notacorretagem_finan_hist")) { pAcessoDados.AddInParameter(lDbCommand, "pcd_cliente", DbType.Int32, pParametros.ConsultaCodigoCliente); pAcessoDados.AddInParameter(lDbCommand, "ptp_negocio", DbType.String, pParametros.ConsultaTipoDeMercado == "VIS" ? "NOR" : "FUT"); pAcessoDados.AddInParameter(lDbCommand, "pdt_datmov", DbType.Date, pParametros.ConsultaDataMovimento); if (pParametros.ConsultaProvisorio) { pAcessoDados.AddInParameter(lDbCommand, "in_broker", DbType.String, "C"); } using (DataTable lDataTable = pAcessoDados.ExecuteOracleDataTable(lDbCommand)) { if (null != lDataTable && lDataTable.Rows.Count > 0) { pRetorno.Relatorio.Rodape.Debentures = lDataTable.Rows[0]["VL_DEBENT"].DBToDecimal(); pRetorno.Relatorio.Rodape.VendaVista = lDataTable.Rows[0]["VL_VDAVIS"].DBToDecimal(); pRetorno.Relatorio.Rodape.CompraVista = lDataTable.Rows[0]["VL_CPAVIS"].DBToDecimal(); pRetorno.Relatorio.Rodape.CompraOpcoes = lDataTable.Rows[0]["VL_CPAOPC"].DBToDecimal(); pRetorno.Relatorio.Rodape.VendaOpcoes = lDataTable.Rows[0]["VL_VDAOPC"].DBToDecimal(); pRetorno.Relatorio.Rodape.OperacoesTermo = lDataTable.Rows[0]["VL_TERMO"].DBToDecimal(); pRetorno.Relatorio.Rodape.OperacoesTitulosPublicos = lDataTable.Rows[0]["VL_TITPUB"].DBToDecimal(); pRetorno.Relatorio.Rodape.ValorDasOperacoes = lDataTable.Rows[0]["VL_TOTNEG"].DBToDecimal(); pRetorno.Relatorio.Rodape.ValorLiquidoOperacoes = pParametros.ConsultaTipoDeMercado == "VIS" ? lDataTable.Rows[0]["VL_LIQ_OPERACOES_VIS"].DBToDecimal() : lDataTable.Rows[0]["VL_LIQ_OPERACOES_OPC"].DBToDecimal(); pRetorno.Relatorio.Rodape.TaxaLiquidacao = lDataTable.Rows[0]["VL_EMOLUM_CB"].DBToDecimal(); pRetorno.Relatorio.Rodape.TaxaLiquidacao_DC = "D"; pRetorno.Relatorio.Rodape.TaxaDeRegistro = lDataTable.Rows[0]["VL_TAXREG_CB"].DBToDecimal(); pRetorno.Relatorio.Rodape.TaxaDeRegistro_DC = (lDataTable.Rows[0]["VL_TAXREG_CB"].DBToDecimal() > 0 ? "C" : "D"); pRetorno.Relatorio.Rodape.TaxaANA = lDataTable.Rows[0]["VL_TAXANA"].DBToDecimal(); pRetorno.Relatorio.Rodape.TaxaANA_DC = (lDataTable.Rows[0]["VL_TAXANA"].DBToDecimal() > 0 ? "C" : "D"); pRetorno.Relatorio.Rodape.Emolumentos = lDataTable.Rows[0]["VL_EMOLUM_BV"].DBToDecimal(); pRetorno.Relatorio.Rodape.Emolumentos_DC = (lDataTable.Rows[0]["VL_EMOLUM_BV"].DBToDecimal() > 0 ? "C" : "D"); pRetorno.Relatorio.Rodape.Corretagem = lDataTable.Rows[0]["VL_VALCOR"].DBToDecimal(); pRetorno.Relatorio.Rodape.Corretagem_DC = (lDataTable.Rows[0]["VL_VALCOR"].DBToDecimal() > 0 ? "C" : "D"); pRetorno.Relatorio.Rodape.ISS = lDataTable.Rows[0]["VL_ISS"].DBToDecimal(); pRetorno.Relatorio.Rodape.ISS_DC = "D"; pRetorno.Relatorio.Rodape.Outras = lDataTable.Rows[0]["VL_DESP_NOTA"].DBToDecimal(); pRetorno.Relatorio.Rodape.ValorLiquidoNota = lDataTable.Rows[0]["VL_LIQNOT"].DBToDecimal(); //--> Total Bovespa/Soma pRetorno.Relatorio.Rodape.DataLiquidoPara = lDataTable.Rows[0]["PZ_PROJ_CC"].DBToDateTime(); // this.RecuperarDataLiquidoPara(pRetorno.Relatorio.CabecalhoCorretora.DataPregao, pParametros.ConsultaTipoDeMercado); pRetorno.Relatorio.Rodape.OperacoesFuturo = lDataTable.Rows[0]["VL_FUTURO"].DBToDecimal(); pRetorno.Relatorio.Rodape.ValorAjusteFuturo = lDataTable.Rows[0]["VL_FUTURO"].DBToDecimal(); pRetorno.Relatorio.Rodape.IRSobreCorretagem = lDataTable.Rows[0]["VL_IRCORR"].DBToDecimal(); pRetorno.Relatorio.Rodape.IRRFSobreDayTrade = lDataTable.Rows[0]["VL_IRRF_DESPESA"].DBToDecimal(); pRetorno.Relatorio.Rodape.Total_123_A = lDataTable.Rows[0]["VL_LIQNOT_CB"].DBToDecimal(); pRetorno.Relatorio.Rodape.Total_123_A_DC = (lDataTable.Rows[0]["VL_LIQNOT_CB"].DBToDecimal() > 0 ? "C" : "D"); pRetorno.Relatorio.Rodape.TaxaTerOpcFut = lDataTable.Rows[0]["VL_TAXPTA"].DBToDecimal(); pRetorno.Relatorio.Rodape.TaxaTerOpcFut_DC = (lDataTable.Rows[0]["VL_TAXPTA"].DBToDecimal() > 0 ? "C" : "D"); pRetorno.Relatorio.Rodape.IRRFOperacoes = lDataTable.Rows[0]["VL_IROPER"].DBToDecimal(); pRetorno.Relatorio.Rodape.IRRFOperacoes_DC = (lDataTable.Rows[0]["VL_IROPER"].DBToDecimal() > 0 ? "C" : "D"); pRetorno.Relatorio.Rodape.VLBaseOperacoesIRRF = lDataTable.Rows[0]["VL_BASEIROPER"].DBToDecimal(); pRetorno.Relatorio.Rodape.VLBaseOperacoesIRRF_DC = (lDataTable.Rows[0]["VL_BASEIROPER"].DBToDecimal() > 0 ? "C" : "D"); //pRetorno.Relatorio.Rodape.DescOutras = lDataTable.Rows[0]["DS_DESP_NOTA"].DBToString(); pRetorno.Relatorio.Rodape.IRRFSobreDayTradeBase = lDataTable.Rows[0]["VL_BASEIRDT_DAYTRADE"].DBToDecimal(); pRetorno.Relatorio.Rodape.IRRFSobreDayTradeProjecao = lDataTable.Rows[0]["VL_IRRETIDO_DAYTRADE"].DBToDecimal(); pRetorno.Relatorio.Rodape.IRRFSemOperacoesBase = lDataTable.Rows[0]["VL_BASEIRDT_RESUMO"].DBToDecimal(); pRetorno.Relatorio.Rodape.IRRFSemOperacoesValor = lDataTable.Rows[0]["VL_IRRETIDO_RESUMO"].DBToDecimal(); } } } }