User Function MNTA080F() Local aArea := GetArea(), nIncrem := 0, nTarefa := '' Local cBem,cMod,cFami Local nINCRE, nTAREF, nDESCR cBem := M->T9_CODBEM cMod := M->T9_TIPMOD cFami := M->T9_CODFAMI oGet:aCols := {} dbSelectarea("PA0") dbSetOrder(1) If Dbseek(xFILIAL('PA0')+cFami+cMod) While !EOF() .and. PA0->PA0_CODFAM = cFami .and. PA0->PA0_TIPMOD = cMod If nTarefa <> PA0->PA0_TAREFA nIncrem := PA0->PA0_INCREM nTarefa := PA0->PA0_TAREFA nINCRE := aSCAN(oGet:aHeader,{|x| TRIM(UPPER(x[2])) == "PA1_INCREM"}) nTAREF := aSCAN(oGet:aHeader,{|x| TRIM(UPPER(x[2])) == "PA1_TAREFA"}) nDESCR := aSCAN(oGet:aHeader,{|x| TRIM(UPPER(x[2])) == "PA1_DESCRI"}) oGet:addLine(.T.) oGet:aCols[len(oGet:aCols),nINCRE] := nIncrem oGet:aCols[len(oGet:aCols),nTAREF] := nTarefa oGet:aCols[len(oGet:aCols),nDESCR] := NGSEEK("TT9",nTarefa,1,"TT9_DESCRI") EndIf dbSkip() EndDo oGet:oBrowse:Refresh(.T.) oGet:ForceRefresh() EndIf RestArea(aArea) Return