Product: |
TOTVS Backoffice
|
Product Line: | Protheus Line |
Segment: | Services |
Module: | TOTVS Backoffice (Protheus Line) - Managerial Accounting (SIGAFIS)
|
Function: | CTBA220 |
Country: | Brazil |
Ticket: | Internal |
Requisite/Story/Issue | DSERCTR1-46829 |
The CT220SEL entry point allows sending the content of the (Array) containing the data on which companies and files are intended to be grouped.
ExecBlock("CT220SEL",.f.,.f.,{aEmp,aQuais}))
User Function CT220Sel( )
Local aEmp := PARAMIXB[1]
Loal aQuais := PARAMIXB[1]
Local cMVSchedu := Getnewpar( 'MV_XSCHEDU' , '' )
Local axEmp2 :={}
Local nJ := 0
Local nI := 0
Local lRet := .T.
If lRet // only when the variable is not empty
If ! Empty (cMVSchedu) .and. ( ValType( aEmp ) == 'A' .And. len( aEmp ) > 0 )
while ! Empty( cMVSchedu )
cResult := Substr( cMVSchedu , 1 , 4 )
aAdd(axEmp2 , cResult )
cMVSchedu := Substr( cResult , 2)
End // zero the companies array to only report the ones from the parameter.
FOR nI := 1 to len(aEmp)
aEmp[nI][1] := .F.
NEXT // I set the company's items to true
FOR nI := 1 to len(axEmp2)
FOR nJ = 1 to len(aEmp)
If ( aEmp[nJ][1] == axEmp2[nI][1] )
aEmp[nJ][2] := .T.
Endif
Next
Next
Endif
Endif
Return .T.
Importante!