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 |
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.
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
//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 !!