01. GENERAL DATA

Product:

TOTVS Backoffice

Product Line:

Protheus Line

Industry:

Services

Module:

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

Function:

ATFA125

Country:

Brazil

Ticket:

Internal

Requisite/Story/Issue

DSERCTR1-46748

02. DESCRIPTION

You can use Entry Point AF125OKB to validate the addition or deletion of a request to post a fixed asset. It allows the customer to set specific validation rules to ensure that operations to add and delete posting requests are compliant with the policies and criteria set by the company.

With AF125OKB, you can ensure that all posting records are accurately handles in accordance with business requirements, avoiding the undue deletion or the incorrect addition of requests, contributing with the integrity of fixed asset control data.

03. OTHER INFORMATION


Handling of EP in the system
If ExistBlock( "AF125OKB" ) .And. nOpc > 2 .And. lRet
	lRet := ExecBlock( "AF125OKB", .F., .F., { nOpc, cCBASE, cItem, nQtdBx, cMotbx,;
	cCondPg, nVlVenda, cGeraNF, cCliente,;
	cLoja, cSerie, cTESNFS } )
EndIf
EP Example
//Entry point example

User Function AF125OKB()

	//Example of a validation using some of the variables available for Entry Point use
	Local nOpc := paramixb[1]
	Local cCbase := paramixb[2]
	Local nQtdBx := paramixb[4]
	Local nVlVenda := paramixb[7]
	Local lRet := .T.

	If nOpc == 3 //If a posting request is at issue 3 - Addition / 5 - Deletion

		If nQtdBx > 5 //If the quantity posted is greater than five...
			lRet := .F.//...the system must not continue the addition of the request
		EndIf

		If lRet .And. (nVlVenda>1000)//If the sale value is greater than BRL 1,000.00

			If Notice("Attention!","Confirm request to sell asset " + Alltrim(cCbase)+ "?", {"YES", "NO"})== 2
				Alert("Sale request not activated!")
				lRet := .F.
			Else
				Alert("Asset sale request " + Alltrim(cCbase) + " successfully activated!")
			EndIf

		EndIf

	EndIf

Return lRet

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.