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

BR-CO-27 can not fail #403

Open
PaulKalbitzer opened this issue Nov 14, 2024 · 3 comments
Open

BR-CO-27 can not fail #403

PaulKalbitzer opened this issue Nov 14, 2024 · 3 comments

Comments

@PaulKalbitzer
Copy link

As I understand it, the test for BR-CO-27 in its current form is a tautology.

<assert id=“BR-CO-27” flag=“fatal” test="(ram:PayeePartyCreditorFinancialAccount/ram:IBANID) or (ram:PayeePartyCreditorFinancialAccount/ram:ProprietaryID) or (not(ram: PayeePartyCreditorFinancialAccount/ram:IBANID) and not(ram:PayeePartyCreditorFinancialAccount/ram:ProprietaryID))">[BR-CO-27]- Either the IBAN or a Proprietary ID (BT-84) shall be used. </assert>

It is fulfilled if IBANID and ProprietaryID, only one of the two, or none at all are present

@phax
Copy link
Collaborator

phax commented Nov 14, 2024

Yep. It seems to be "a or b or (not (a) and not (b))".
It should be "(a or b) and not (a and b)" imho

@k-o-n-s-t
Copy link

I can confirm the error. The rule BR-CO-27 goes back to the Issue #132, proposing "a rule to check that tags IBANID and ProprietaryID are mutually exclusive should exist in CII schematron". Commit 9667fc4 closed that issue, unfortunately, with a wrong assert definition. In addition, BR-CO-27 rule never appeared in the EN16931 specification (DIN EN 16931-1 pdf).

@AndreasPvd
Copy link
Contributor

This rule was intentionally created that way back at the first version. The reason was that it was the time of transition towards SEPA. In Germany, at that time, it was common to state the proprietaryID AND the IBAN at the same time for interoperability issues. That's why the implementation intentionally allowed to state both ath the same time and not to have them mutually exclusive. From a 2024 perspective I would suggest as well to change it to mutually exclusive - but I am not sure if it needs discussion in CEN in order to still support that kind option. Please do not forget that not all countries in the world are part of SEPA and in a B2B scenario proprietary IDs are still needed.

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

4 participants