Skip to content

Documentation / @facturometro/einvoice / 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.
  • throw casts every indicator the selection reads and throws a LexicalError for the first one that is not an xs: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? ​

readonly optional unreadable?: "exclude" | "throw"

Defined in: packages/validator/src/engine/view.ts:93

exclude (default) or throw; see AllowanceChargeSelection.

MIT licensed. Specification artefacts belong to OpenPEPPOL, CEN and OASIS.