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 |
This entry point allows adding or editing tax-related data, to be displayed on the totals grid of the values apportionment routine. You can use it to add new taxes or to edit already existing tax values, as well as make adjustments before assembling the totals onscreen.
aAF250GrImp := ExecBlock( 'AF250GrImp', .F., .F., aClone(aAF250Imp) ) If ValType( aAF250GrImp ) == "A" For nA := 1 To Len( aAF250GrImp ) // Check whether all data types are correct and whether // the same line returned in array aAF250Imp does not exist If Len( aAF250GrImp[nA] ) == 6 .and.; ValType(aAF250GrImp[nA,1]) == 'C' .and.; ValType(aAF250GrImp[nA,2]) == 'C' .and.; ValType(aAF250GrImp[nA,3]) == 'N' .and.; ValType(aAF250GrImp[nA,4]) == 'L' .and.; ValType(aAF250GrImp[nA,5]) == 'N' .and.; ValType(aAF250GrImp[nA,6]) == 'N' .and.; !('ICMS' $ Upper(aAF250GrImp[nA,1]) ) nPosImp := aScan( aAF250Imp, {|Imp| Imp[1] == aAF250GrImp[nA,1] .and. Imp[2] == aAF250GrImp[nA,2] .and.; Imp[3] == aAF250GrImp[nA,3] .and. Imp[4] == aAF250GrImp[nA,4] } ) If nPosImp == 0 Aadd( aAF250Imp, aClone( aAF250GrImp[nA] ) ) Else aAF250Imp[nPosImp][5] := aAF250GrImp[nA][5] aAF250Imp[nPosImp][6] := aAF250GrImp[nA][6] EndIF EndIf Next nA EndIf
User Function AF250GrImp() Local aAF250Imp := PARAMIXB[1] // Add a new "PIS" tax with fictitious values for simulation purposes Aadd(aAF250Imp, {"PIS", "CALC_PIS", 8, .T., 1000.00, 200.00}) Return aAF250Imp
Important !!