Páginas filhas
  • MaFisIniLoad Function

CONTENTS

01. OVERVIEW

Product Line:

Microsiga Protheus®

Industry:

Services

Module:

SIGAFIS - Tax Records

Function:

MaFisInilLoad

Scope:

Microsiga Protheus 12

Versions:

Microsiga Protheus 12

Operating Systems:

All

Compatible with the following databases:

All

Access Level:

Level 1 (Customer Access)

Languages:

All

02. DESCRIPTION

The MaFisInLoad function adds a new item to the MATXFIS internal array of items (aNFItem). This item can be added with all blank elements or, if the basic data is entered when transmitting parameter aItemLoad, this data will be loaded into the new item, such as Product Code, TIO, or Quantity.

The function can also be used to trim the item values of the header totalizers (aNFCab) as required by the application to be developed. If the item entered in the nItem parameter already exists, and the lEstorno parameter is set to .T., the values for this item will be reversed from the totalizing elements of the tax document header (aNFCab).

03. HOW TO USE

The MaFisIniLoad() function is the best way to add an item when using MATXFIS and should always be prioritized in relation to the use of the MaFisAdd() function, since it is faster because it does not recalculate the item for each loaded item. It must be used within the loops of the application items, so that each item read in the loop calls the function, transmitting the current item as a parameter of the nItem parameter. If application uses MsGetDados() and aCols for handling the items, the items generated by MaFisIniLoad() must always be in the same order in which the aCols items were formed, because the aCols and the aNFItem must be synchronized in any situation.

04. PARAMETERS

Order

Parameter

Type

Description

01

nItem

Numeric

Array item ANFItem that must be initialized

02


aItemLoad

Array

Optimization array (data that can be loaded when creating the item)

[01] 

Character

Product Code

[02] 

Character

TIO Code

[03]

Numeric  

ISS value of the item

[04]  

Numeric

Item quantity

[05]  

Character

Number of original invoice

[06]  

Character

Series of original invoice

[07] 

Numeric

RecNo of SB1

[08]  

Numeric

RecNo of SF4

[09] 

Numeric

Original Invoice RecNo (SD1/SD2)

[10]  

Character

Product batch

[11]  

Character

Product Sub-Batch

03   

lEstorno

Logical

If the item already exists, whether the value of the aNFCab totalizers should be reversed or not