HR-BR-30
HR Ukupni iznosi računa (HR-BG-3) se navodi na računu ako račun sadrži stavke računa (BG-25) ili troškove na razini dokumenta (BG-21) koji ne ulaze u poreznu osnovicu računa osim ako je EN porezna kategorija (O) Neoporeziva prodaja I Oznaka porezne kategorije HR:O.
In English The HR document totals (HR-BG-3) are given when the invoice contains invoice lines (BG-25) or document level charges (BG-21) that are not part of the taxable amount, unless the EN tax category is O (not subject to VAT) and the HR tax category is HR:O.
What the rule checks
As the rule set's publisher wrote it. The rule runs on every element the context matches, and fails where the test is false; the validator reports the line of that element.
ubl-creditnote:CreditNote | ubl-invoice:Invoice
((exists(//cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:Name) = 'HR:POVNAK']) or exists(//cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:Name) = 'HR:PP']) or exists(//cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:Name) = 'HR:PPMV']) or exists(//cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:Name) = 'HR:N']) or exists(//cac:AllowanceCharge[cbc:ChargeIndicator='true']/cac:TaxCategory[normalize-space(cbc:Name) = 'HR:POVNAK']) or exists(//cac:AllowanceCharge[cbc:ChargeIndicator='true']/cac:TaxCategory[normalize-space(cbc:Name) = 'HR:PP']) or exists(//cac:AllowanceCharge[cbc:ChargeIndicator='true']/cac:TaxCategory[normalize-space(cbc:Name) = 'HR:PPMV']) or exists(//cac:AllowanceCharge[cbc:ChargeIndicator='true']/cac:TaxCategory[normalize-space(cbc:Name) = 'HR:N'])) and (exists(//ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/hrextac:HRFISK20Data/hrextac:HRLegalMonetaryTotal))) or (not(exists(//cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:Name) = 'HR:POVNAK'])) and not(exists(//cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:Name) = 'HR:PP'])) and not(exists(//cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:Name) = 'HR:PPMV'])) and not(exists(//cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory[normalize-space(cbc:Name) = 'HR:N'])) and not(exists(//cac:AllowanceCharge[cbc:ChargeIndicator='true']/cac:TaxCategory[normalize-space(cbc:Name) = 'HR:POVNAK'])) and not(exists(//cac:AllowanceCharge[cbc:ChargeIndicator='true']/cac:TaxCategory[normalize-space(cbc:Name) = 'HR:PP'])) and not(exists(//cac:AllowanceCharge[cbc:ChargeIndicator='true']/cac:TaxCategory[normalize-space(cbc:Name) = 'HR:PPMV'])) and not(exists(//cac:AllowanceCharge[cbc:ChargeIndicator='true']/cac:TaxCategory[normalize-space(cbc:Name) = 'HR:N'])))
Checked with Croatia eRačun Invoice (UBL), Croatia eRačun Credit Note (UBL)