Comments (9)
Note: XRechnung 2.2 uses CEN rules 1.3.7 but the error can be reproduced with CEN rules 1.3.9:
Error
Location: BR_IC_08.txt
Element/context: /rsm:CrossIndustryInvoice[1]/rsm:SupplyChainTradeTransaction[1]/ram:ApplicableHeaderTradeSettlement[1]/ram:ApplicableTradeTax[1]/ram:CategoryCode[1]
XPath test: ../ram:BasisAmount = (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement[ram:ApplicableTradeTax/ram:CategoryCode = 'K']/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount)*10*10)div 100) + (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=true() and ram:CategoryTradeTax/ram:CategoryCode='K']/ram:ActualAmount)*10*10)div 100) - (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator=false() and ram:CategoryTradeTax/ram:CategoryCode='K']/ram:ActualAmount)*10*10)div 100)
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".
from einvoicing-en16931.
I don't get the comment.
Yes there is a error message, but there is only one higher basisAmount in the file with 1421.70
and there is only one LineTotalAmount o the Leve of the rule of 1225.60 ( with K)
and one Charge indicator (with K) of 196.10
So for my the rule should be folowed, but the validation fails.
So why does it fail, when the Sum is correct ?
Actually there is an similar issue reported
kosit_issue77
Trying with a simple xpath tester even with the round added : the result is Double='1421.6999999999998'
from einvoicing-en16931.
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.
from einvoicing-en16931.
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:
Double='1421.7' Is the result then on the right side
But maybe it is better use a round for the amount to be compared too and skip the div . Only compare "integers" .
My Question.
I am on a customer that does send invoices and only checking with validators and the released ones are stating to be 2.2..
It is not easy to argue, that the validation is wrong and not our document.
from einvoicing-en16931.
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.
from einvoicing-en16931.
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.
from einvoicing-en16931.
@oriol The last release was 1.3.9 - I think the milestone 1.3.5 is invalid
from einvoicing-en16931.
indeed, a mistake
from einvoicing-en16931.
Added a slack of 1 in the calculation
from einvoicing-en16931.
Related Issues (20)
- [BR-63] fails if multiple URIUniversalCommunication are present HOT 5
- Tolerance of 1 € on BR-S-09 HOT 2
- BT-32 path check missing in BR-AE-02, BR-AE-03, and BR-AE-04 in CII HOT 1
- Code list changes
- ISO 4217 VEF/VES HOT 2
- Commit did overwrite PR changes HOT 1
- CII special ID elements without attributes - not handled correctly
- VAT Category "B" supported even though it is not in the EN HOT 1
- Contradicting message
- ISO 4217 HRK / Kuna HOT 1
- Artefacts v1.3.12 (CII) do not check BR-62 / BR-63 correct any more HOT 3
- Allow code 106 (Withheld taxes and social security contributions) on Allowance code list 5189 HOT 1
- BR-CO-15 for correct amounts HOT 2
- Invoice Content: Romania Commercial Registaration No. of the Customer (Legal requirment) HOT 1
- Error with a validation with xsl HOT 1
- br-co-25 check does not match description HOT 5
- CII Schematron - BT-8 - [CII-SR-462] - Only one DueDateTypeCode shall be present - Not well implemented - URGENT HOT 19
- codes_validation_BR-CL-23_weakness HOT 4
- Chat community HOT 8
- Update validation artafacts with Nov 24 codes
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from einvoicing-en16931.