Documentation / @facturometro/validator / AllowanceChargeSelection
Interface: AllowanceChargeSelection ​
Defined in: packages/validator/src/engine/view.ts:91
What an allowance or charge selector of the document view does with a cbc:ChargeIndicator that is not an xs:boolean (TRUE, yes, empty), which the lexical pre-pass reports.
exclude(the default) leaves that one allowance or charge out of the selection, as it is neither. A rule whose context is the allowance or charge itself (BR-31..44,BR-CO-21..24, ...) is thereby skipped for that node only, and still judges every other allowance and charge.throwcasts every indicator the selection reads and throws aLexicalErrorfor the first one that is not anxs:boolean. A rule that sums the selection (BR-CO-11/12,PEPPOL-EN16931-R120) must use it, since a silently smaller sum would fail against the document's totals; the engine then skips the test for that context node.
Example ​
ts
import type { AllowanceChargeSelection } from '@facturometro/validator';
const forSums: AllowanceChargeSelection = { unreadable: 'throw' };Properties ​
unreadable? ​
readonlyoptionalunreadable?:"exclude"|"throw"
Defined in: packages/validator/src/engine/view.ts:93
exclude (default) or throw; see AllowanceChargeSelection.