LPARAMETERS cCad, nTotal

LOCAL aa, bb, nFP, cRetFP, cRetVal, cValor, cFP, cRet 

DIMENSION aa[1]
nFP = oApp.explode(cCad,@aa,";")

DIMENSION bb[1]

cRetFP = ''
cRetVal = ''


IF nFP>1
	FOR iCount = 1 TO nFP
		nPar = oApp.explode(aa[iCount],@bb,":")
		cFP = PADL(INT(VAL(bb[1])),2,'0')
		nValor = 0
		IF nPar>1
			nValor = VAL(bb[2])
		ENDIF
		cValor = TRANSFORM(nValor)
		cRetFP = cRetFP + cFP + " "
		cRetVal = cRetVal + cValor + " "
	ENDFOR
ELSE
	cFP = '01'
	cValor = TRANSFORM(nTotal)
	
	IF nFP=1
		nPar = oApp.explode(aa[1],@bb,":")
		cFP = PADL(INT(VAL(bb[1])),2,'0')
	ENDIF
	
	cRetFP = cRetFP + cFP + " "
	cRetVal = cRetVal + cValor + " "

ENDIF

cRet = ALLTRIM(cRetFP)+'|'+ALLTRIM(cRetVal)

? cRet
?

RETURN cRet