svanteschubert / complex-business-cases

The complex business cases collected by French and German businesses.
Apache License 2.0
6 stars 0 forks source link

Extension in CII (implementation) #10

Open svanteschubert opened 11 months ago

svanteschubert commented 11 months ago

Further Procedure

Possible solution difficult. CEN validation rules validate over all invoice items and do not differentiate whether an element (ParentID) represents this item as a sub-item. This inevitably leads to an error in the validation. Can neither be adapted by KoSIT nor FeRD, changes only possible via CEN committees.

Update: To-Do still open

edmundgray commented 11 months ago

need more information on the issue - is it sub line items?

larsroelkerdenker commented 10 months ago

need more information on the issue - is it sub line items?

yes, it is about sub invoice lines. It works for Extension XRechnung in UBL but not for CII

svanteschubert commented 9 months ago

There is a bit of confusion in the CEN TC 434 on breaking the validation rules from the core with an extension. If there is only a subset of XML available for a business rule in the core of course it will fail in an extension!

For example, we have in one of the XML formats 6 attributes A to F, all containing some number. The first 5 XML attributes: A, B, C, D, and E are being added up to the attribute F (like full). Therefore the schematron validation rule is that A+B+C+D+E = F

But let's assume we just required in the B2G core the attributes A, B and C and the result F. Therefore, the validation rule for the core would be A+B+C = F (as the attributes D and E are not allowed).

With an extension, we decided now to bring back the attribute E! Therefore, the validation rule for the extension would be A+B+C+E = F (as the attribute D is still not allowed).

In any document which contains an E that is unequal to 0 the core rule will fail, which is completely correct. We should keep this in mind!

PS: @larsroelkerdenker it is possible to provide a validation rule for the CII sub-invoice line extensions as Andreas Pelekies confirmed as well. Therefore, I will mark this issue as out-of-scope. Please close if clarified otherwise please ask if you have any further questions!