Histórico da Página
...
Atributo | Tipo | Formato | Descrição | Obrigatório | Evolução |
ttv_cod_empresa | character | x(3) | Código da empresa externa a ser traduzida pela matriz de tradução de unidade organizacional. | Sim | |
ttv_cdn_emit | integer | >>>>>>>>9 | Código numérico do fornecedor do documento fiscal. | Sim | |
ttv_cod_nota | character | x(20) | Número do documento fiscal. | Sim | |
ttv_cod_ser_nota | character | x(5) | Série do documento fiscal. | Sim | |
ttv_cod_natur_operac | character | x(6) | Natureza de operação do documento fiscal. | Sim | |
ttv_cod_estab | character | x(3) | Código do estabelecimento externo a ser traduzido pela matriz de tradução de unidade organizacional. | Sim | |
ttv_dat_aquis_bem_pat | date | 99/99/9999 | Data de emissão do documento de entrada do qual é extraído um item de um lançamento contábil. | Sim | |
ttv_cod_cta | character | x(20) | Código do centro de custo. | Não | |
ttv_cdn_aux | integer | >>>,>>9 | Código do centro de custo externo a ser traduzido pela matriz de tradução de centros de custo. | Não | |
ttv_cod_origem | character | x(8) | Código da origem do documento de entrada. | Não | |
ttv_des_aux_5 | character | x(40) | Narrativa do item do documento de entrada. | Não | |
ttv_cod_chave_aces_docto_fisc | character | x(60) | Chave de acesso da Nota Fiscal Eletrônica (NF-e) ou do Documento Fiscal correspondente, que será utilizada para a geração dos eventos relativos à CBS e ao IBS no sistema da NF-e. | Não | |
ttv_val_aquis_bem_pat | decimal | ->>,>>>,>>>,>>9.99 | Valor do documento de entrada. | Não | |
ttv_val_aquis_fasb_bem_pat | decimal | >>,>>>,>>>,>>9.99 | Valor FASB do documento de entrada. | Não | |
ttv_val_aquis_cmi_bem_pa | decimal | >>,>>>,>>>,>>9.99 | Valor CMCAC do documento de entrada. | Não | |
ttv_val_ibs_munic | decimal | >>>,>>>,>>>,>>9.99 | Valor do IBS - Imposto sobre Bens e Serviços municipal no documento fiscal de entrada sempre que a operação envolver incidência desse tributo. | Não | |
ttv_val_ibs_estad | decimal | >>>,>>>,>>>,>>9.99 | Valor do IBS - Imposto sobre Bens e Serviços estadual no documento fiscal de entrada sempre que a operação envolver incidência desse tributo. | Não | |
ttv_val_cbs | decimal | >>>,>>>,>>>,>>9.99 | Valor da CBS - Contribuição sobre Bens e Serviços do documento fiscal de entrada sempre que a operação envolver incidência desse tributo. | Não | |
ttv_num_seq_item_xml | integer | >>>>,>>9 | Número da sequência do item no XML do documento fiscal de entrada. | Não | |
ttv_cod_unid_medid_item_xml | character | x(12) | Unidade de medida do item no XML do documento fiscal de entrada. | Não | |
ttv_rec_id_bem_pat_2 | recid/roiwd | Recid ou Rowid, caso já tenha liberação da função | Não | ||
ttv_cdn_unid_bem | integer | >>>,>>9 | Quantidade do item do documento de entrada. | Sim | |
ttv_cdn_org_bem | integer | >>>,>>9 | Número da ordem de investimentos do documento de entrada. | Não | |
ttv_cdn_ord_manut | integer | >>>,>>9 | Número da ordem de manutenção do documento de entrada. | Não | |
ttv_des_bem_pat | character | x(40) | Descrição do item do documento de entrada | Sim | |
ttv_cod_unid_negoc | character | x(3) | Código da unidade de negócio. | Não | |
tta_num_id_ri_bem_pat | integer | >>>,>>>,>>9 | Número de identificação do bem patrimonial. | Não | |
ttv_gera_bem_quant | logical | yes/no | Indicador de geração de bens por quantidade. | Não | |
ttv_sequencia | integer | >>9 | Número sequencial do item do documento fiscal. | Não | |
ttv_cod_moed_fasb | character | x(8) | Código da moeda FASB. | Não | |
ttv_dat_cotac_fasb | date | 99/99/9999 | Data de cotação da moeda FASB. | Não | |
ttv_cod_ccusto | character | X(8) | Centro de Custo ems5 | Sim |
...
/*-- Filtro RECID x ROWID Aplicado --*/
{include/i_fncrowid.i}
def temp-table tt_log_erros no-undo
field ttv_num_seq as integer format ">>>,>>9" label "Seqüência" column-label "Seq"
field ttv_num_cod_erro as integer format ">>>>,>>9" label "Número" column-label "Número"
field ttv_des_erro as character format "x(50)" label "Inconsistência" column-label "Inconsistência"
field ttv_des_ajuda as character format "x(50)" label "Ajuda" column-label "Ajuda"
index tt_id
ttv_num_seq ascending
ttv_num_cod_erro ascending
.
def temp-table tt_bem_invest_mga no-undo
field ttv_cod_empresa as char format 'x(3)' label 'Empresa Externa' column-label 'Empresa Ext Inicial'
field ttv_cdn_emit as integer format '>>>>>>>>9' label 'Emitente' column-label 'Emitente'
field ttv_cod_nota as character format 'x(20)'
field ttv_cod_ser_nota as character format 'x(5)' label 'S‚rie Nota' column-label 'S‚rie Nota'
field ttv_cod_natur_operac as character format 'x(6)' label 'Natureza Opera‡Æo' column-label 'Natureza Opera‡Æo'
field ttv_cod_estab as character format 'x(3)' label 'Estabelecimento' column-label 'Estabelecimento'
field ttv_dat_aquis_bem_pat as date format '99/99/9999' label 'Data Aquisi‡Æo' column-label 'Data Aquisi‡Æo'
field ttv_cod_cta as character format 'x(20)'
field ttv_cdn_aux as integer format '>>>,>>9'
field ttv_cod_origem as character format 'x(8)' label 'Origem' column-label 'Origem'
field ttv_des_aux_5 as character format 'x(40)'
field ttv_cod_chave_aces_docto_fisc as character format 'x(60)'
field ttv_val_aquis_bem_pat as decimal format '->>,>>>,>>>,>>9.99' decimals 2 initial 0 label 'Aquisi‡Æo Bem' column-label 'Aquisi‡Æo Bem'
field ttv_val_aquis_fasb_bem_pat as decimal format '>>,>>>,>>>,>>9.99' decimals 2
field ttv_val_aquis_cmi_bem_pat as decimal format '>>,>>>,>>>,>>9.99' decimals 2
field ttv_val_ibs_munic as decimal format '>>>,>>>,>>>,>>9.99' decimals 2
field ttv_val_ibs_estad as decimal format '>>>,>>>,>>>,>>9.99' decimals 2
field ttv_val_cbs as decimal format '>>>,>>>,>>>,>>9.99' decimals 2
field ttv_num_seq_item_xml as integer format '>>>>,>>9'
field ttv_cod_unid_medid_item_xml as character format 'x(12)'
field ttv_cdn_unid_bem as integer format '>>>,>>9'
field ttv_cdn_org_bem as integer format '>>>,>>9'
field ttv_cdn_ord_manut as integer format '>>>,>>9'
field ttv_des_bem_pat as character format 'x(40)' label 'Descri‡Æo Bem Pat' column-label 'Descri‡Æo Bem Pat'
field ttv_rec_id_bem_pat_2 as &IF "{&ROWID_READY}" = "YES" &THEN rowid &ELSE recid &ENDIF
field ttv_cod_unid_negoc as character format 'x(3)' label 'Unid Neg¢cio' column-label 'Un Neg'
field tta_num_id_ri_bem_pat as integer format '>>>,>>>,>>9' initial 1 label 'Identific Bem MRI' column-label 'ID Bem MRI'
field ttv_gera_bem_quant as logical initial no label "Gerar Bem por Quantidade" column-label "Gerar Bem por Quantidade"
field ttv_sequencia as integer format '>>9' initial 0 label 'Sequencia' column-label 'Seq'
field ttv_cod_moed_fasb as character format 'x(8)'
field ttv_dat_cotac_fasb as date format '99/99/9999'
field ttv_cod_ccusto as character format "x(8)" label "Centro Custo" column-label "CCusto".
def var v_hdl_program as handle no-undo.
create tt_bem_invest_mga.
assign tt_bem_invest_mga.ttv_cod_empresa = "10"
tt_bem_invest_mga.ttv_cod_estab = "1"
tt_bem_invest_mga.ttv_dat_aquis_bem_pat = today
tt_bem_invest_mga.ttv_cdn_emit = 1
tt_bem_invest_mga.ttv_cod_nota = "0543"
tt_bem_invest_mga.ttv_cod_natur_operac = "6181A"
tt_bem_invest_mga.ttv_cod_ser_nota = "S"
tt_bem_invest_mga.ttv_cod_chave_aces_docto_fisc = '34221001442721000333-44-001-000005418-1-17417368-1'
tt_bem_invest_mga.ttv_val_aquis_bem_pat = 129.99 //VALOR DO BEM
tt_bem_invest_mga.ttv_cdn_unid_bem = 5 //QUANTIDADE
tt_bem_invest_mga.ttv_val_ibs_munic = 12.34
tt_bem_invest_mga.ttv_val_ibs_estad = 24.56
tt_bem_invest_mga.ttv_val_cbs = 36.78
tt_bem_invest_mga.ttv_num_seq_item_xml = 965
tt_bem_invest_mga.ttv_cod_unid_medid_item_xml = 'KG'
tt_bem_invest_mga.ttv_des_bem_pat = "Primeiro Bem"
tt_bem_invest_mga.ttv_cod_cta = '010701010000101'.
create tt_bem_invest_mga.
assign tt_bem_invest_mga.ttv_cod_empresa = "10"
tt_bem_invest_mga.ttv_cod_estab = "1"
tt_bem_invest_mga.ttv_dat_aquis_bem_pat = today
tt_bem_invest_mga.ttv_cdn_emit = 5
tt_bem_invest_mga.ttv_cod_nota = "0543"
tt_bem_invest_mga.ttv_cod_natur_operac = "6181A"
tt_bem_invest_mga.ttv_cod_ser_nota = "S"
tt_bem_invest_mga.ttv_cod_chave_aces_docto_fisc = '65221001442721000333-44-001-000005418-1-17417368-1'
tt_bem_invest_mga.ttv_val_aquis_bem_pat = 655569.99 //VALOR DO BEM
tt_bem_invest_mga.ttv_cdn_unid_bem = 34 //QUANTIDADE
tt_bem_invest_mga.ttv_val_ibs_munic = 42.34
tt_bem_invest_mga.ttv_val_ibs_estad = 54.56
tt_bem_invest_mga.ttv_val_cbs = 66.78
tt_bem_invest_mga.ttv_num_seq_item_xml = 465
tt_bem_invest_mga.ttv_cod_unid_medid_item_xml = 'M2'
tt_bem_invest_mga.ttv_cdn_unid_bem = 20
tt_bem_invest_mga.ttv_des_bem_pat = "Segundo Bem"
tt_bem_invest_mga.ttv_cod_cta = '010701010000101'.
run prgfin\fas\fas791za.py persistent set v_hdl_program.
run pi_api_criacao_docto_entr in v_hdl_program (input "ems2",
input-output table tt_bem_invest_mga,
output table tt_log_erros).
delete procedure v_hdl_program.
assign v_hdl_program = ?.
for each tt_log_erros no-lock:
message "Seq.: " tt_log_erros.ttv_num_seq skip
"Cod. Erro: " tt_log_erros.ttv_num_cod_erro skip
"Descri‡Æo Erro: " tt_log_erros.ttv_des_erro skip
"Ajuda: " tt_log_erros.ttv_des_ajuda skip
view-as alert-box.
end.