...
| Índice | ||
|---|---|---|
|
...
This routine updates the accounting Entries (CT2) by importing data from a TXT file, using a "PRESET" file required by Microsiga Protheus for importing. Some attention must be given when assembling the txt file.
Instructions for TXT file assembly.
The TXT booking process goes through the following 3 steps: (1) TXT Configuration, (2) Standard Entry Configuration, and (3) Execution of TXT Booking (Accounting)
- (1) TXT Configuration
You must configure a text file, observing only two
system requirements:
- The first three characters of the line must refer to the code of
the standard entry registered for this purpose.
- The user sets the quantity of bytes, that is, of columns used by the record (line), because the system asks for this information in the questions when TXT booking runs. For example: we can use 512 bytes (columns), up to a maximum of
- (1) Configuração de TXTs
Deve ser configurado um arquivo texto atentando apenas para duas
imposições do sistema :
- Os três primeiros caracteres da linha devem referir-se ao cod. do
lançamento padrão cadastrado para esta finalidade.
- A quantidade de bytes ou seja colunas utilizadas por registro (linha), é definido pelo usuário, pois esta informação é pedida pelo sistema nas perguntas no momento de rodar a contabilização TXT, vamos utilizar por exemplo 512 bytes(colunas), até o máximo de 999 bytes.
Observação: Lembre-se que os caracteres de controle de carro Note: Be mindful that carriage control characters (CHR(10+13)) contam como 2 caracteres e devem estar posicionados nas colunascount as 2 characters and must be placed in columns
511 e and 512.
- (2) Configuração de Lancto. Padronizado
Deve ser configurado, de acordo com lay-out do arquivo TXT, um
lacto padronizado cujo código deve estar na faixa entre 001 e
499, o mesmo deve conter em seu campos as funções para leitura de
arquivos texto (LerVal() e Standard Entry Configuration
You must configure it in accordance with the TXT file layout,
a standard entry the code of which must be in the 001 and 499 range,
It must contain in its fields the functions to read
text files (LerVal() and LerStr()).
-(3) Exemplo de ConfiguraçãoExample of Configuration.
Arquivo .TXT
200 X 123456 123456 Lançamento de NF. n. 00001 1000,25 ddmmaa ou ddmmaaaa
TXT File
200 X 123456 123456 Invoice Entry n. 00001 1000,25 ddmmyy or ddmmyyyy
| | | | | |
| | | | | |->Valor >Value (posição position 50 tam size 6)
| | | | |
| | | | |->Descricao >Description (posição position 24 tam size 24)
| | | |
| | | |->Conta Credito >Credit Account (posição position 17 tam size 6)
| | |
| | | ->Conta Debito >Debit Account (posição position 8 tam size 6)
| |
| |-> Informativo para o Informative for TXT
|
|->Número do lancto padronizado (posição 1 tam 3)
Informações que devem estar contidas nos campos respectivos do Lançamento Padrão.
Código: 200
Conta Debito >Standard Entry Number (position 1 size 3)
Information to be contained in respective fields of Standard Entry.
Code: 200
Debit Account: LerStr(8,6)
Conta CreditoCredit Account: LerStr(17,6)
Histórico History: LerStr(24,24)
Valor Value: LerVal(50,6)
Data Date: LerData(70,6) para ddmmaafor ddmmyy, ou or lerdata(70,8) para ddmmaaaafor ddmmyyyy.
ObservaçãoNote:
1 - Ao realizar uma contabilização TXT, na qual o lançamento contábil há mais de uma sequencia, o arquivo TXT deve ser construído com todas as sequencias dos lançamentos na mesma linha, e em cada sequencia de lançamento indique a coluna a ser lida pelas funções LERSTR, LERVAL e When executing a TXT booking, in which the accounting entry has more than one sequence, you must construct the TXT file with all entry sequences in the same line, and in each entry sequence enter the column to be read by functions LERSTR, LERVAL, and LERDATA.
2 - Ao utilizar a função Upon using function LerData() para alterar a data base do sistema, que é utilizado como a data do lançamento contábil, o parâmetro 5 - Quebra Linha em Doc. deve estar configurado com Sim, pois cada linha pode ser uma data diferente e, neste caso, após a execução da função o sistema exibe a tela de contabilização. Caso o parâmetro esteja configurado com Não, o sistema considerara a data da última linha processada.
3 - Para que todas as linhas tenham acesso é necessário informar um byte a mais do que existe no arquivo nos parâmetros de importação TXT. Ex: Caso a linha do arquivo TXT tenha 240 caracteres deve-se configurar os parametros de importação com 241 bytes.
A partir da versão 12.1.27 se nas posições do arquivo texto referente a data de contabilização estiver vazio a função LerData assumira como data base do sistema a setada imediatamente anterior.
Outras Ações / Ações relacionadas
Principais Campos e Parâmetros
to change the base date of the system, which is used as the accounting entry date, parameter 5 - Line Break in Doc. must be set to Yes, because each line can be a different date and, in this case, after running the function the system displays the booking screen. If the parameter is set to No, the system uses the date of the last line processed.
3 - For all lines to have access, you must enter one byte in addition to what is found in the file, in TXT import parameters. Example: If the TXT file has 240 characters, set import parameters to 241 bytes.
From version 12.1.27 onwards, if the text file places that refer to the booking date are empty, the LerData function assumes as the base date of the system the one set immediately before.
Other Actions / Related Features
Main Fields and Parameters