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 |
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.
If ExistBlock("AF126TOK")
lRet := ExecBlock("AF126TOK", .F., .F.,{nOpc,cTipoSol,cCodigo})
EndIf
#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