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 |
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.
If ExistBlock("AT200AN1") ExecBlock("AT200AN1",.F.,.F.) EndIf
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 !!