Produto: | Datasul |
Ocorrência: | Documentação de API |
| Nome Físico | prgfin/apb/apb431za |
Objetivo
Efetuar a consulta de baixa de títulos do módulo Contas a Pagar.
Parâmetros Entrada
tt_param_api_con_pagtos_apb
Parâmetros Saída
tt_pagtos_periodo
tt_erro_msg
Funcionamento
A sintaxe para executar a API/BO em modo persistente é:
run prgfin/apb/apb431za.p persistent set v_handle_apb731za
Utilizar o procedimento principal para execução da api, pi_main_con_movtos_pagto_period.
Para buscar os títulos relacionados a cada baixa executar o procedimento pi_criar_tt_relacto_tit_ap_aux.
Tabela Temporária | Descrição | Entrada/Saída |
tt_param_api_con_pagtos_apb | Parâmetros se seleção para a consulta dos pagamentos efetuados | Entrada |
Atributo | Tipo | Formato | Descrição | Obrig. | Evol. |
ttv_log_pagto_cheq | Logical | yes/no | Pagamento Cheque | Sim |
|
ttv_log_cta_ctbl | Character | X(40) | Valor do Parâmetro | Sim |
|
ttv_log_con_cta_ctbl | Logical | yes/no | Consulta conta contábil | Sim |
|
| ttv_log_pagto_bord | Logical | yes/no | Pagamento Borderô | Sim | |
| ttv_log_pagto_espec | Logical | yes/no | Pagamento dinheiro | Sim | |
| ttv_log_pagto_escrit | Logical | yes/no | Pagamento Escritural | Sim | |
| ttv_cod_estab_ini | Character | X(5) | Estabelecimento Inicial | Sim | |
| ttv_cod_estab_fim | Character | x(5) | Estabelecimento final | Sim | |
| ttv_cod_refer_ini | Character | x(10) | Referencia Inicial | Sim | |
| ttv_cod_refer_fim | Character | x(10) | Referencia Final | Sim | |
| ttv_log_mostra_docto_apb | Logical | yes/no | Pagamento Extra Fornecedor CR | Sim | |
| ttv_log_mostra_pagto_estordo | Logical | yes/no | Pagamento Estornado | Sim | |
| ttv_log_mostra_docto_apb_pef | Logical | yes/no | Pagamento Extra Fornecedor | Sim | |
| ttv_log_mostra_docto_apb_enctro | Logical | yes/no | Pagamento Encontro de Contas | Sim | |
| ttv_log_pagto_cartcred | Logical | yes/no | Pagamento Cartão Crédito | Sim | |
| ttv_dat_pagto_inicial | Date | 99/99/9999 | Data Pagamento Inicial | Sim | |
| ttv_dat_pagto_final | Date | 99/99/9999 | Data Pagamento Final | Sim | |
| ttv_cod_espec_docto_ini | Character | x(3) | Código Espécie Inicial | Sim | |
| ttv_cod_espec_docto_fim | Character | x(3) | Código Espécie Final | Sim | |
| ttv_cdn_fornecedor_ini | Integer | >>>,>>>,>>9 | Código Fornecedor Inicial | Sim | |
| ttv_cdn_fornecedor_fim | Integer | >>>,>>>,>>9 | Código Fornecedor Final | Sim | |
| ttv_cod_portador_ini | Character | x(5) | Código Portador Inicial | Sim | |
| ttv_cod_portador_fim | Character | x(5) | Código Fornecedor Final | Sim | |
| ttv_cod_indic_econ_ini | Character | x(8) | Indicador Econômico Inicial | Sim | |
| ttv_cod_indic_econ_fim | Character | x(8) | Indicador Econômico Final | Sim | |
| ttv_cod_forma_pagto_ini | Character | x(3) | Forma de Pagamento Inicial | Sim | |
| ttv_cod_forma_pagto_fim | Character | x(3) | Forma de Pagamento Final | Sim | |
| ttv_cod_grp_fornec_ini | Character | x(4) | Grupo de Fornecedor Inicial | Sim | |
| ttv_cod_grp_fornec_fim | Character | x(4) | Grupo de Fornecedor Final | Sim | |
| ttv_log_pagto_vencto | Logical | yes/no | Pagamento no Vencimento | Sim | |
| ttv_log_pagto_antecip | Logical | yes/no | Pagamento Antecipado | Sim | |
| ttv_log_pagto_atraso | Logical | yes/no | Pagamento Atraso | Sim | |
| ttv_log_mostra_docto_apb_normal | Logical | yes/no | Mostra documentos do Tipo Normal | Sim | |
| ttv_log_mostra_docto_apb_antecip | Logical | yes/no | Mostra Títulos do tipo antecipação | Sim | |
| ttv_log_mostra_impto_retid | Logical | yes/no | Mostra títulos de imposto retido | Sim | |
| ttv_log_mostra_impto_taxado | Logical | yes/no | Mostra títulos de imposto taxado | Sim | |
| ttv_ind_visualiz_tit_ap_vert | Character | x(20) | Visualização de títulos:
| Sim | |
| ttv_cod_unid_negoc_ini | Character | x(3) | Código Unidade Negócio Incial | Sim | |
| ttv_cod_unid_negoc_fim | Character | x(3) | Código Unidade Negócio Final | Sim | |
| ttv_ind_classif_pagto_period | Character | x(55) | Classificação de títulos:
| Sim | |
| ttv_ind_dwb_run_mode | Character | x(7) | Modo de Execução: On-line/Batch | Sim | |
| ttv_cod_finalid_econ | Character | x(10) | Finalidade Econômica | Sim |
Tabela Temporária | Descrição | Entrada/Saída |
tt_pagtos_periodo | Pagamentos Efetuados no Período | Saída |
Atributo | Tipo | Formato | Descrição | Obrig. | Evol. |
tta_cod_estab | Character | x(5) | Estabelecimento | Sim |
|
tta_cod_ser_docto | Character | X(3) | Série Documento | Sim |
|
tta_cod_espec_docto | Character | x(3) | Espécie Documento | Sim |
|
| tta_cod_portador | Character | x(5) | Portador | Sim | |
| tta_cdn_fornecedor | Integer | >>>,>>>,>>9 | Fornecedor | Sim | |
| tta_nom_abrev | Character | x(15) | Nome Abreviado | Sim | |
| tta_num_id_movto_tit_ap | Integer | 9999999999 | Id Tít AP | Sim | |
| tta_cod_tit_ap | Character | x(16) | Título | Sim | |
| tta_nom_pessoa | Character | x(40) | Nome | Sim | |
| tta_cod_parcela | Character | x(02) | Parcela | Sim | |
| tta_dat_vencto_tit_ap | Date | 99/99/9999 | Data Vencimento | Sim | |
| tta_cod_refer | Character | x(10) | Referência | Sim | |
| tta_dat_pagto | Date | 99/99/9999 | Data pagamento | Sim | |
| tta_cod_unid_negoc | Character | x(3) | Unid Negócio | Sim | |
| tta_cod_indic_econ | Character | x(8) | Moeda | Sim | |
| ttv_val_pagto_apb | Decimal | ->>,>>>,>>>,>>9.99 | Valor Pagamento | Sim | |
| ttv_val_finalid_apres | Decimal | ->>,>>>,>>>,>>9.99 | Valor Finalid Apres | Sim | |
| ttv_cod_dwb_field_apb | Character | x(32) | Campo | Sim | |
| ttv_rec_compl_movto_pagto | Integer | >>>>>>9 | RECID Compl_movto_pagto | Sim | |
| tta_cod_contrat_cartcred | Character | x(10) | Contrato Cartão | Sim | |
| tta_cod_portad_cartcred | Character | x(10) | Portador Cartão | Sim | |
| ttv_rec_movto_tit_ap | Integer | >>>>>>9 | Recid movto_tit_ap | Sim | |
| tta_cod_forma_pagto | Character | x(3) | Forma Pagamento | Sim | |
| tta_val_despes_bcia | Decimal | ->>>,>>>,>>9.99 | Valor Despesa Bancária | Sim | |
| ttv_cod_indic_econ_des | Character | x(8) | Moeda | Sim | |
| tta_num_cheque | Integer | >>>>,>>>,>>9 | Numero Cheque | Sim | |
| tta_num_talon_cheq | Integer | >>>,>>>,>>9 | Talonário Cheques | Sim | |
| tta_val_multa_tit_ap | Decimal | ->>>,>>>,>>9.99 | Valor Multa | Sim | |
| tta_val_juros | Decimal | >>>>,>>>,>>9.99 | Valor Juros | Sim | |
| tta_val_cm_tit_ap | Decimal | ->>>,>>>,>>9.99 | Valor Correção Monetária | Sim | |
| tta_val_desc_tit_ap | Decimal | ->>>,>>>,>>9.99 | Valor Desconto | Sim | |
| tta_val_abat_tit_ap | Decimal | ->>>,>>>,>>9.99 | Valor Abatimento | Sim | |
| ttv_val_multa_apres | Decimal | >>>>,>>>,>>9.99 | Valor Multa | Sim | |
| ttv_val_juros_apres | Decimal | >>>>,>>>,>>9.99 | Valor Juros | Sim | |
| ttv_val_cm_apres | Decimal | >>>>,>>>,>>9.99 | Valor Correção Monetária | Sim | |
| ttv_val_desc_apres | Decimal | >>>>,>>>,>>9.99 | Valor Desconto | Sim | |
| ttv_val_abat_apres | Decimal | >>>>,>>>,>>9.99 | Valor Abatimento | Sim | |
| tta_des_text_histor | Character | x(2000) | Histórico | Sim | |
| tta_num_bord_ap | Integer | >>>>>9 | Número Borderô | Sim | |
| tta_des_forma_pagto | Character | x(40) | Descrição Forma Pagamento | Sim | |
| ttv_rec_tit_ap | Integer | >>>>>>9 | Recid tit_ap | Sim | |
| ttv_cod_banco | Character | x(8) | Banco | Sim | |
| ttv_cod_agenc_bcia | Character | x(10) | Agência Bancária | Sim | |
| ttv_cod_digito_agenc | Character | x(2) | Dígito Agência | Sim | |
| ttv_cod_cta_corren_bco_pagto | Character | x(20) | Conta Corrente | Sim | |
| ttv_cod_digito_cta_corren_pagto | Character | x(2) | Dígito Conta Corrente | Sim | |
| tta_ind_trans_ap | Character | x(26) | Transação | Sim | |
| tta_cod_empresa | Character | x(3) | Empresa | Sim | |
| ttv_val_original | Decimal | ->>>>>,>>>,>>9.99 | Valor Original | Sim | |
| tta_cod_safra | Character | 9999/9999 | Safra | Sim | |
| tta_cod_contrat_graos | Character | x(20) | Contrato Grãos | Sim |
def temp-table tt_pagtos_periodo no-undo
field tta_cod_estab as character format "x(5)" label "Estabelecimento" column-label "Estab"
field tta_cod_ser_docto as character format "x(3)" label "Série Documento" column-label "Série"
field tta_cod_espec_docto as character format "x(3)" label "Espécie Documento" column-label "Espécie"
field tta_cod_portador as character format "x(5)" label "Portador" column-label "Portador"
field tta_cdn_fornecedor as Integer format ">>>,>>>,>>9" initial 0 label "Fornecedor" column-label "Fornecedor"
field tta_nom_abrev as character format "x(15)" label "Nome Abreviado" column-label "Nome Abreviado"
field tta_num_id_movto_tit_ap as integer format "9999999999" initial 0 label "Token Movto Tít AP" column-label "Id Tít AP"
field tta_cod_tit_ap as character format "x(16)" label "Título" column-label "Título"
field tta_nom_pessoa as character format "x(40)" label "Nome" column-label "Nome"
field tta_cod_parcela as character format "x(02)" label "Parcela" column-label "Parcela"
field tta_dat_vencto_tit_ap as date format "99/99/9999" initial today label "Data Vencimento" column-label "Dt Vencto"
field tta_cod_refer as character format "x(10)" label "Referência" column-label "Referência"
field tta_dat_pagto as date format "99/99/9999" initial today label "Data Pagamento" column-label "Data Pagto"
field tta_cod_unid_negoc as character format "x(3)" label "Unid Negócio" column-label "Un Neg"
field tta_cod_indic_econ as character format "x(8)" label "Moeda" column-label "Moeda"
field ttv_val_pagto_apb as decimal format "->>,>>>,>>>,>>9.99" decimals 2 label "Valor Pagamento" column-label "Valor Pagamento"
field ttv_val_finalid_apres as decimal format "->>,>>>,>>>,>>9.99" decimals 2 label "Valor Finalid Apres" column-label "Valor Movto"
field ttv_cod_dwb_field_apb as character extent 5 format "x(32)" label "Campo" column-label "Campo"
field ttv_rec_compl_movto_pagto as recid format ">>>>>>9"
field tta_cod_contrat_cartcred as character format "x(10)" label "Contrato Cartão" column-label "Contrato Cartão"
field tta_cod_portad_cartcred as character format "x(10)" label "Portador Cartão" column-label "Portador Cartão"
field ttv_rec_movto_tit_ap as recid format ">>>>>>9"
field tta_cod_forma_pagto as character format "x(3)" label "Forma Pagamento" column-label "F Pagto"
field tta_val_despes_bcia as decimal format "->>>,>>>,>>9.99" decimals 2 initial 0 label "Vl Desp Banc" column-label "Vl Desp Banc"
field ttv_cod_indic_econ_des as character format "x(8)" label "Moeda" column-label "Moeda"
field tta_num_cheque as integer format ">>>>,>>>,>>9" initial ? label "Núm Cheque" column-label "Num Cheque"
field tta_num_talon_cheq as integer format ">>>,>>>,>>9" initial 0 label "Talonário Cheques" column-label "Talonário Cheques"
field tta_val_multa_tit_ap as decimal format "->>>,>>>,>>9.99" decimals 2 initial 0 label "Valor Multa" column-label "Valor Multa"
field tta_val_juros as decimal format ">>>>,>>>,>>9.99" decimals 2 initial 0 label "Valor Juros" column-label "Valor Juros"
field tta_val_cm_tit_ap as decimal format "->>>,>>>,>>9.99" decimals 2 initial 0 label "Val Correção Monet" column-label "Val Corr Monet"
field tta_val_desc_tit_ap as decimal format "->>>,>>>,>>9.99" decimals 2 initial 0 label "Valor Desconto" column-label "Vl Desconto"
field tta_val_abat_tit_ap as decimal format "->>>,>>>,>>9.99" decimals 2 initial 0 label "Valor Abatimento" column-label "Vl Abatimento"
field ttv_val_multa_apres as decimal format ">>>>,>>>,>>9.99" decimals 2 label "Valor Multa" column-label "Valor Multa"
field ttv_val_juros_apres as decimal format ">>>>,>>>,>>9.99" decimals 2 label "Valor juros" column-label "Valor Juros"
field ttv_val_cm_apres as decimal format ">>>>,>>>,>>9.99" decimals 2 label "Valor Cor Monetaria" column-label "Val Corr Monet"
field ttv_val_desc_apres as decimal format ">>>>,>>>,>>9.99" decimals 2 label "Valor Desconto" column-label "Vl Desconto"
field ttv_val_abat_apres as decimal format ">>>>,>>>,>>9.99" decimals 2 label "Valor Abatimento" column-label "Vl Abatimento"
field tta_des_text_histor as character format "x(2000)" label "Histórico" column-label "Histórico"
field tta_num_bord_ap as integer format ">>>>>9" initial 0 label "Número Borderô" column-label "Borderô"
field tta_des_forma_pagto as character format "x(40)" label "Descr Forma Pagto" column-label "Descr Forma Pagto"
field ttv_rec_tit_ap as recid format ">>>>>>9" initial ?
field ttv_cod_banco as character format "x(8)" label "Banco" column-label "Banco"
field ttv_cod_agenc_bcia as character format "x(10)" label "Agência Bancária" column-label "Agência Bancária"
field ttv_cod_digito_agenc as character format "x(2)" label "Dígito Agência" column-label "Dígito Agência"
field ttv_cod_cta_corren_bco_pagto as character format "x(20)" label "Conta Corrente" column-label "Conta Corrente"
field ttv_cod_digito_cta_corren_pagto as character format "x(2)" label "Dígito Cta Corrente" column-label "Dígito Cta Corrente"
field tta_ind_trans_ap as character format "X(26)" initial "Implantação" label "Transação" column-label "Transação"
field tta_cod_empresa as character format "x(3)" label "Empresa" column-label "Empresa"
field ttv_val_original as decimal format "->>>>>,>>>,>>9.99" decimals 4 initial 0 label "Valor Original" column-label "Valor Original"
field tta_cod_safra as character format "9999/9999" label "Safra" column-label "Safra"
field tta_cod_contrat_graos as character format "x(20)" label "Contrato Grãos" column-label "Contr Grãos"
index tt_estab_un
tta_cod_estab ascending
tta_cod_unid_negoc ascending
index tt_fornecedor
tta_cdn_fornecedor ascending
index tt_id is primary unique
tta_cod_estab ascending
tta_num_id_movto_tit_ap ascending
tta_cod_unid_negoc ascending
index tt_id_tit_ap
tta_cod_estab ascending
tta_cdn_fornecedor ascending
tta_cod_espec_docto ascending
tta_cod_tit_ap ascending
tta_cod_parcela ascending
tta_dat_pagto ascending .
Tabela Temporária | Descrição | Entrada/Saída |
tt_erro_msg | Mensagens de erro | Saída |
Atributo | Tipo | Formato | Descrição | Obrig. | Evol. |
ttv_num_msg_erro | Integer | >>>>>>9 | Mensagem | Sim |
|
ttv_des_msg_erro | Character | X(40) | Mensagem Erro | Sim |
|
ttv_des_help_erro | Character | x(200) | Descrição Ajuda Erro | Sim |
|
Exemplo de utilização da Api.