ubl-invoice icon indicating copy to clipboard operation
ubl-invoice copied to clipboard

TaxCategory percent should not be required

Open chipco opened this issue 8 months ago • 1 comments

The validation of TaxCategory checks for percent to be set. However, percent is not required.

See: https://docs.peppol.eu/poacc/billing/3.0/syntax/ubl-invoice/cac-TaxTotal/cac-TaxSubtotal/cac-TaxCategory/

This is an issue when trying to generate invoices without VAT, with TaxCategory ID = O.

Error:

location=/Invoice/cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory;
error=[BR-O-05]-An Invoice line (BG-25) where the VAT category code (BT-151) is  Not subject to VAT  shall not contain an Invoiced item VAT rate (BT-152).;
validation=not(cbc:Percent)

Edit: The same applies to ClassifiedTaxCategory

chipco avatar Apr 17 '25 18:04 chipco

Hey @chipco, this will be fixed in version 2.0. (Branch: master-2.0), which will be a major new release which also will include Read support for XML files.

You can test-drive this branch by using the @alpha version flag in your composer.json file.

I would definitely also accept a PR that fixes this for the v1.0 branch.

brtdv avatar May 05 '25 08:05 brtdv

Merged in #81

brtdv avatar Jun 25 '25 18:06 brtdv