cCalcText base for calculation.
AdvPL GuideDigito11( cCalc, cDigito ) --> lRetCompares a supplied check digit against a modulo-11 calculation.
Although its title mentions calculation, the page documents Digito11(cCalc,cDigito) returning a comparison boolean rather than a generated numeric digit. The 2012 source covers older versions without detailing weights or algorithm exceptions; do not generalize it to every tax or banking document. The fragment requires base and digit defined by the specific contract without inventing an approved test pair. (TOTVS, n.d., ref. 1)
Digito11( cCalc, cDigito ) --> lRetcCalcText base for calculation.
cDigitoText digit to compare.
Logical comparison result.
#Include "Protheus.ch"
User Function Ed351()
Local bValidate := {|cBase,cCheck| Digito11(cBase,cCheck)}
// Callback prepared: supply a validated test pair before evaluation.
Return NilBlock prepared without validating a real number. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.
© 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.