public override bool execute( ) { Registry("execute fetch_consultaLojistaRep "); /// USER [ execute ] T_Loja loj = new T_Loja(this); if (!loj.select_rows_loja(input_cnpj)) { PublishError("Cnpj não disponível"); return(false); } if (!loj.fetch()) { return(false); } if (loj.get_st_senha() != input_pass) { PublishError("Senha inválida"); return(false); } T_Empresa emp = new T_Empresa(this); if (!emp.select_rows_empresa(input_empresa.PadLeft(6, '0'))) { PublishError("Empresa não disponível"); return(false); } if (!emp.fetch()) { return(false); } LINK_LojaEmpresa lje = new LINK_LojaEmpresa(this); if (!lje.select_fk_empresa_loja(emp.get_identity(), loj.get_identity())) { PublishError("Loja não conveniada com associação"); return(false); } if (!lje.fetch()) { return(false); } double tx = lje.get_int_tx_admin(); T_Cartao cart = new T_Cartao(this); T_Parcelas parc = new T_Parcelas(this); LOG_Transacoes ltr = new LOG_Transacoes(this); LOG_Fechamento lf = new LOG_Fechamento(this); StringBuilder sb = new StringBuilder(); if (lf.select_rows_mes_ano(input_mes.PadLeft(2, '0'), input_ano.PadLeft(2, '0'), emp.get_identity())) { if (lf.RowCount() > 0) { while (lf.fetch()) { if (lf.get_fk_loja() != loj.get_identity()) { continue; } if (!parc.selectIdentity(lf.get_fk_parcela())) { return(false); } if (!ltr.selectIdentity(parc.get_fk_log_transacoes())) { return(false); } if (!emp.selectIdentity(ltr.get_fk_empresa())) { return(false); } if (!cart.selectIdentity(ltr.get_fk_cartao())) { return(false); } DadosConsultaTransacao dct = new DadosConsultaTransacao(); dct.set_dt_transacao(ltr.get_dt_transacao()); dct.set_st_nsu(ltr.get_nu_nsu()); dct.set_nu_parcelas(parc.get_nu_indice()); dct.set_st_cartao(cart.get_st_empresa() + "." + cart.get_st_matricula() + "." + cart.get_st_titularidade()); dct.set_vr_valor(ltr.get_vr_total()); long repasse = Convert.ToInt64(lf.get_int_vr_valor() - (lf.get_int_vr_valor() * tx / 10000)); dct.set_vr_repasse(repasse.ToString()); DataPortable tmp = dct as DataPortable; sb.Append(MemorySave(ref tmp)); sb.Append(","); } } } string list_ids = sb.ToString().TrimEnd(','); if (list_ids == "") { PublishNote("Nenhum resultado foi encontrado"); return(true); } DataPortable dp = new DataPortable(); dp.setValue("ids", list_ids); output_st_content = MemorySave(ref dp); /// USER [ execute ] END Registry("execute done fetch_consultaLojistaRep "); return(true); }