Páginas filhas
  • Offline Accounting Entries (CTBANFE - SIGACTB)

Versões comparadas

Chave

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

...

  • 640 - Inflow Document Items - Return Only (SD1)
  • 641 - Inflow Document Items - Return or Processing (SD1)
  • 642 - Inflow Document Header (SF2) - Return or Processing (SF1)
  • 650 - Inflow Document Items (SD1)
  • 651 - Cost Center Apportionment Items (SDE)
  • 652 - Purchase Order Items (SC7)
  • 660 - Inflow Document Header (SF2)
  • 950 - Inflow Document Header Registered only for import documents (SIGAEIC).

 


Image ModifiedImportant:

This routine runs on any system version. However, check the following considerations:

  • For versions not using TOTVS DBAccess, aliasesare provided for standard entries before their processing.
  • For versions using TOTVS DBAccess, the parameter MV_OPTNFE can be configured as F or T    

According to this parameter, the standard entry must be configured in accordance with examples below:


Parameter MV_OPTNFE defined as F 


The routine selects records through database query.Before registering standard entries, the aliases areselected and made available for use. Thus, entries could be:


Credit

Iif(SF1->F1_TIPO$’DB’,SA1->A1_CONTA,SA2->A2_CONTA)

Debit

SD1->D1_CONTA

Value

SD1->D1_TOTAL-SD1->D1_VALDESC+SD1->D1_VALIPI+SD1->D1_ICMRET


Parameter MV_OPTNFE defined as T

...

The routine selects records through database query. For standard entry registration, the alias CTBANFE is provided, with some fields from tables mentioned in standard entries. Thus, entries could be:


Credit

Iif(CTBANFE->F1_TIPO$’DB’,CTBANFE->A1_CONTA,CTBANFE->A2_CONTA)

Debit

CTBANFE->D1_CONTA

Value

CTBANFE->D1_TOTAL-CTBANFE->D1_VALDESC+CTBANFE->D1_VALIPI+CTBANFE->D1_ICMRET

Image ModifiedTip:

If parameter MV_OPTNFE is set as T, the files SD1 - Inflow Document Item and SF1 - Inflow Document Header are not selected. Therefore, you must use the alias CTBANFE when creating standard entries, as shown in the example above.


Fields available in the alias CTBANFE

SF1

All fields, except those started by: F1_BASE and F1_BASI

SD1

All fields, except those started by: D1_BASE and D1_BASI

SA2

A2_FILIAL, A2_COD, A2_LOJA, A2_CONTA, A2_NOME, A2_NREDUZ

SA1

A1_FILIAL, A1_COD, A1_LOJA, A1_CONTA, A1_NOME, A1_NREDUZ

SB1

B1_FILIAL, B1_COD, B1_CONTA

SF4

F4_FILIAL, F4_CODIGO, F4_CF

SC7

All fields in SC7 (Only for Standard Entry 652)


To add other fields, use the entry point CTBNFE.


...

Example: 


User Function CTBNFE()

If PARAMIXB <> Nil

...

See Also

  • Accounting Entries

 

 

 

 

...