-
Notifications
You must be signed in to change notification settings - Fork 55
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_IC_08 incorrect fail? #336
Comments
Note: XRechnung 2.2 uses CEN rules 1.3.7 but the error can be reproduced with CEN rules 1.3.9: Error Location: Element/context: XPath test: Error message: [BR-IC-08]-In a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Intra-community supply" the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are "Intra-community supply". |
I don't get the comment. So why does it fail, when the Sum is correct ? Actually there is an similar issue reported Trying with a simple xpath tester even with the round added : the result is Double='1421.6999999999998' |
I was not trying to answer. I was just putting the question in context :) Because XRechnung 2.2 uses an older version of the rules, I wanted to avoid an initial rejection. I guess it is again a round problem. I leave that to @oriol to determine - Thanks for the example file. |
Ok, Thank you . Actually with: ((round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement[ram:ApplicableTradeTax/ram:CategoryCode = 'K']/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount)*100 ) ) +(round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true() and ram:CategoryTradeTax/ram:CategoryCode='K']/ram:ActualAmount)*100)) -(round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=false() and ram:CategoryTradeTax/ram:CategoryCode='K']/ram:ActualAmount)*100 ))) div 100 It worked in a tester: My Question. |
Yes in this particular case it seems to be a bug in the validation rules and your document is fine. Please contact the XRechnung support team for details how to progress in this particular case. |
Hi @ubabap, you are right, the rule as is raises an error due to the calculation and rounding. It shall be corrected in the next release of the validation artefacts. Thanks for spotting the problem. |
@oriol The last release was 1.3.9 - I think the milestone 1.3.5 is invalid |
indeed, a mistake |
Added a slack of 1 in the calculation |
Hello,
checking the Rule BR_IC_08 in the attached example , i do not see the reason for the reported failure.
[BR-IC-08]-In a VAT breakdown (BG-23) where the VAT category code (BT-118) is "Intra-community supply" the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are "Intra-community supply".
Or: (BT-116)1421.70 = (BT-131)1225.60 + (BT-92)196.10
BR_IC_08.txt
What is wrong with that rule according Schematron rules for EN16931 (CII) (val-sch.1) checked with version 2.2 ?
Hoping for any help
with best regards
Ulrich Becker
The text was updated successfully, but these errors were encountered: