01. GENERAL DATA

Product:

TOTVS Backoffice

Product Line:

Protheus Line

Industry:

Services

Module:

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

Function:

ATFA175

Country:

Brazil

Ticket:

Internal

Requisite/Story/Issue

DSERCTR1-46030

02. DESCRIPTION

Function AF175GRV is called during the creation of an accelerated depreciation record (type "07") for an asset in table SN3. It allows additional data to be added or adjusted before the new line is saved. The function receives current column and header data pertaining to the record to be created and must return an array with the new values to be applied to the line.

03. OTHER INFORMATION


Handling of EP in the system
If ExistBlock("AF175GRV")
	uRet := ExecBlock("AF175GRV",.F.,.F.,{aHeader,aCols[n]})
	If ValType(uRet) == "A"
		aAdd(aAux,{aHeader[n][2], uRet }) 
	EndIf
EndIf
aAdd(aItens, aAux)
EP Example
User Function AF175GRV()

  	Local aHeadGRV := PARAMIXB[1] 
    Local aRetorno := PARAMIXB[2]
	Local nPosHist := aScan(aHeader, {|aItem| AllTrim(aItem[2]) == AllTrim("N3_HISTOR") })
 	
	If Empty(aRetorno[nPosHist])
		// customer validation
	EndIf
	
    // Return the array with the adjustments made
Return aRetorno

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.