BR-CO-04 — Stavci nedostaje kategorija PDV-a
Uzrok, popravak i reproducirani XML primjer za BR-CO-04 u hrvatskom eRačunu.
Značenje i popravak
Svaka stavka računa treba šifru kategorije PDV-a za fakturirani artikl. Kategorija se u primjeru nalazi unutar Item/ClassifiedTaxCategory/ID. To nije identifikator artikla, šifra KPD-a ni oznaka porezne stope. Postotak sam po sebi ne govori zašto se primjenjuje određeni porezni postupak: različite kategorije mogu imati nultu stopu i različite zahtjeve za obrazloženje.
Testna faktura ima kategoriju S uz stopu 25. Pogrešna inačica uklanja samo element ID iz porezne kategorije stavke. Pozitivna ga vraća na isto mjesto, bez promjene artikla, cijene i iznosa. Motor mora prijaviti BR-CO-04 za uklonjenu kategoriju, a potpuno popravljena datoteka mora proći sve aktivne provjere. Kod stvarnog izvoza pronađi poreznu postavku artikla ili poslovnog događaja iz koje se kategorija puni. Nemoj svemu dodijeliti S samo radi prolaska validatora. Za oslobođenja i prijenos porezne obveze vrijede dodatni uvjeti koji se provjeravaju drugim pravilima. Posebno pregledaj popuste i troškove: porezna kategorija na tim mjestima nije zamjena za kategoriju same stavke. Nakon ispravka ponovno provjeri poreznu raspodjelu jer stavka ulazi u grupu određenu kategorijom i stopom. U izvještaju odvoji ovu pogrešku od mogućeg upozorenja o praznim elementima ili drugih posljedica nepotpunog poreznog zapisa.
Polje koje mijenja test
Za BR-CO-04 mijenja se samo /*/cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory/cbc:ID. Uklanja se jedan element sa svim pripadajućim atributima i sadržajem.
Reproducirani rezultat
Negativna datoteka: BR-S-01, BR-S-08, BR-CO-04.
Ispravljena datoteka prolazi XSD i oba skupa poslovnih pravila. Upozorenja osnovnog profila ostaju vidljiva: UBL-CR-006, UBL-CR-200, UBL-CR-412.
{
"bad": {
"ok": false,
"stage": "Business rules",
"rules": "HR-CIUS/EXT 2025 1.0.0, 13.3.2026 (primjena 15.3.2026) + EN16931 1.3.16",
"syntax": "UBL",
"engine": "SaxonC-HE 13.1 / saxonche 13.1.1",
"errors": [
{
"code": "BR-S-01",
"message": "[BR-S-01]-An Invoice that contains an Invoice line (BG-25), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151, BT-95 or BT-102) is \"Standard rated\" shall contain in the VAT breakdown (BG-23) at least one VAT category code (BT-118) equal with \"Standard rated\".",
"path": "/*:Invoice[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:Invoice-2'][1]"
},
{
"code": "BR-S-08",
"message": "[BR-S-08]-For each different value of VAT category rate (BT-119) where the VAT category code (BT-118) is \"Standard rated\", the VAT category taxable amount (BT-116) in a VAT breakdown (BG-23) shall equal the sum of Invoice line net amounts (BT-131) plus the sum of document level charge amounts (BT-99) minus the sum of document level allowance amounts (BT-92) where the VAT category code (BT-151, BT-102, BT-95) is \"Standard rated\" and the VAT rate (BT-152, BT-103, BT-96) equals the VAT category rate (BT-119).",
"path": "/*:Invoice[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:Invoice-2'][1]/*:TaxTotal[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2'][1]/*:TaxSubtotal[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2'][1]/*:TaxCategory[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2'][1]"
},
{
"code": "BR-CO-04",
"message": "[BR-CO-04]-Each Invoice line (BG-25) shall be categorized with an Invoiced item VAT category code (BT-151).",
"path": "/*:Invoice[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:Invoice-2'][1]/*:InvoiceLine[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2'][1]"
}
],
"warnings": [
{
"code": "UBL-CR-006",
"message": "[UBL-CR-006]-A UBL invoice should not include the IssueTime",
"path": "/*:Invoice[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:Invoice-2'][1]"
},
{
"code": "UBL-CR-200",
"message": "[UBL-CR-200]-A UBL invoice should not include the AccountingSupplierParty SellerContact",
"path": "/*:Invoice[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:Invoice-2'][1]"
},
{
"code": "UBL-CR-412",
"message": "[UBL-CR-412]-A UBL invoice should not include the PaymentMeans PaymentDueDate",
"path": "/*:Invoice[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:Invoice-2'][1]"
}
],
"truncated": false
},
"good": {
"ok": true,
"stage": "Business rules",
"rules": "HR-CIUS/EXT 2025 1.0.0, 13.3.2026 (primjena 15.3.2026) + EN16931 1.3.16",
"syntax": "UBL",
"engine": "SaxonC-HE 13.1 / saxonche 13.1.1",
"errors": [],
"warnings": [
{
"code": "UBL-CR-006",
"message": "[UBL-CR-006]-A UBL invoice should not include the IssueTime",
"path": "/*:Invoice[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:Invoice-2'][1]"
},
{
"code": "UBL-CR-200",
"message": "[UBL-CR-200]-A UBL invoice should not include the AccountingSupplierParty SellerContact",
"path": "/*:Invoice[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:Invoice-2'][1]"
},
{
"code": "UBL-CR-412",
"message": "[UBL-CR-412]-A UBL invoice should not include the PaymentMeans PaymentDueDate",
"path": "/*:Invoice[namespace-uri()='urn:oasis:names:specification:ubl:schema:xsd:Invoice-2'][1]"
}
],
"truncated": false
}
}Izmišljeni XML za preuzimanje
Preuzmi pogrešan XML · Preuzmi ispravljeni XML
<ubl:Invoice xmlns:ubl="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:cn="urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:mfin.gov.hr:cius-2025:1.0#conformant#urn:mfin.gov.hr:ext-2025:1.0</cbc:CustomizationID>
<cbc:ProfileID>P1</cbc:ProfileID>
<cbc:ID>TEST-HR-2026-001</cbc:ID>
<cbc:IssueDate>2026-11-03</cbc:IssueDate>
<cbc:IssueTime>12:34:56</cbc:IssueTime>
<cbc:DueDate>2026-11-30</cbc:DueDate>
<cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
<cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
<cac:AccountingSupplierParty>
<cac:Party>
<cbc:EndpointID schemeID="9934">12345678903</cbc:EndpointID>
<cac:PostalAddress>
<cbc:StreetName>Izmišljena ulica 1</cbc:StreetName>
<cbc:CityName>Zagreb</cbc:CityName>
<cbc:PostalZone>10000</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>HR</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>HR12345678903</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>XSDHub izmišljeni prodavatelj</cbc:RegistrationName>
<cbc:CompanyID>12345678903</cbc:CompanyID>
</cac:PartyLegalEntity>
</cac:Party>
<cac:SellerContact>
<cbc:ID>12345678903</cbc:ID>
<cbc:Name>Testni operater</cbc:Name>
</cac:SellerContact>
</cac:AccountingSupplierParty>
<cac:AccountingCustomerParty>
<cac:Party>
<cbc:EndpointID schemeID="9934">98765432106</cbc:EndpointID>
<cac:PostalAddress>
<cbc:StreetName>Izmišljena ulica 1</cbc:StreetName>
<cbc:CityName>Zagreb</cbc:CityName>
<cbc:PostalZone>10000</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>HR</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>HR98765432106</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>XSDHub izmišljeni kupac</cbc:RegistrationName>
<cbc:CompanyID>98765432106</cbc:CompanyID>
</cac:PartyLegalEntity>
</cac:Party>
</cac:AccountingCustomerParty>
<cac:PaymentMeans>
<cbc:PaymentMeansCode>10</cbc:PaymentMeansCode>
<cbc:PaymentDueDate>2026-11-30</cbc:PaymentDueDate>
</cac:PaymentMeans>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="EUR">25.00</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="EUR">100.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="EUR">25.00</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>25</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:LegalMonetaryTotal>
<cbc:LineExtensionAmount currencyID="EUR">100.00</cbc:LineExtensionAmount>
<cbc:TaxExclusiveAmount currencyID="EUR">100.00</cbc:TaxExclusiveAmount>
<cbc:TaxInclusiveAmount currencyID="EUR">125.00</cbc:TaxInclusiveAmount>
<cbc:PayableAmount currencyID="EUR">125.00</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
<cac:InvoiceLine>
<cbc:ID>1</cbc:ID>
<cbc:InvoicedQuantity unitCode="C62">1</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="EUR">100.00</cbc:LineExtensionAmount>
<cac:Item>
<cbc:Name>Izmišljena usluga za provjeru</cbc:Name>
<cac:CommodityClassification>
<cbc:ItemClassificationCode listID="CG">62.10.11</cbc:ItemClassificationCode>
</cac:CommodityClassification>
<cac:ClassifiedTaxCategory>
<cbc:Percent>25</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="EUR">100.00</cbc:PriceAmount>
<cbc:BaseQuantity unitCode="C62">1</cbc:BaseQuantity>
</cac:Price>
</cac:InvoiceLine>
</ubl:Invoice>
<ubl:Invoice xmlns:ubl="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:cn="urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:mfin.gov.hr:cius-2025:1.0#conformant#urn:mfin.gov.hr:ext-2025:1.0</cbc:CustomizationID>
<cbc:ProfileID>P1</cbc:ProfileID>
<cbc:ID>TEST-HR-2026-001</cbc:ID>
<cbc:IssueDate>2026-11-03</cbc:IssueDate>
<cbc:IssueTime>12:34:56</cbc:IssueTime>
<cbc:DueDate>2026-11-30</cbc:DueDate>
<cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
<cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
<cac:AccountingSupplierParty>
<cac:Party>
<cbc:EndpointID schemeID="9934">12345678903</cbc:EndpointID>
<cac:PostalAddress>
<cbc:StreetName>Izmišljena ulica 1</cbc:StreetName>
<cbc:CityName>Zagreb</cbc:CityName>
<cbc:PostalZone>10000</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>HR</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>HR12345678903</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>XSDHub izmišljeni prodavatelj</cbc:RegistrationName>
<cbc:CompanyID>12345678903</cbc:CompanyID>
</cac:PartyLegalEntity>
</cac:Party>
<cac:SellerContact>
<cbc:ID>12345678903</cbc:ID>
<cbc:Name>Testni operater</cbc:Name>
</cac:SellerContact>
</cac:AccountingSupplierParty>
<cac:AccountingCustomerParty>
<cac:Party>
<cbc:EndpointID schemeID="9934">98765432106</cbc:EndpointID>
<cac:PostalAddress>
<cbc:StreetName>Izmišljena ulica 1</cbc:StreetName>
<cbc:CityName>Zagreb</cbc:CityName>
<cbc:PostalZone>10000</cbc:PostalZone>
<cac:Country>
<cbc:IdentificationCode>HR</cbc:IdentificationCode>
</cac:Country>
</cac:PostalAddress>
<cac:PartyTaxScheme>
<cbc:CompanyID>HR98765432106</cbc:CompanyID>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:PartyTaxScheme>
<cac:PartyLegalEntity>
<cbc:RegistrationName>XSDHub izmišljeni kupac</cbc:RegistrationName>
<cbc:CompanyID>98765432106</cbc:CompanyID>
</cac:PartyLegalEntity>
</cac:Party>
</cac:AccountingCustomerParty>
<cac:PaymentMeans>
<cbc:PaymentMeansCode>10</cbc:PaymentMeansCode>
<cbc:PaymentDueDate>2026-11-30</cbc:PaymentDueDate>
</cac:PaymentMeans>
<cac:TaxTotal>
<cbc:TaxAmount currencyID="EUR">25.00</cbc:TaxAmount>
<cac:TaxSubtotal>
<cbc:TaxableAmount currencyID="EUR">100.00</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="EUR">25.00</cbc:TaxAmount>
<cac:TaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>25</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:TaxCategory>
</cac:TaxSubtotal>
</cac:TaxTotal>
<cac:LegalMonetaryTotal>
<cbc:LineExtensionAmount currencyID="EUR">100.00</cbc:LineExtensionAmount>
<cbc:TaxExclusiveAmount currencyID="EUR">100.00</cbc:TaxExclusiveAmount>
<cbc:TaxInclusiveAmount currencyID="EUR">125.00</cbc:TaxInclusiveAmount>
<cbc:PayableAmount currencyID="EUR">125.00</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
<cac:InvoiceLine>
<cbc:ID>1</cbc:ID>
<cbc:InvoicedQuantity unitCode="C62">1</cbc:InvoicedQuantity>
<cbc:LineExtensionAmount currencyID="EUR">100.00</cbc:LineExtensionAmount>
<cac:Item>
<cbc:Name>Izmišljena usluga za provjeru</cbc:Name>
<cac:CommodityClassification>
<cbc:ItemClassificationCode listID="CG">62.10.11</cbc:ItemClassificationCode>
</cac:CommodityClassification>
<cac:ClassifiedTaxCategory>
<cbc:ID>S</cbc:ID>
<cbc:Percent>25</cbc:Percent>
<cac:TaxScheme>
<cbc:ID>VAT</cbc:ID>
</cac:TaxScheme>
</cac:ClassifiedTaxCategory>
</cac:Item>
<cac:Price>
<cbc:PriceAmount currencyID="EUR">100.00</cbc:PriceAmount>
<cbc:BaseQuantity unitCode="C62">1</cbc:BaseQuantity>
</cac:Price>
</cac:InvoiceLine>
</ubl:Invoice>
Uvjet iz izvornih pravila
[
{
"source": "EN16931 1.3.16 expanded source",
"kind": "assert",
"context": "cac:InvoiceLine | cac:CreditNoteLine",
"test": "(cac:Item/cac:ClassifiedTaxCategory[cac:TaxScheme/(normalize-space(upper-case(cbc:ID))='VAT')]/cbc:ID)",
"message": "[BR-CO-04]-Each Invoice line (BG-25) shall be categorized with an Invoiced item VAT category code (BT-151)."
}
]UBL 2.1 Invoice / CreditNote · EN16931 1.3.16 · HR-CIUS/EXT 13.3.2026, primjena 15.3.2026 · XSD + Schematron #ALL
Provjeri vlastiti XML · Sva pravila
Porezna uprava: dokumentacija · Izvori / Sources · JSON: testovi · Metoda i granice (Hrvatski)