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 |
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.
If ExistBlock("AF250GRV") // ENTRY POINT BEFORE BOOKKEEPING Execblock("AF250GRV",.F.,.F.,Acols[nX]) EndIf
// 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 !!