Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UBL rule: BR-AE-01 not firing as expected #3

Closed
SiwMeckelborg opened this issue Dec 2, 2016 · 2 comments
Closed

UBL rule: BR-AE-01 not firing as expected #3

SiwMeckelborg opened this issue Dec 2, 2016 · 2 comments
Milestone

Comments

@SiwMeckelborg
Copy link
Contributor

The rule states
An Invoice that contains a line, a document level allowance or a document level charge where the Invoiced item VAT category code (BT-151, BT-95 or BT-102) is “Reverse charge” shall contain in the VAT breakdown (BG-23) exactly one VAT category code (BT-118) equal with "Reverse charge".

It does not seem that the validation checks for only one instance in TaxTotal/TaxSubtotal/TaxCategory.

@SiwMeckelborg SiwMeckelborg changed the title BR-AE-01 not firing as expected UBL rule: BR-AE-01 not firing as expected Dec 2, 2016
@oriol
Copy link
Collaborator

oriol commented Dec 2, 2016

((exists(//cac:TaxCategory/cbc:ID[. = 'AE']) or exists(//cac:ClassifiedTaxCategory/cbc:ID[. = 'AE'])) and (count(//cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory) = 1) and (count(//cac:TaxCategory/cbc:ID[. != 'AE']) = 0 and count(//cac:ClassifiedTaxCategory/cbc:ID[. != 'AE'])=0)) or (count(//cac:TaxCategory/cbc:ID[. = 'AE']) = 0 and count(//cac:ClassifiedTaxCategory/cbc:ID[. = 'AE'])=0)

oriol added a commit that referenced this issue Dec 2, 2016
@oriol oriol closed this as completed Dec 2, 2016
@SiwMeckelborg
Copy link
Contributor Author

Test nr 3 in unit test of BR-AE-01 does not fire as expected, please review xPath in this validation rule.

@SiwMeckelborg SiwMeckelborg reopened this Dec 5, 2016
oriol added a commit that referenced this issue Dec 5, 2016
@oriol oriol closed this as completed Dec 5, 2016
@phax phax added this to the v1.0 milestone Apr 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants