-
Notifications
You must be signed in to change notification settings - Fork 54
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
Ruleset 1.3.3 - UBL - BR-CO-15 is broken if more than one TaxAmount is present #257
Comments
@phax,the second repetition of the TaxTotal is supposed to be in another currency. From the EN: The BT-111 Invoice total VAT amount in accounting currency In the example, the second repetition of the TaxTotal has the same currency as the first one, and I think the solution is not summing up both values. |
Okay, so maybe you could add a rule that states, that no 2 top-level |
Added condition to check there is only one TaxTotal for each currency. |
The consequence of this modification is that we can not specify the TaxTotal in the InvoiceLine level anymore, should we modify our software to avoid the use of TaxTotal in the invoiceLine ? |
As far as I know, the EN does not allow TaxTotal in the InvoiceLine. You can specify the class ClassifiedTaxCategory within the Item of each InvoiceLine, but not TaxTotal per InvoiceLine. |
ok thank you for your answer, we will remove the TaxTotal per InvoiceLine for BIS3. On the other hand we must keep it for UBLBE (until now UBLBE need the TaxTotal per InvoiceLine but maybe this could change in the next few days...) |
@oriol this change has broken the SeeF (energy e-invoice) extension that is used in the Netherlands. |
or
|
That could be the CII solution: every $Currency in rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceCurrencyCode satisfies
( count (
rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:TaxTotalAmount[@currencyID=$Currency] ) eq 1
and
(//ram:SpecifiedTradeSettlementHeaderMonetarySummation/xs:decimal(ram:GrandTotalAmount)
= round(
(//ram:SpecifiedTradeSettlementHeaderMonetarySummation/xs:decimal(ram:TaxBasisTotalAmount) + (//ram:SpecifiedTradeSettlementHeaderMonetarySummation/xs:decimal(ram:TaxTotalAmount[@currencyID=$Currency]))) * 10 * 10) div 100)) or (//ram:SpecifiedTradeSettlementHeaderMonetarySummation/xs:decimal(ram:GrandTotalAmount) = (//ram:SpecifiedTradeSettlementHeaderMonetarySummation/xs:decimal(ram:TaxBasisTotalAmount)
)
) But only did some first tests. More to follow. |
A UBL CreditNote having 2 TaxTotal sections
(taken from an XRechnung 2.0.1 example UBL creditnote -
ubl-cn-br-de-10-test-219-identity.log (it's an XML))
Creates the following error with Saxon 10.3:
The source of the rule is this:
To avoid the error, may using the
sum
function here should resolve the issue.The text was updated successfully, but these errors were encountered: