Zum Inhalt springen

API reference

Quittio\Core\Validation\Rules

quittio/core#

Quittio\Core\Validation\Rules

  • CallbackRuleA rule defined by a closure. The closure receives the invoice and a reporter.
  • CodeListRulesCode list rules of EN 16931 (BR-CL-…), based on the official code lists.
  • En16931RulesEN 16931 business rules (BR-…) and conditions (BR-CO-…) checked on the data model.
  • FieldMatrixRuleMandatory and allowed fields of the selected profile (level L2), derived from the mapping attributes of the data model and the profile's additional requirements.
  • InspectHelpers shared by the rule sets.
  • PeppolRulesThe Peppol BIS Billing 3.0 rules (PEPPOL-EN16931-…, PEPPOL-COMMON-…) that the data of an invoice can violate, with readable messages. Rules that the UBL writer always satisfies and rules covered by an identical EN 16931 rule are not repeated (docs/validation.md lists them). The complete rule set is checked with the official artifacts (level L5).
  • PlausibilityRulesPlausibility checks (level L7): IBAN check digits, BIC and VAT identifier formats, e-mail addresses, date logic and the VAT category against the destination country. The VIES check is added only if a verifier is given.
  • QuittioRulesPackage rules (QUITTIO-…) that go beyond EN 16931.
  • RuleReporterCollects the findings of one rule.
  • StructureRulesStructure and data format checks of the data model (level L1).
  • VatCategoryRulesVAT category rules of EN 16931 (BR-S, BR-Z, BR-E, BR-AE, BR-IC, BR-G, BR-O, BR-AF, BR-AG, BR-B).

Die Open-Core-Pakete stehen unter der MIT-Lizenz. Die rechtlichen Formulierungen der Länderpakete sind mit einer Steuerberatung abzustimmen.