Files
Web-NibblePoker/templates/applets/vat-calculator.jinja
2025-09-08 00:15:59 +02:00

296 lines
15 KiB
Django/Jinja

{%
set all_vat_data = [
["afghanistan",
[[10, "standard"]], [
"https://ard.gov.af/file_download/432/FAQs+of+VAT+English.pdf",
]],
["austria",
[[10, "reduced"],[13, "reduced"],[20, "standard"]], [
"https://www.usp.gv.at/en/themen/steuern-finanzen/umsatzsteuer-ueberblick/steuersaetze-und-steuerbefreiungen-der-umsatzsteuer.html",
]],
["belgium",
[[6, "reduced"],[12, "intermediate"],[21, "standard"]], [
"https://finance.belgium.be/en/enterprises/vat/vat-obligation/rates-and-calculation/vat-rates",
]],
["bulgaria",
[[9, "reduced"],[20, "standard"]], [
"https://www.bulgaria-tax-law.bg/vat-rates-eu-member-states.html"]],
["croatia",
[[5, "reduced"],[13, "reduced"],[25, "standard"]], [
"https://porezna-uprava.gov.hr/en/value-added-tax-h-e-reinafter-vat-information-on-the-general-rules-rates-and-exemptions-registering-for-and-paying-vat-obtaining-a-refund/7313",
]],
["cyprus",
[[3, "reduced"],[5, "reduced"],[9, "reduced"],[19, "standard"]], [
"https://www.mof.gov.cy/mof/tax/taxdep.nsf/All/6F2D9F654287FF02C2258251002C8130",
]],
["czechia",
[[12, "reduced"],[21, "standard"]], [
"https://portal.gov.cz/en/informace/general-rules-and-vat-rates-INF-205",
]],
["denmark",
[[25, "standard"]], [
"https://skat.dk/erhverv/moms/fradrag-for-moms",
]],
["estonia",
[[9, "reduced"],[13, "reduced"],[24, "standard"]], [
"https://www.emta.ee/en/business-client/taxes-and-payment/value-added-tax",
"https://www.e-resident.gov.ee/blog/posts/a-guide-to-vat-for-e-residents/",
]],
["finland",
[[10, "reduced"],[14, "reduced"],[25.5, "standard"]], [
"https://www.vero.fi/en/businesses-and-corporations/taxes-and-charges/vat/rates-of-vat/",
]],
["france",
[[2.1, "reduced"],[5.5, "reduced"],[10, "intermediate"],[20, "standard"]], [
"https://www.economie.gouv.fr/cedef/les-fiches-pratiques/quels-sont-les-taux-de-tva-en-vigueur-en-france-et-dans-lunion",
]],
["france.corsica",
[[0.9, "special"],[2.1, "reduced"],[5.5, "reduced"],[10, "intermediate"],[13, "special"],[20, "standard"]], [
"https://www.economie.gouv.fr/particuliers/impots-et-fiscalite/gerer-mes-autres-impots-et-taxes/tva-quels-sont-les-taux-de-votre",
]],
["germany",
[[7, "reduced"],[19, "standard"]], [
"https://www.bundesfinanzministerium.de/Content/DE/Downloads/BMF_Schreiben/Steuerarten/Umsatzsteuer/Merkblaetter/2024-03-05-Umsatzsteuer-Merkblatt-Personenbefoerderung-Kraftomnibusse-englisch.pdf",
]],
["greece",
[[6, "reduced.super"],[13, "reduced"],[24, "standard"]], [
"https://www.gov.gr/en/sdg/taxes/vat/general/basic-vat-rates",
]],
["hungary",
[[5, "preferential"],[18, "preferential"],[27, "standard"]], [
"https://nav.gov.hu/pfile/file?path=/en/taxation/taxinfo/vat-liabilities-of-foreign-marketers-in-hungary",
]],
["ireland",
[[4.8, "reduced"],[9, "reduced"],[13.5, "reduced"],[23, "standard"]], [
"https://www.revenue.ie/en/vat/vat-rates/search-vat-rates/current-vat-rates.aspx",
]],
["italy",
[[4, "reduced"],[5, "reduced"],[10, "reduced"],[22, "standard"]], [
"https://www.agenziaentrate.gov.it/portale/web/english/nse/services/vat-mini-one-stop-shop/faq/vat-rates",
"https://www.agenziaentrate.gov.it/portale/web/english/general-vat-rules-and-rates"
]],
["latvia",
[[5, "reduced"],[12, "reduced"],[21, "standard"]], [
"https://www.fm.gov.lv/lv/tax-rates",
]],
["lithuania",
[[5, "reduced"],[9, "reduced"],[21, "standard"]], [
"https://finmin.lrv.lt/en/competence-areas/taxation/main-taxes/value-added-tax/",
]],
["luxembourg",
[[3, "reduced.super"],[8, "reduced"],[14, "intermediate"],[17, "standard"]], [
"https://logistics.public.lu/en/formalities-procedures/taxes/value-added-tax/national-operations.html",
]],
["malta",
[[5, "reduced"],[7, "reduced"],[12, "reduced"],[18, "standard"]], [
"https://mtca.gov.mt/business-tax/vat1/vat-compliance/vat-rates/vat-rates",
]],
["monaco",
[[2.1, "reduced"],[5.5, "reduced"],[10, "intermediate"],[20, "standard"]], [
"https://monentreprise.gouv.mc/en/themes/accounting-obligations-and-tax/tax/vat",
"https://www.economie.gouv.fr/particuliers/impots-et-fiscalite/gerer-mes-autres-impots-et-taxes/tva-quels-sont-les-taux-de-votre"
]],
["netherlands",
[[9, "reduced"],[21, "standard"]], [
"https://business.gov.nl/regulation/vat-rates-exemptions/",
]],
["poland",
[[5, "reduced"],[8, "reduced"],[23, "standard"]], [
"https://www.podatki.gov.pl/en/value-added-tax/general-vat-rules-and-rates/list-of-vat-rates/",
]],
["portugal",
[[6, "reduced"],[13, "intermediate"],[23, "standard"]], [
"https://www2.gov.pt/en/cidadaos-europeus-viajar-viver-e-fazer-negocios-em-portugal/impostos-para-atividades-economicas-em-portugal/imposto-sobre-valor-acrescentado-iva-em-portugal",
]],
["portugal.azores",
[[4, "reduced"],[9, "intermediate"],[16, "standard"]], [
"https://www2.gov.pt/en/cidadaos-europeus-viajar-viver-e-fazer-negocios-em-portugal/impostos-para-atividades-economicas-em-portugal/imposto-sobre-valor-acrescentado-iva-em-portugal",
]],
["portugal.madeira",
[[5, "reduced"],[12, "intermediate"],[22, "standard"]], [
"https://www2.gov.pt/en/cidadaos-europeus-viajar-viver-e-fazer-negocios-em-portugal/impostos-para-atividades-economicas-em-portugal/imposto-sobre-valor-acrescentado-iva-em-portugal",
]],
["romania",
[[5, "reduced"],[9, "reduced"],[19, "standard"]], [
"https://mfinante.gov.ro/referinte-tva",
"https://www.mfinante.gov.ro/static/10/Mfp/legislatie/Ghid_TVA_parteaI.htm"
]],
["slovakia",
[[5, "reduced"],[19, "reduced"],[23, "standard"]], [
"https://www.slovensko.sk/en/life-situation/life-situation/_value-added-tax/",
]],
["slovenia",
[[9.5, "reduced"],[22, "standard"]], [
"https://www.fu.gov.si/en/taxes_and_other_duties/areas_of_work/value_added_tax_vat",
]],
["spain",
[[4, "reduced"],[10, "reduced"],[21, "standard"]], [
"https://sede.agenciatributaria.gob.es/Sede/en_gb/iva/calculo-iva-repercutido-clientes/tipos-impositivos-iva.html"
"https://sede.agenciatributaria.gob.es/Sede/iva.html",
]],
["sweden",
[[6, "reduced"],[12, "reduced"],[25, "standard"]], [
"https://www.skatteverket.se/servicelankar/otherlanguages/englishengelska/businessesandemployers/startingandrunningaswedishbusiness/declaringtaxesbusinesses/vat/vatratesandvatexemption.4.676f4884175c97df419255d.html",
]],
]
%}
<label for="vat-calculator-preset-short" class="mr-xxs">
{{ l10n("preset.label", "vat-calculator", user_lang) }}:
</label>
<select name="vat-calculator-preset-short" id="vat-calculator-preset-short" class="p-xxs border r-s">
<option value="" selected>{{ l10n("rate.option.custom", "vat-calculator", user_lang) }}</option>
<hr>
{% for country_vat_data in all_vat_data %}
<optgroup label="{{ l10n("country." + country_vat_data[0], "commons", user_lang) }}">
{% for country_vat_rate in country_vat_data[1] %}
<option value="{{ country_vat_rate[0] }}">
{{ country_vat_rate[0] }} %
</option>
{% endfor %}
</optgroup>
{% endfor %}
</select>
<label for="vat-calculator-preset-detailed" class="mr-xxs" hidden>
{{ l10n("preset.label", "vat-calculator", user_lang) }}:
</label>
<select name="vat-calculator-preset-detailed" id="vat-calculator-preset-detailed" class="p-xxs border r-s" hidden>
<option value="" selected>{{ l10n("rate.option.custom", "vat-calculator", user_lang) }}</option>
<hr>
{% for country_vat_data in all_vat_data %}
<optgroup label="{{ l10n("country." + country_vat_data[0], "commons", user_lang) }}">
{% for country_vat_rate in country_vat_data[1] %}
<option value="{{ country_vat_rate[0] }}">
{{ country_vat_rate[0] }} %&emsp;({{ l10n("rate.type." + country_vat_rate[1], "vat-calculator", user_lang) }})
</option>
{% endfor %}
</optgroup>
{% endfor %}
</select>
<span id="vat-calculator-preset-country-echo" class="t-muted ml-xs t-italic mobile-hide"></span>
<br>
<label for="vat-calculator-detailed-presets" class="mr-xxs">{{ l10n("option.detailed", "vat-calculator", user_lang) }}:</label>
<input id="vat-calculator-detailed-presets" class="r-m border cb-pretty" type="checkbox">
<hr class="subtle">
<!-- TODO: Implement iframe-able template for multi-instance applets on the same page -->
<table class="">
<tr>
<td>
<input type="radio" id="vat-calculator-radio-rate" name="vat_calc_target" value="0"
class="radio-solid border mr-xxs radio-unchecked-subtle">
<label for="vat-calculator-radio-rate">
{{ l10n("radio.rate", "vat-calculator", user_lang) }}
</label>
</td>
<td>
<label for="vat-calculator-input-rate" class="mr-xs"></label>
<input id="vat-calculator-input-rate" class="p-xxs border r-s" type="number" min="0">
{% if not is_standalone %}<i class="fa-duotone fa-solid fa-percent ml-xxs t-muted"></i>{% else %}%{% endif %}
</td>
</tr>
<tr>
<td class="pt-xxs">
<input type="radio" id="vat-calculator-radio-untaxed" name="vat_calc_target" value="1"
class="radio-solid border mr-xxs radio-unchecked-subtle" checked>
<label for="vat-calculator-radio-untaxed">
{{ l10n("radio.untaxed", "vat-calculator", user_lang) }}
</label>
</td>
<td class="pt-xxs">
<label for="vat-calculator-input-untaxed" class="mr-xs"></label>
<input id="vat-calculator-input-untaxed" class="p-xxs border r-s bkgd-gray" type="number" min="0" readonly>
{% if not is_standalone %}<i class="fa-duotone fa-solid fa-money-bill ml-xxs t-muted"></i>{% endif %}
</td>
</tr>
<tr>
<td class="pt-xxs">
<input type="radio" id="vat-calculator-radio-taxed" name="vat_calc_target" value="2"
class="radio-solid border mr-xxs radio-unchecked-subtle">
<label for="vat-calculator-radio-taxed">
{{ l10n("radio.taxed", "vat-calculator", user_lang) }}
</label>
</td>
<td class="pt-xxs">
<label for="vat-calculator-input-taxed" class="mr-xs"></label>
<input id="vat-calculator-input-taxed" class="p-xxs border r-s" type="number" min="0">
{% if not is_standalone %}<i class="fa-duotone fa-solid fa-money-bill ml-xxs t-muted"></i>{% endif %}
</td>
</tr>
</table>
<p class="t-muted ml-xs mt-xs t-italic">{{ l10n("text.radio.explanation", "vat-calculator", user_lang) }}</p>
<hr class="subtle">
<label for="vat-calculator-rounding-mode" class="mr-xxs">
{{ l10n("rounding.mode.label", "vat-calculator", user_lang) }}:
</label>
<select name="vat-calculator-rounding-mode" id="vat-calculator-rounding-mode" class="p-xxs border r-s">
<optgroup label="{{ l10n("rounding.mode.group.regular", "vat-calculator", user_lang) }}">
<option value="0" selected>{{ l10n("rounding.mode.up", "vat-calculator", user_lang) }}</option>
<option value="1">{{ l10n("rounding.mode.down", "vat-calculator", user_lang) }}</option>
<option value="2">{{ l10n("rounding.mode.ceil", "vat-calculator", user_lang) }}</option>
<option value="3">{{ l10n("rounding.mode.floor", "vat-calculator", user_lang) }}</option>
</optgroup>
<optgroup label="{{ l10n("rounding.mode.group.half", "vat-calculator", user_lang) }}">
<option value="4">{{ l10n("rounding.mode.up.half", "vat-calculator", user_lang) }}</option>
<option value="5">{{ l10n("rounding.mode.down.half", "vat-calculator", user_lang) }}</option>
<option value="6">{{ l10n("rounding.mode.even.half", "vat-calculator", user_lang) }}</option>
<option value="7">{{ l10n("rounding.mode.ceil.half", "vat-calculator", user_lang) }}</option>
<option value="8">{{ l10n("rounding.mode.floor.half", "vat-calculator", user_lang) }}</option>
</optgroup>
</select>
<br>
<label for="vat-calculator-option-decimal-places" class="mr-xs">{{ l10n("option.decimal-places", "vat-calculator", user_lang) }}:</label>
<button id="vat-calculator-decimal-places-minus" class="p-xxs border br-0 rl-s {% if is_standalone %}px-xs{% endif %}">
{% if not is_standalone %}<i class="fa-duotone fa-solid fa-minus"></i>{% else %}-{% endif %}
</button>
<input id="vat-calculator-option-decimal-places" class="p-xxs border" type="number" value="2" min="0" max="99">
<button id="vat-calculator-decimal-places-plus" class="p-xxs border bl-0 rr-s {% if is_standalone %}px-xs{% endif %}">
{% if not is_standalone %}<i class="fa-duotone fa-solid fa-plus"></i>{% else %}+{% endif %}
</button>
<br hidden>
<label for="vat-calculator-detailed-trim-zeroes" class="mr-xxs" hidden>{{ l10n("option.trim-zeroes", "vat-calculator", user_lang) }}:</label>
<input id="vat-calculator-detailed-trim-zeroes" class="r-m border cb-pretty" type="checkbox" hidden>
<!--<hr class="subtle">
<details class="border bkgd-dark r-m mt-s">
<summary class="p-xs">Click to show/hide all classes</summary>
<div class="p-xs bt bkgd-grey">
<p>
<span class="code mr-xs">p-0</span>
</p>
</div>
</details>-->
{% if is_standalone %}
<hr class="subtle">
<p class="t-half-muted">
{{ l10n("license.text.1", "vat-calculator", user_lang) }}<br>
{{ l10n("license.text.2", "vat-calculator", user_lang) }}
</p>
{% endif %}