01. GENERAL DATA

Product:

TOTVS Backoffice

Product Line:

Protheus Line

Industry:

Services

Module:

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

Function:

ATFA200

Country:

Brazil

Ticket:

Internal

Requisite/Story/Issue

DSERCTR1-46829

02. DESCRIPTION

Entry Point AT200AN1 is enabled after recording the blocking or unblocking of an asset in routine ATFA200. You can use it to directly handle the asset record being edited, such as to block or unblock the asset, allowing custom adjustments before finishing the process. This entry point is useful for performing specific customizations involving the handling of blockings or unblockings, ensuring greater flexibility in the logic applied to assets.

03. OTHER INFORMATION


Handling of EP in the system
If ExistBlock("AT200AN1")
   ExecBlock("AT200AN1",.F.,.F.)
EndIf
EP Example
User Function AT200AN1()

	Local aSaveArea     := GetArea()
	Local cFilial       := xFilial("SN1")
	Local nBem          := 123456  // Number of a specific asset for the example
	Local dDataBloqueio := Date()

	dbSelectArea("SN1")
	dbSetOrder(1)
	dbSeek(cFilial + StrZero(nBem, 6), .T.)

	// Check whether the asset was found
	If !SN1->(Eof())
		If SN1->N1_DTBLOQ == CTOD("  /  /    ")
			// Block the asset
			Reclock("SN1", .F.)
			SN1->N1_DTBLOQ := dDataBloqueio
			MsUnlock()
		Else
			// Unblock the asset
			Reclock("SN1", .F.)
			SN1->N1_DTBLOQ := CTOD("  /  /    ")
			MsUnlock()
		EndIf
	EndIf

	RestArea(aSaveArea)
	
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.