Páginas filhas
  • TXT Booking – ( CTBA500 )

Versões comparadas

Chave

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

CONTENTS

Índice
excludeCONTENTS


01. OVERVIEW

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)


02. EXAMPLE

- (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 999 bytes.
          

 Note: Be mindful that carriage control characters (CHR(10+13)) count as 2 characters and must be placed in columns
          511 and 512.

- (2) 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) Example of Configuration.

TXT File
200 X 123456 123456 Invoice Entry n. 00001 1000,25 ddmmyy or ddmmyyyy
|        |         |        |            |                                                |
|        |         |        |            |                                                |->Value (position 50 size 6)
|        |         |        |            |
|        |         |        |            |->Description (position 24 size 24)
|        |         |        |
|        |         |        |->Credit Account (position 17 size 6)
|        |         |
|        |         | ->Debit Account (position 8 size 6)
|        |
|        |-> Informative for TXT
|
|->Standard Entry Number (position 1 size 3)

Information to be contained in respective fields of Standard Entry.
Code: 200
Debit Account: LerStr(8,6)
Credit Account: LerStr(17,6)
History: LerStr(24,24)
Value: LerVal(50,6)
Date: LerData(70,6) for ddmmyy, or lerdata(70,8) for ddmmyyyy.

Note:
1 - 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 - Upon using function LerData() 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.

03. SCREEN 

Other Actions / Related Features

04. SCREEN 

Main Fields and Parameters


05. TABLES

  • CT2 - Accounting Entry
  • CTK - Counterproof