Product: | TOTVS Backoffice |
Product Line: | Protheus Line |
Industry: | Services |
Module: | TOTVS Backoffice (Protheus Line) - Fixed Assets (SIGAFIS) |
Function: | ATFA250 |
Country: | Brazil |
Ticket: | Internal |
Requisite/Story/Issue | DSERCTR1-46030 |
Entry Point AF250TOK is enabled upon finishing the processing of a data screen within the routine ATFA250, responsible for analyzing the values and consistency of information entered by the user. You can use it to perform additional validations in accordance with the company's criterion, whether you save the data or not.
If ExistBlock('AF250TOK')
If !ExecBlock( 'AF250TOK', .f., .f., {@aAF250Imp,@aAF250Desc,@aAF250DOri} )
Return .F.
EndIf
EndIf |
User Function AF250TOK()
// Variáveis recebidas via PARAMIXB
Local aAF250Imp := PARAMIXB[1] // Array com as informações de impostos
Local aAF250Desc := PARAMIXB[2] // Array com as descrições
Local aAF250DOri := PARAMIXB[3] // Array com as descrições originais
Local i := 0
Local j := 0
Local lRet := .T.
// Exemplo de uso
For i := 1 to Len(aAF250Imp)
// Aqui você pode implementar a lógica que valida as informações do array aAF250Imp
If Empty(aAF250Imp[i][1])
lRet := .F. // Caso algum campo esteja vazio, retorna falso
EndIf
Next
// Lógica para manipulação de aAF250Desc e aAF250DOri, se necessário
For j := 1 to Len(aAF250DOri)
// Exemplo de uma possível validação
If aAF250DOri[j][7] == 0
lRet := .F. // Retorna falso se encontrar uma descrição não atribuída
EndIf
Next
Return lRet |
|