Árvore de páginas

Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.

...

p_cod_estab:  Código do estabelecimento do título. Aceita o estabelecimento do recebimento ou do APB.
p_cdn_fornecedor:
Código do fornecedor.
p_cod_espec_docto:
Espécie do documento.
p_cod_ser_docto:
Série do documento.
p_cod_tit_ap:
Número do documento
p_cod_parcela:
Número da parcela.

OBS: Os parâmetros de entrada são referentes a chave primária do título normal.


Parâmetros de Saída

tt_compl_impto_retid_ap_an: Retorna as informações do título de antecipação utilizadas para baixar o título consultado, além do saldo de retenção de IR no título. OBS: Se não existir baixa por antecipação a tabela retornará vazia.

...

cod_estabcod_livre_2100)

Atributo

Tipo

Formato

Descrição

Obrig.

Evol.

tta_cod_empresa

character

x(3) 

Empresa

Sim

tta_cod_estabcharacterx(5)EstabelecimentoSim
tta_num_id_tit_apinteger999999999Token Tit AP Sim
tta_cdn_fornec_favorecinteger>>>,>>>,>>9Fornec Favorecido Sim
tta_cdn_fornecedorinteger>>>,>>>,>>9FornecedorSim
tta_cod_indic_econ_origcharacterx(8)Indicador EconomicoSim
tta_val_rendto_tributinteger>,>>>,>>>,>>9.99Rendto Tributável Sim
tta_val_aliq_imptointeger>9.9999AlíquotaSim
tta_val_impto_indic_econ_originteger->>>,>>>,>>9.99Val Impto OrigSim
tta_cod_paischaracterx(3)PaísSim
tta_cod_unid_federaccharacterx(3)Unidade Federação Sim
tta_cod_impostocharacterx(5)ImpostoSim
tta_cod_classif_imptocharacterx(5)Class Impostonum_id_tit_ap_paiinteger999999999Tokenlog_impto_vincul_anteciplogicalImpto Vincul AntecipSim
tta_val_sdo_dispon_imptointeger->>>,>>>,>>9.99Sdo Disponível Imptodat_vencto_tit_apdate
Data VencimentoSim
tta_cod_indic_econ_imptocharacterx(8)Indicador Economiconum_id_movto_tit_ap_paiinteger999999999Tk Mv Tit Ap PaiSim
tta_ind_clas_imptocharacterx(14)Classe ImpostoSim
tta_num_id_movto_tit_ap_paicharacterx(5)Estab Tit Paiinteger999999999Tk Mv Tit Ap PaiSim
tta_log_dados_dirf_geradlogicalGerou Dados Dirflog_tit_ap_transfdological
Título TransferidoSim
codtta_livre_1characterx(100) Livre 1log_impto_vincul_anteciplogical
Impto Vincul AntecipSim
tta_val_sdo_dispon_imptointeger-log_livre_1logicalLivre 1num_livre_1integer>>>>>9Livre 1val_livre_1integer>>>,>>>,>>9.9999Livre 1dat_livre_1dateLivre 199Sdo Disponível ImptoSim
tta_cod_estab_duplcharacterx(Livre 2dat_livre_2dateLivre 2log_livre_2logicalLivre 2num_livre_2integer>>>>>9Livre 28)Estabelecimento do título Liquidado por antecipaçãoSim
ttv_num_id_tit_ap_duplinteger9999999999Numero do títuloSim
ttv_val_impto_indic_econ_dupldecimal->>,val_livre_2decimal>>>,>>>,>>9.9999Livre 299Valor saldo de imposto a reter no títuloSim
ttv_val_rendto_tribut_duplval_base_liq_imptodecimal>>>,>>>,>>>,>>9.99 Base Líquida Impostoval_eqpto_deduc_inssdecimal->>>,>>>,>>9.99 Val Equipto Ded INSSval_alimen_deduc_inssdecimal->>>,>>>,>>9.99Val Aliment Ded INSSval_transp_deduc_inssdecimal->>>,>>>,>>9.99Val Transp Ded INSSind_tip_proces_rendto_acumcharacterx(15)Tipo Proc Rendto Accod_proces_rendto_acumcharacterx(20)Cod Processo Rendtocod_natur_rendto_acumcharacterx(40)Natureza Rendto Acumqtd_meses_rendto_acumdecimal>>>>9Qtd Meses Rend Acumval_despes_procesdecimal.99Valor saldo de rendimento tributável do título.Sim
tta_num_seq_imptointeger>>>>,>>9SequencialSim


def temp-table tt_compl_impto_retid_ap_antec no-undo
    field tta_cod_empresa                  as character format "x(3)" label "Empresa" column-label "Empresa"
    field tta_cod_estab                    as character format "x(5)" label "Estabelecimento" column-label "Estab"
    field tta_num_id_tit_ap                as integer format "999999999" initial 0 label "Token T¡t AP" column-label "Token T¡t AP"
    field tta_num_seq_impto                as integer format ">>>,>>9" initial 0 label "Sequˆncia Imposto" column-label "Sequˆncia Imposto"
    field tta_cdn_fornec_favorec           as Integer format ">>>,>>>,>>9" initial 0 label "Fornec Favorecido" column-label "Fornec Favorecido"
    field tta_cdn_fornecedor               as Integer format ">>>,>>>,>>9" initial 0 label "Fornecedor" column-label "Fornecedor"
    field tta_cod_indic_econ_orig          as character format "x(8)" label "Moeda Origem" column-label "Moeda Orig"
    field tta_val_rendto_tribut            as decimal format ">>,>>>,>>>,>>9.99" decimals 2 initial 0 label "Rendto Tribut vel" column-label "Vl Rendto Tribut"
    field tta_val_aliq_impto               as decimal format ">9.9999" decimals 4 initial 0.00 label "Al¡quota" column-label "Aliq"
    field tta_val_impto_indic_econ_orig    as decimal format "->>>,>>>,>>9.99

...

def temp-table tt_compl_impto_retid_ap_an no-undo like compl_impto_retid_ap
    field ttv_cod_estab_dupl                     as character format "x(8)" label "Estabelecimento" column-label "Estab" decimals 2 initial 0 label "Val Impto Orig" column-label "Val Impto Orig"
    field tta_cod_pais                     as character format "x(3)" label "Pa¡s" column-label "Pa¡s"
    field tta_cod_unid_federac             as character format "x(3)" label "Estado" column-label "UF"
    field tta_cod_imposto                  as character format "x(5)" label "Imposto" column-label "Imp"
    field tta_cod_classif_impto            as character format "x(05)" initial "00000" label "Classifica‡Æo Imposto" column-label "Classif Imposto"
    field tta_dat_vencto_tit_ap            as date format "99/99/9999" initial today label "Data Vencimento" column-label "Dt Vencto"
    field tta_cod_indic_econ_impto         as character format "x(8)" label "Indicador Economico" column-label "Indicador Economico"
    field tta_ind_clas_impto               as character format "X(14)" initial "Retido" label "Classe Imposto" column-label "Classe Imposto"
    field tta_num_id_movto_tit_ap_pai      as integer format "9999999999" initial 0 label "Tk Mv Tit Ap Pai" column-label "Tk Mv Tit Ap Pai"
    field tta_log_tit_ap_transfdo          as logical format "Sim/NÆo" initial no label "T¡tulo Transferido" column-label "T¡tulo Transferido"
    field tta_log_impto_vincul_antecip     as logical format "Sim/NÆo" initial no label "Impto Vincul Antecip" column-label "Impto Vincul Antecip"
    field tta_val_sdo_dispon_impto         as decimal format "->>>,>>>,>>9.99" decimals 2 initial 0 label "Sdo Dispon¡vel Impto" column-label "Sdo Dispon¡vel Impto"
    field tta_cod_estab_dupl               as character format "x(5)" label "Estabelecimento Dupl" column-label "Estabelecimento Dupl"
    field ttv_num_id_tit_ap_dupl  dupl              as as integer format "9999999999"
    field ttv_val_impto_indic_econ_dupl  dupl    as decimal format "->>,>>>,>>>,>>9.99" decimals 2
    field ttv_val_rendto_tribut_dupl  dupl         as decimal format ">>,>>>,>>>,>>9.99" decimals 2
    field ttv_num_seq_impto                    as integer format ">>>>,>>9"
    index tt_seq_impto                     is primary
          tta_cod_estab                        ascending
          tta_num_id_tit_ap  ap                 ascending ascending
          ttvtta_num_seq_impto  impto               ascending. ascending
      .