01. GENERAL DATA

Product:

TOTVS Backoffice

Product Line:

Protheus Line

Industry:

Services

Module:

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

Function:

ATFA126

Country:

Brazil

Ticket:

Internal

Requisite/Story/Issue

DSERCTR1-46829

02. DESCRIPTION

The entry point AF126TOK validates the data before the approval of the asset Transfer or Posting in the ATFA126 routine.

The user can use this routine to implement customized rules for checking data consistency and compliance before completing the approval of the process.

03. OTHER INFORMATION

Handling of EP in the system
If ExistBlock("AF126TOK")
      lRet := ExecBlock("AF126TOK", .F., .F.,{nOpc,cTipoSol,cCodigo})
EndIf
EP Example
#INCLUDE "Protheus.ch"

User Function AF126TOK()

      Local nOpc := ParamIxb[1] // 3=Approval, 4=Rejection
      Local cTipoSol := ParamIxb[2] // 1=Posting, 2=Transfer
      Local cCodigo := ParamIxb[3] // Code of Transfer
      Local cBase := ''
      Local cItem := ''

      Local lRet := .T.

      Local aArea := GetArea()

      dbSelectArea("SNM")
      SNM->( dbSetOrder(1) )
      SNM->( dbSeek( xFilial("SNM") + cCodigo ) )

      cBase := SNM->NM_CBASE
      cItem := SNM->NM_ITEM

      IF cTipoSol == "1" //Baixa
            If MsgYesNo( "Do you want to approve the posting of the asset " + cBase + " / " + cItem + " ?", "Attention" )
                  lRet := .T.
            Else
                  lRet := .F.
            EndIf
      ElseIf cTipoSol == "2" //Transfer
            If MsgYesNo( "Do you want to approve the transfer of the asset " + cBase + " / " + cItem + " ?", "Attention" )
                  lRet := .T.
            Else
                  lRet := .F.
            EndIf
      EndIf

      RestArea(aArea)

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.