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)
- Typo in rule-text UBL-CR-583, UBL-CR-577 and UBL-CR-572 (UBL) HOT 1
- Typo in rule-text UBL-CR-282, UBL-CR-247 and UBL-CR-183 (UBL) HOT 1
- UBL-SR-51 does not check cac:DeliveryLocation HOT 1
- Error in Validation of Rule BR-E-08 HOT 1
- CII - missing cardinality check for ApplicableTradeTax (BG-30) HOT 1
- Validate line total HOT 1
- `UBL-SR-43` using attribute `scheme` instead of `schemeID` HOT 1
- CII BT-17 and BT-18 checks to be improved HOT 1
- CII Missing check on DefinedTradeContact cardinality HOT 1
- Cardinality of DesignatedProductClassification in CII might stop the check BR-65
- add missing currency codes HOT 2
- Bug in CII BR-65 HOT 3
- Add EAS code 0218 HOT 1
- BR-17 fails on equal payee and seller
- Move PEPPOL-EN16931-R046 rule to EN16931? HOT 2
- UBL-SR-32 HOT 9
- missing cardinality check for Value added tax point date (BT-7) and Value added tax point date code (BT-8) in CII HOT 1
- Undocumented and missing changes in v.1.3.11 release HOT 3
- BR-33 / BR-CO-21 rules validation doesn't work on CII files (OK on UBL files) HOT 1
- [BR-63] fails if multiple URIUniversalCommunication are present HOT 5
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.