PARAMIXBDirect context: PIS, COFINS, CSLL, IRRF and title amount in the official example. (Refs. 1–2)
AdvPL GuideUser Function FA080PCC()Inspects withholdings and title amount after tax calculation.
The official example reads PARAMIXB directly: positions 1–4 are PIS, COFINS, CSLL and IRRF; position 5 is the title amount. It sums withholdings and demonstrates net amount while preserving the workarea. P12.2210 names its fifth identifier nSalImp: verify that difference in the release caller. The example changes no amounts and does not document an array return as a write mechanism. (Refs. 1–2)
User Function FA080PCC()PARAMIXBDirect context: PIS, COFINS, CSLL, IRRF and title amount in the official example. (Refs. 1–2)
The official example ends without an explicit value; no return for changing withholdings is documented.
#Include "Protheus.ch"
User Function FA080PCC()
// Adapted official calculation; diagnostic in a test environment only.
Local aData := PARAMIXB
Local aArea := GetArea()
Local nWithheld := aData[1]+aData[2]+aData[3]+aData[4]
Local nNet := aData[5]-nWithheld
ConOut("FA080PCC: demonstration net amount " + cValToChar(nNet))
RestArea(aArea)
Return NilTeaching proposal with behavior described in comments. Verify the context before compiling in a test environment. Under review: example not compiled or run in Protheus. Verify aliases, locks, transaction position and compatibility in the target release and patch.
// P12.2210 caller excerpt (EURAI, ref. 2); not an entry point implementation.
// FINA080.PRX - FA080BUT() -> EXECBLOCK("FA080PCC",.F.,.F.,{NPIS, NCOFINS, NCSLL, NIRRF, NSALIMP})
// FINA080.PRX - FA080TIT*/() -> EXECBLOCK("FA080PCC",.F.,.F.,{NPIS, NCOFINS, NCSLL, NIRRF, NSALIMP})
// FINA080.PRX - FA080TITW() -> EXECBLOCK("FA080PCC",.F.,.F.,{NPIS, NCOFINS, NCSLL, NIRRF, NSALIMP})
// FINA080.PRX - FA080VAL() -> EXECBLOCK("FA080PCC",.F.,.F.,{NPIS, NCOFINS, NCSLL, NIRRF, NSALIMP})
// FINA080.PRX - FA080VALVR() -> EXECBLOCK("FA080PCC",.F.,.F.,{NPIS, NCOFINS, NCSLL, NIRRF, NSALIMP})The record shows arguments and immediate return use where present. It omits the full caller body and does not establish commit timing.
© 2026 Usina.BR. All rights reserved. TOTVS, Protheus, Microsiga and their respective logos are trademarks of their owners. AdvPL Guide is independent and uses limited, attributed excerpts justified by educational purposes. See the Terms of Use. Terms of Use
Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.