Usina BRAdvPL Guide
Sign in
← All topics
ENTRY POINTUnder review

FA080PCC

User Function FA080PCC()

Inspects withholdings and title amount after tax calculation.

FA080PCCFINA080
01 · OVERVIEW

Overview

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)

02 · SYNTAX

Syntax

User Function FA080PCC()

Parameters

PARAMIXB
ArrayExecution context

Direct context: PIS, COFINS, CSLL, IRRF and title amount in the official example. (Refs. 1–2)

Return value

The official example ends without an explicit value; no return for changing withholdings is documented.

03 · PRACTICAL EXAMPLE

Editorial example based on documentation

#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 Nil
Expected result

Teaching 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.

04 · PRACTICAL EXAMPLE

Observed call and context

// 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})
Expected result

The record shows arguments and immediate return use where present. It omits the full caller body and does not establish commit timing.

BEST PRACTICES
  • Use direct context, not PARAMIXB[1] as the whole array. The demonstration requires position 5 actually to represent the title amount. Do not turn a diagnostic into a withholding rule.
  • A call without a fourth argument does not document a PARAMIXB layout. Preserve caller identifiers and do not invent fields or positions.
  • Test plan: compare standard and customized flows, exercise success, rejection and repetition, and inspect balances, movements and accounting as applicable.
  • Under review: example not compiled or run in Protheus. Verify aliases, locks, transaction position and compatibility in the target release and patch.

Related content

REFERENCES
  1. TOTVS. FA080PCC - Verifica valores do PIS, COFINS, CSLL, IRRF.. TDN. Accessed on 2026-10-24.
  2. EURAI. Pontos de Entrada P12.2210 - Parte 2. Universo do Desenvolvedor, 2023. Accessed on 2026-10-24.
Status
Under review
Page created on
Last reviewed on
Original language
Portuguese
Reviewed by
Usina.BR
0 approved comment(s)

Comments

There are no approved comments yet.

Sign in with Google or Microsoft to comment.

Powered by Usina Docs · Alpha