Importing a line-item document with a foreign VAT country fails with an error:
U netextové položky musíte zvolit sazbu DPH.
The error message might tempt you to add a rate to the line item — but for non-EU countries, that won't help. The actual cause lies elsewhere.
Why this happens
In Flexi, VAT rates are maintained per individual country in the sazba-dph register. If you specify a statDph on the document for a country for which no valid rate exists (typically a non-EU country), Flexi has nothing to assign to the line item. Adding typSzbDphK or clenDph does not resolve the situation — the import then fails with a second error:
Pro daný typ sazby […], datum […] a stát [Spojené státy americké] neexistuje platná sazba DPH.
The list of countries for which rates exist is available at /c/{firma}/sazba-dph.xml?detail=custom:stat,szbDphZakl,platiOd&limit=0.
How to issue the document
Export outside the EU — leave the domestic
statDph(code:CZ) on the document and specify an exempt transaction on the line item:<typSzbDphK>typSzbDph.dphOsv</typSzbDphK>. The document will pass and VAT will come out as zero.Country within the EU — it is enough to specify
statDph; rates for EU countries are already prepared in the register, and the document will pass even without specifying a rate on the line item.If you really need the rate of a foreign country, it must be set up in the
sazba-dphregister for the given country and date.The VAT line can also be sent manually in the
clenDphfield. Keep in mind, however, that Flexi may overwrite it with the corresponding default line based on the rate type and the company's settings.
⚠️ When writing the VAT line by code, it is looked up within the country specified on the document. Combining a domestic statDph with a Slovak line will therefore end with the Nebyl nalezen záznam dle parametrů: stat=CZ error — this is described in the article Error: No record found for parameters: stat=CZ.
