Giter VIP home page Giter VIP logo

Comments (9)

phax avatar phax commented on June 16, 2024

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.

ubabap avatar ubabap commented on June 16, 2024

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.

phax avatar phax commented on June 16, 2024

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.

ubabap avatar ubabap commented on June 16, 2024

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.

phax avatar phax commented on June 16, 2024

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.

oriol avatar oriol commented on June 16, 2024

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.

phax avatar phax commented on June 16, 2024

@oriol The last release was 1.3.9 - I think the milestone 1.3.5 is invalid

from einvoicing-en16931.

oriol avatar oriol commented on June 16, 2024

indeed, a mistake

from einvoicing-en16931.

oriol avatar oriol commented on June 16, 2024

Added a slack of 1 in the calculation

from einvoicing-en16931.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.