-
-
Notifications
You must be signed in to change notification settings - Fork 88
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
Invoice total amount wrong? #56
Comments
The rule that is used is: ram:GrandTotalAmount = round(ram:TaxBasisTotalAmount*100 + ram:TaxTotalAmount[@currencyID=/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceCurrencyCode]*100 +0) div 100) or ((ram:GrandTotalAmount = ram:TaxBasisTotalAmount) and not (ram:TaxTotalAmount[@currencyID=/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceCurrencyCode])) i.e.: GrandTotalAmount = round(TaxBasisTotalAmount*100 + TaxTotalAmount * 100 + 0) / 100 which looks indeed alright for this invoice. But: it looks like the currency ID is taken into account in the selectors. |
So is this a bug in the validator? |
Imho yes. I've sent an email to info@ferdmc.com. Let's see what they answer. |
I have received good feedback. CurrencyID can be used optionally in all profiles. Exception seems to be TaxBasisTotalAmount. In this tag, CurrencyID is only allowed in Extended profile. I have committed a new version, could you try it and run the validator against it: |
I tried, now i get the currencyID should not be present error again, which seems to be handled wrong by the validator |
I expect that the validator will be updated (the issue ZUGFeRD/ZUV#39 is marked as upstream now). |
So i experimented a bit. As every validator said it was invalid, i looked into the official examples which validate just fine. |
imho it doesn't make sense to adopt the behaviour of the library to bugs of the validator. |
The error is pretty clear, but the generated xml, displays the right amount.
The fields BT-109 + BT-110 equal the sum (BT-112), i am not sure where the problem is.
The text was updated successfully, but these errors were encountered: