Product: | TOTVS Backoffice |
Product Line: | Protheus Line |
Industry: | Services |
Module: | TOTVS Backoffice (Protheus Line) - Fixed Assets (SIGAATF) |
Function: | ATFA251 |
Country: | Brazil |
Ticket: | Internal |
Requisite/Story/Issue | DSERCTR1-46748 |
You can use entry point AF251AHD to add user fields to the aHeader of routine ATFA251 - Acquisition by Transfer.
aOldHead := aClone(aHeader)
aAF251AHD := ExecBlock('AF251AHD', .F., .F., aClone(aHeader) )
aHeader := aClone( aOldHead )
If ValType( aAF251AHD ) == 'A'
For nX := 1 To Len( aAF251AHD )
If Len( aAF251AHD[nX] ) == 9 .and. ValType( aAF251AHD[nX][1] ) == 'C' .and. ValType( aAF251AHD[nX][2] ) == 'C' .and.;
ValType( aAF251AHD[nX][3] ) == 'C' .and. ValType( aAF251AHD[nX][4] ) == 'N' .and. ValType( aAF251AHD[nX][5] ) == 'N' .and.;
ValType( aAF251AHD[nX][6] ) == 'C' .and. ValType( aAF251AHD[nX][7] ) == 'C' .and. ValType( aAF251AHD[nX][8] ) == 'C' .and.;
ValType( aAF251AHD[nX][9] ) == 'C' .and. aScan( aHeader, {|aHd| aHd[2] == aAF251AHD[nX][2]} ) == 0
Aadd( aHeader, aClone(aAF251AHD[nX]) )
EndIf
Next nX
EndIf
#Include 'Protheus.ch'
User Function AF251AHD()
local aHeaderPE := ParamIXB
SX3->(DbSetOrder(2))
If SX3->(dbSeek("N1_TSTMES"))
AADD(aHeaderPE,{X3Titulo(),SX3->X3_CAMPO,AllTrim(SX3->X3_PICTURE),SX3->X3_TAMANHO,SX3->X3_DECIMAL,"","",SX3->X3_TIPO,SX3->X3_ARQUIVO } )
EndIf
Return(aHeaderPE)
Important