01. GENERAL DATA

Product:

TOTVS Backoffice

Product Line:

Protheus Line

Industry:

Services

Module:

TOTVS Backoffice (Protheus Line) - Fixed Asset (SIGAFIS)

Function:

ATFA250

Country:

Brazil

Ticket:

Internal

Requisite/Story/Issue

DSERCTR1-46030

02. DESCRIPTION

This entry point is called right before bookkeeping, after updating asset records in the system. This is an opportunity to add adjustments or validations to records, as extra calculations or verifications before entering data in accounting systems.

03. OTHER INFORMATION


Handling of EP in the system
If ExistBlock("AF250GRV")  // ENTRY POINT BEFORE BOOKKEEPING
	Execblock("AF250GRV",.F.,.F.,Acols[nX])
EndIf
EP Example
// Implementation of function of entry point AF250GRV
User Function AF250GRV()

    // Example: add an integrity verification to an asset's data
    Local aCols := PARAMIXB[1]  // Array of columns with asset data
    Local nPosICMS := Ascan(aHeader, {|x| Alltrim(x[2]) == "N1_ICMSAPR" })
    Local nICMS := 0
	Local i := 0

	For i := 1 To Len(aCols)	
	     // Check whether the ICMS value is greater than an allowed value
    	If aCols[i][nPosICMS] > 10000
        	// Generate an alert message
        	Help(" ", 1, "AF250_ALERT",, "The ICMS value exceeds the allowed limit.", 1, 0)
    	EndIf  
	Next i

Return


Important !!

  • It is noteworthy that the customer is responsible for EP utilization and its impacts on the system.
  • The examples used in this documentation are for demonstration purposes only. Each customer must check what behavior they want to perform according to the scope of the entry point.

04. RELATED SUBJECTS

  • Not Applicable.