-
Notifications
You must be signed in to change notification settings - Fork 56
CII Schematron - BT-8 - [CII-SR-462] - Only one DueDateTypeCode shall be present - Not well implemented - URGENT #387
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
Comments
correction : BT-8 is only 5 in F2023000152 and only 72 in F20230023 |
DueDateTypeCode is an optional value, the solution is to inform only once this element. |
YES, it is a solution, but not the only one.
There is no reason that an evolution of the schematron suddenly force to change implementation which is compliant to the EN16931. In addition without any information or time to comply (and we MUST have backward compatibility, except when correcting a bug, which is not the case here).
Schematron can be corrected in order to accept multiple BT-8 in CII with the same value (like Ite, quantity base has to be provided twice the same for Gross Price and Net price (BT-150).
KR
Cyrille
Cordialement
Cyrille SAUTEREAU
…------------------------------------------------
Président
ADMAREL Conseil
Président FNFE-MPE
(Forum National de la Facture Électronique et des Marchés Publics Électronique)
Mob : +33 6 07 53 32 85
E-mail : ***@***.******@***.***>
P avant d'imprimer, pensez à l'environnement, dématérialisez !
Cet e-mail est confidentiel. Si vous avez reçu ce message par erreur ou si vous n'êtes pas le destinataire de ce message, merci de bien vouloir nous en informer par retour de mail et détruire ce message. Vous ne devez imprimer aucun message, ni copier ni transférer le contenu d'un message qui ne vous est pas destiné. Merci de noter que l'intégrité ou la sécurité de ce message ne peuvent pas être garanties sur Internet.
This e-mail is confidential. If you have received this message by mistake or if you are not the intended recipient of this message, please inform us by reply e-mail and delete this message from your system. You may not print any message, nor copy or disclose its content to anyone if you are not its intended recipient. Please note that the integrity and security of this message cannot be guaranteed on the Internet.
De : Oriol Bausa ***@***.***>
Date : jeudi, 18 juillet 2024 à 16:02
À : ConnectingEurope/eInvoicing-EN16931 ***@***.***>
Cc : csautereau ***@***.***>, Author ***@***.***>
Objet : Re: [ConnectingEurope/eInvoicing-EN16931] CII Schematron - BT-8 - [CII-SR-462] - Only one DueDateTypeCode shall be present - Not well implemented - URGENT (Issue #387)
DueDateTypeCode is an optional value, the solution is to inform only once this element.
—
Reply to this email directly, view it on GitHub<#387 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ALFYEPMP3OCRIKGFV27T7X3ZM7DF7AVCNFSM6AAAAABLCIUNCSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZWGYYTGNZQGE>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
This was added because of #365. |
YES, but I fully disagree the way it has been done.
The rule is that there must be a unique value of BT-8 and CII is not like UBL. UBL provide BT-8 on document level, CII provides it on Breakdown Group which is 0..n.
Then in CII, the implementation should be : For each VAT breakdown (/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax), The # of ram:DueDateTypeCode must be equal to # of value of ram:DueDateTypeCode
And the same for ram:TaxPointDate (BT-7)
KR
Cyrille.
Cordialement
Cyrille SAUTEREAU
…------------------------------------------------
Président
ADMAREL Conseil
Président FNFE-MPE
(Forum National de la Facture Électronique et des Marchés Publics Électronique)
Mob : +33 6 07 53 32 85
E-mail : ***@***.******@***.***>
P avant d'imprimer, pensez à l'environnement, dématérialisez !
Cet e-mail est confidentiel. Si vous avez reçu ce message par erreur ou si vous n'êtes pas le destinataire de ce message, merci de bien vouloir nous en informer par retour de mail et détruire ce message. Vous ne devez imprimer aucun message, ni copier ni transférer le contenu d'un message qui ne vous est pas destiné. Merci de noter que l'intégrité ou la sécurité de ce message ne peuvent pas être garanties sur Internet.
This e-mail is confidential. If you have received this message by mistake or if you are not the intended recipient of this message, please inform us by reply e-mail and delete this message from your system. You may not print any message, nor copy or disclose its content to anyone if you are not its intended recipient. Please note that the integrity and security of this message cannot be guaranteed on the Internet.
De : Oriol Bausa ***@***.***>
Date : jeudi, 18 juillet 2024 à 16:54
À : ConnectingEurope/eInvoicing-EN16931 ***@***.***>
Cc : csautereau ***@***.***>, Author ***@***.***>
Objet : Re: [ConnectingEurope/eInvoicing-EN16931] CII Schematron - BT-8 - [CII-SR-462] - Only one DueDateTypeCode shall be present - Not well implemented - URGENT (Issue #387)
This was added because of #365<#365>.
—
Reply to this email directly, view it on GitHub<#387 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ALFYEPIHHRXMQ4BQ3B6CLP3ZM7JKTAVCNFSM6AAAAABLCIUNCSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZWG44DKNJTGI>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
The EN16931 is a semantic model, and the semantic model is what drives the European Norm. The fact that a specific syntax handles the data in a specific way does not mean that the semantic model has to be modified to support that particular syntax specification, but the other way around. The syntax shall stick to the semantic model. And in this case the semantic model states that there is only one Due Date Code, and this is what has been implemented in the syntax bindings. The issue could be in this particular case that we could end up with different Due Date Codes in a single invoice, and then an automated system would not know which one to apply. If you want to to modify the semantics, I think that the best way is to do it through the CEN TC 434. I'd suggest to a request a change of the cardinality to the CEN TC and when approved it will be applied in the syntax bindings. |
Again, the subject is not to change the EN16931, but how it is implemented in CII or UBL We have already the same subject for Item base Quantity (BT-150) which is unique in the EN16931. But in CII, this data is present in the Gros Price Group AND in the Net Price Group. Then, there is a rule which says that the 2 values MUST be equal. This is just the same for BT-8 and BT-7. In CII, the place for those values is in a group which is repeatable. Then, in case it is repeated, the value MUST BE the same. That's all. It is not written in the syntax binding that only the first or one occurrence of VAT Breakdown must contain the value of BT-8 or BT-7. And it does not seem that implementing a rule controlling that only ONE VALUE of BT-8 (or BT-7) is present is undoable. It is required to use the last version of EN16931 Schematron. The consequence is a minimum concern about changes which are not backward compatible and makes compliant invoices suddenly not compliant, with NO INFORMATION and clear notice in advance. And more generally, any change which will add new control should be done carefully. There are many thousands of solutions which are issuing EN16931 compliant invoices based on documentation and current Schematron. If schematrons are changed against documentation and with no time to organize a correction, it is just not professional. |
As just mentioned in our TAG meeting and as indicated by Cyrille's given test files. Going to provide a pull request. |
@oriol Please remove the label "CEN/TC 434 Discussion needed" as it had been an XPATH problem as I do not have the editing rights for labels. |
For svante : The correction should allow a single value for BT-8, in case it is present more than 1 time (for instance where there are more than 1 VAT breakdown line). Do your modification correct this ? |
Your test documents validate fine, and I modified one example and duplicated the ram:DueDateTypeCode to test that the new rule works in finding invalid documents with multiple ram:DueDateTypeCode children. |
…lements by parent and not any longer by document
I am not sure the correction works. Attached 2 xml CII files factur-x_F2024000224.xml has 4 value of BT-8 (4 VAT breakdown : ram:ApplicableTradeTax/ram:DueDateTypeCode) the first 3 equal to 72 and the 4th = 5 => your modification approve it also where it should reject. The rule should count the number of different value of ram:ApplicableTradeTax/ram:DueDateTypeCode, which must be 1 KR |
Mayube a way to do it, as we know that ram:ApplicableTradeTax/ram:DueDateTypeCode can only be equal ro 5, 29 or 72 (code list check BR-CL-06), maybe should we: |
I was indeed only fixing the problem that more than one VAT BREAKDOWN (BG-23) with a BT-7 or BT-8 was no longer possible - which must be possible as it is allowed in the EN16931 norm (see my comment in #365). But the EN16931-1 states on BT-8 also the following:
Therefore, I might add a validation of the mutually exclusive use of BT-8 and BT-7. Is there more that needs to be validated, Cyrille? |
Svante
There is a difference between the Norm EN16931, and its implementation in CII (Syntax Binding).
The Norm obliges 1 occurrence of BT-8 value, BUT
* In UBL, BT-8 is implemented on document level and directly with cardinality 0..1
* In CII, BT-8 is mapped inside the VAT Breakdown group which is 0..n
Consequence for CII : in case there are more than 1 occurrence of VAT Breakdown, it is possible to repeat ram:DueDateTypeCode in each occurrence of ram:ApplicableTradeTax.
In that case it should be allowed to have multiple values (which must be inside 5, 29, 72 (the 3 values already checked)) BUT they MUST be all equal together.
The current implementation is a simplification which forces to have only 1 occurrence ram:ApplicableTradeTax with one occurrence of ram:DueDateTypeCode.
Then, the implementation of the rule “Only 1 value of BT-8 in an invoice” should become in CII : “in case of multiple occurrences of BT-8, the value Must be always the same”
It is a validation artefact subject. Technical implementation only.
Mutually exclusion is already implemented : BR-CO-03
KR
Cyrille
Cordialement
Cyrille SAUTEREAU
…------------------------------------------------
Président
ADMAREL Conseil
Président FNFE-MPE
(Forum National de la Facture Électronique et des Marchés Publics Électronique)
Mob : +33 6 07 53 32 85
E-mail : ***@***.******@***.***>
P avant d'imprimer, pensez à l'environnement, dématérialisez !
Cet e-mail est confidentiel. Si vous avez reçu ce message par erreur ou si vous n'êtes pas le destinataire de ce message, merci de bien vouloir nous en informer par retour de mail et détruire ce message. Vous ne devez imprimer aucun message, ni copier ni transférer le contenu d'un message qui ne vous est pas destiné. Merci de noter que l'intégrité ou la sécurité de ce message ne peuvent pas être garanties sur Internet.
This e-mail is confidential. If you have received this message by mistake or if you are not the intended recipient of this message, please inform us by reply e-mail and delete this message from your system. You may not print any message, nor copy or disclose its content to anyone if you are not its intended recipient. Please note that the integrity and security of this message cannot be guaranteed on the Internet.
De : Svante Schubert ***@***.***>
Date : jeudi, 5 septembre 2024 à 18:06
À : ConnectingEurope/eInvoicing-EN16931 ***@***.***>
Cc : csautereau ***@***.***>, Author ***@***.***>
Objet : Re: [ConnectingEurope/eInvoicing-EN16931] CII Schematron - BT-8 - [CII-SR-462] - Only one DueDateTypeCode shall be present - Not well implemented - URGENT (Issue #387)
I was indeed only fixing the problem that more than one VAT BREAKDOWN with a BT-7 and BT-8 was no longer possible - which must be possible as it is allowed in the EN16931 norm (see my comment <#365 (comment)> in #365<#365>).
But the EN16931-1 states on BT-8 also the following:
The code shall distinguish between the following entries of UNTDID 2005 [6]:
- Invoice document issue date
- Delivery date, actual
- Paid to dateThe Value added tax point date code is used if the Value added tax point date is not known when the invoice is issued. The use of BT-8 and BT-7 is mutually exclusive.
Therefore, I might add a validation of the mutually exclusive use of BT-8 and BT-7.
Is there more that needs to be validated, Cyrille?
It seems to me - from your new example - that you like to ensure to have only the same BT-8 code for all occurrences in the document.
If this is the case, is your demand also demanded by the law?
And if it is in the law, we still have to update it in EN16931-1, as I can not find this rule in the current norm or its current internal draft.
—
Reply to this email directly, view it on GitHub<#387 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ALFYEPNAF5DDLICGLODV7X3ZVB6RFAVCNFSM6AAAAABLCIUNCSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZSGEZDINBUG4>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Yes, I found and tested BR-CO-03 meanwhile and tested it, and it works.
|
The solution for your request would be:
I should assume if we require this criteria for BT-8, we should require this for BT-7 as well, right? Thinking it over, I believe the core should have this requirement and an extension might do differently (if the law is not forbidding it). Will address this to CEN TC 434 WG1. |
Going to drop my prior commits testing for uniqueness as this is already tested by the XSD. For BT-8:
For BT-7:
Different approaches because the solution for BT-8 is likely faster than the one of BT-7 using the |
The previous solution for BT-7 to check for a unique value within the document, would not work for 3 or more occurrences of BG-23, when the last two are the same, the following would do:
|
The attached CII invoices do not pass the last CII shematron.
They have many VAT breakdown lines, all with BT-8 = 72, but the schematron says
[CII-SR-462] - Only one DueDateTypeCode shall be present (which is the case : only 72)
The schematron counts the occurrence of DueDateTypeCode, where in CII this value is present in each occurrence of VAT Breakdown.
Then, any invoice with MORE than 1 VAT breakdown line is REJECTED !!
URGENT CORRECTION NEEDED
--
factur-x_F2023000152.xml.zip
facture_F20220023.xml.zip
The text was updated successfully, but these errors were encountered: