From 7f17075951ef364278c3067498a7402c0ffe6c54 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 11 Mar 2023 23:38:18 +0100 Subject: [PATCH] too many changes --- Admin/Install/db.json | 75 + Admin/Install/taxcodes.json | 2716 ++++++++++++++++++++++++++++++++++ Admin/Installer.php | 76 + Controller/ApiController.php | 182 +++ Models/EUVATRates.php | 197 +++ Models/NullTaxCode.php | 46 + Models/NullTaxCodeL11n.php | 46 + Models/TaxCode.php | 83 ++ Models/TaxCodeL11n.php | 145 ++ Models/TaxCodeL11nMapper.php | 59 + Models/TaxCodeMapper.php | 73 + composer.json | 2 +- info.json | 2 +- 13 files changed, 3700 insertions(+), 2 deletions(-) create mode 100644 Admin/Install/db.json create mode 100644 Admin/Install/taxcodes.json create mode 100644 Controller/ApiController.php create mode 100644 Models/EUVATRates.php create mode 100644 Models/NullTaxCode.php create mode 100644 Models/NullTaxCodeL11n.php create mode 100644 Models/TaxCode.php create mode 100644 Models/TaxCodeL11n.php create mode 100644 Models/TaxCodeL11nMapper.php create mode 100644 Models/TaxCodeMapper.php diff --git a/Admin/Install/db.json b/Admin/Install/db.json new file mode 100644 index 0000000..1a2754d --- /dev/null +++ b/Admin/Install/db.json @@ -0,0 +1,75 @@ +{ + "tax_code": { + "name": "tax_code", + "fields": { + "tax_code_id": { + "name": "tax_code_id", + "type": "INT", + "null": false, + "primary": true, + "autoincrement": true + }, + "tax_code_abbr": { + "name": "tax_code_abbr", + "type": "VARCHAR(255)", + "null": false + }, + "tax_code_invoice": { + "name": "tax_code_invoice", + "type": "INT(11)", + "null": false + }, + "tax_code_sales": { + "name": "tax_code_sales", + "type": "INT(11)", + "null": false + }, + "tax_code_input": { + "name": "tax_code_input", + "type": "INT(11)", + "null": false + } + } + }, + "tax_code_l11n": { + "name": "tax_code_l11n", + "fields": { + "tax_code_l11n_id": { + "name": "tax_code_l11n_id", + "type": "INT", + "null": false, + "primary": true, + "autoincrement": true + }, + "tax_code_l11n_text_title": { + "name": "tax_code_l11n_text_title", + "type": "VARCHAR(255)", + "null": false + }, + "tax_code_l11n_text_short": { + "name": "tax_code_l11n_text_short", + "type": "VARCHAR(255)", + "null": false + }, + "tax_code_l11n_text_long": { + "name": "tax_code_l11n_text_long", + "type": "VARCHAR(255)", + "null": false + }, + "tax_code_l11n_lang": { + "name": "tax_code_l11n_lang", + "type": "VARCHAR(2)", + "null": false, + "foreignTable": "language", + "foreignKey": "language_639_1" + }, + "tax_code_l11n_code": { + "name": "tax_code_l11n_code", + "type": "INT(11)", + "null": false, + "foreignTable": "tax_code", + "foreignKey": "tax_code_id" + } + } + } +} \ No newline at end of file diff --git a/Admin/Install/taxcodes.json b/Admin/Install/taxcodes.json new file mode 100644 index 0000000..b27c01d --- /dev/null +++ b/Admin/Install/taxcodes.json @@ -0,0 +1,2716 @@ +{ + "S0": { + "abbr": "S0", + "percentage_invoice": 0, + "percentage_sales_tax": 0, + "percentage_input_tax": 0, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [ + ], + "l11n": { + "de": { + "title": "S0", + "short": "", + "long": "" + } + } + }, + "DE_V0": { + "abbr": "DE_V0", + "percentage_invoice": 0, + "percentage_sales_tax": 0, + "percentage_input_tax": 0, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [ + ], + "l11n": { + "de": { + "title": "DE_V0", + "short": "", + "long": "" + } + } + }, + "DE_V07": { + "abbr": "DE_V07", + "percentage_invoice": 700, + "percentage_sales_tax": 700, + "percentage_input_tax": 700, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [ + ], + "l11n": { + "de": { + "title": "DE_V07", + "short": "", + "long": "" + } + } + }, + "DE_V19": { + "abbr": "DE_V19", + "percentage_invoice": 1900, + "percentage_sales_tax": 1900, + "percentage_input_tax": 1900, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [ + ], + "l11n": { + "de": { + "title": "DE_V19", + "short": "", + "long": "" + } + } + }, + "DE_M0": { + "abbr": "DE_M0", + "percentage_invoice": 0, + "percentage_sales_tax": 0, + "percentage_input_tax": 0, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [ + ], + "l11n": { + "de": { + "title": "DE_M0", + "short": "", + "long": "" + } + } + }, + "DE_M07": { + "abbr": "DE_M07", + "percentage_invoice": 700, + "percentage_sales_tax": 700, + "percentage_input_tax": 700, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [ + ], + "l11n": { + "de": { + "title": "DE_M07", + "short": "", + "long": "" + } + } + }, + "DE_M19": { + "abbr": "DE_M19", + "percentage_invoice": 1900, + "percentage_sales_tax": 1900, + "percentage_input_tax": 1900, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [ + ], + "l11n": { + "de": { + "title": "DE_M19", + "short": "", + "long": "" + } + } + }, + "DE_E19": { + "abbr": "DE_E19", + "percentage_invoice": 0, + "percentage_sales_tax": 1900, + "percentage_input_tax": 1900, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [ + ], + "l11n": { + "de": { + "title": "Reverse Charge", + "short": "", + "long": "Reverse Charge" + }, + "en": { + "title": "Reverse Charge", + "short": "", + "long": "Reverse Charge" + } + } + }, + "EU_S0": { + "abbr": "EU_S0", + "percentage_invoice": 0, + "percentage_sales_tax": 0, + "percentage_input_tax": 0, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [ + "ZM" + ], + "l11n": { + "de": { + "title": "Reverse Charge", + "short": "", + "long": "Reverse Charge" + }, + "en": { + "title": "Reverse Charge", + "short": "", + "long": "Reverse Charge" + } + } + }, + "AT_S20": { + "abbr": "AT_S20", + + "percentage_invoice": 2000, + "percentage_sales_tax": 2000, + "percentage_input_tax": 2000, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. AT 20%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT AT 20%", + "short": "", + "long": "" + } + } + }, + "AT_S13": { + "abbr": "AT_S13", + "percentage_invoice": 1300, + "percentage_sales_tax": 1300, + "percentage_input_tax": 1300, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. AT 13%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT AT 13%", + "short": "", + "long": "" + } + } + }, + "AT_S10": { + "abbr": "AT_S10", + "percentage_invoice": 1000, + "percentage_sales_tax": 1000, + "percentage_input_tax": 1000, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. AT 10%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT AT 10%", + "short": "", + "long": "" + } + } + }, + "AT_S0": { + "abbr": "AT_S0", + "percentage_invoice": 0, + "percentage_sales_tax": 0, + "percentage_input_tax": 0, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. AT 0%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT AT 0%", + "short": "", + "long": "" + } + } + }, + "BE_S21": { + "abbr": "BE_S21", + "percentage_invoice": 2100, + "percentage_sales_tax": 2100, + "percentage_input_tax": 2100, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. BE 21%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT BE 21%", + "short": "", + "long": "" + } + } + }, + "BE_S12": { + "abbr": "BE_S12", + "percentage_invoice": 1200, + "percentage_sales_tax": 1200, + "percentage_input_tax": 1200, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. BE 12%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT BE 12%", + "short": "", + "long": "" + } + } + }, + "BE_S6": { + "abbr": "BE_S6", + "percentage_invoice": 600, + "percentage_sales_tax": 600, + "percentage_input_tax": 600, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. BE 6%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT BE 6%", + "short": "", + "long": "" + } + } + }, + "BE_S0": { + "abbr": "BE_S0", + "percentage_invoice": 0, + "percentage_sales_tax": 0, + "percentage_input_tax": 0, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. BE 0%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT BE 0%", + "short": "", + "long": "" + } + } + }, + "BG_S20": { + "abbr": "BG_S20", + "percentage_invoice": 2000, + "percentage_sales_tax": 2000, + "percentage_input_tax": 2000, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. BG 20%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT BG 20%", + "short": "", + "long": "" + } + } + }, + "BG_S21": { + "abbr": "BG_S21", + "percentage_invoice": 2100, + "percentage_sales_tax": 2100, + "percentage_input_tax": 2100, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. BG 21%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT BG 21%", + "short": "", + "long": "" + } + } + }, + "BG_S10": { + "abbr": "BG_S10", + "percentage_invoice": 1000, + "percentage_sales_tax": 1000, + "percentage_input_tax": 1000, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. BG 10%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT BG 10%", + "short": "", + "long": "" + } + } + }, + "BG_S9": { + "abbr": "BG_S9", + "percentage_invoice": 900, + "percentage_sales_tax": 900, + "percentage_input_tax": 900, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. BG 9%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT BG 9%", + "short": "", + "long": "" + } + } + }, + "BG_S0": { + "abbr": "BG_S0", + "percentage_invoice": 0, + "percentage_sales_tax": 0, + "percentage_input_tax": 0, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. BG 0%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT BG 0%", + "short": "", + "long": "" + } + } + }, + "HR_S25": { + "abbr": "HR_S25", + "percentage_invoice": 2500, + "percentage_sales_tax": 2500, + "percentage_input_tax": 2500, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. HR 25%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT HR 25%", + "short": "", + "long": "" + } + } + }, + "HR_S13": { + "abbr": "HR_S13", + "percentage_invoice": 1300, + "percentage_sales_tax": 1300, + "percentage_input_tax": 1300, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. HR 13%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT HR 13%", + "short": "", + "long": "" + } + } + }, + "HR_S5": { + "abbr": "HR_S5", + "percentage_invoice": 500, + "percentage_sales_tax": 500, + "percentage_input_tax": 500, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. HR 5%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT HR 5%", + "short": "", + "long": "" + } + } + }, + "HR_S0": { + "abbr": "HR_S0", + "percentage_invoice": 0, + "percentage_sales_tax": 0, + "percentage_input_tax": 0, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. HR 0%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT HR 0%", + "short": "", + "long": "" + } + } + }, + "CY_S19": { + "abbr": "CY_S19", + "percentage_invoice": 1900, + "percentage_sales_tax": 1900, + "percentage_input_tax": 1900, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. CY 19%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT CY 19%", + "short": "", + "long": "" + } + } + }, + "CY_S9": { + "abbr": "CY_S9", + "percentage_invoice": 900, + "percentage_sales_tax": 900, + "percentage_input_tax": 900, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. CY 9%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT CY 9%", + "short": "", + "long": "" + } + } + }, + "CY_S5": { + "abbr": "CY_S5", + "percentage_invoice": 500, + "percentage_sales_tax": 500, + "percentage_input_tax": 500, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. CY 5%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT CY 5%", + "short": "", + "long": "" + } + } + }, + "CY_S0": { + "abbr": "CY_S0", + "percentage_invoice": 0, + "percentage_sales_tax": 0, + "percentage_input_tax": 0, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. CY 0%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT CY 0%", + "short": "", + "long": "" + } + } + }, + "CZ_S21": { + "abbr": "CZ_S21", + "percentage_invoice": 2100, + "percentage_sales_tax": 2100, + "percentage_input_tax": 2100, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. CZ 21%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT CZ 21%", + "short": "", + "long": "" + } + } + }, + "CZ_S15": { + "abbr": "CZ_S15", + "percentage_invoice": 1500, + "percentage_sales_tax": 1500, + "percentage_input_tax": 1500, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. CZ 15%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT CZ 15%", + "short": "", + "long": "" + } + } + }, + "CZ_S10": { + "abbr": "CZ_S10", + "percentage_invoice": 1000, + "percentage_sales_tax": 1000, + "percentage_input_tax": 1000, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. CZ 10%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT CZ 10%", + "short": "", + "long": "" + } + } + }, + "CZ_S0": { + "abbr": "CZ_S0", + "percentage_invoice": 0, + "percentage_sales_tax": 0, + "percentage_input_tax": 0, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. CZ 0%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT CZ 0%", + "short": "", + "long": "" + } + } + }, + "DK_S25": { + "abbr": "DK_S25", + "percentage_invoice": 2500, + "percentage_sales_tax": 2500, + "percentage_input_tax": 2500, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. DK 25%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT DK 25%", + "short": "", + "long": "" + } + } + }, + "DK_S0": { + "abbr": "DK_S0", + "percentage_invoice": 0, + "percentage_sales_tax": 0, + "percentage_input_tax": 0, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. DK 0%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT DK 0%", + "short": "", + "long": "" + } + } + }, + "EE_S20": { + "abbr": "EE_S20", + "percentage_invoice": 2000, + "percentage_sales_tax": 2000, + "percentage_input_tax": 2000, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. EE 20%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT EE 20%", + "short": "", + "long": "" + } + } + }, + "EE_S9": { + "abbr": "EE_S9", + "percentage_invoice": 900, + "percentage_sales_tax": 900, + "percentage_input_tax": 900, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. EE 9%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT EE 9%", + "short": "", + "long": "" + } + } + }, + "EE_S0": { + "abbr": "EE_S0", + "percentage_invoice": 0, + "percentage_sales_tax": 0, + "percentage_input_tax": 0, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. EE 0%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT EE 0%", + "short": "", + "long": "" + } + } + }, + "FI_S24": { + "abbr": "FI_S24", + "percentage_invoice": 2400, + "percentage_sales_tax": 2400, + "percentage_input_tax": 2400, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. FI 24%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT FI 24%", + "short": "", + "long": "" + } + } + }, + "FI_S14": { + "abbr": "FI_S14", + "percentage_invoice": 1400, + "percentage_sales_tax": 1400, + "percentage_input_tax": 1400, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. FI 14%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT FI 14%", + "short": "", + "long": "" + } + } + }, + "FI_S10": { + "abbr": "FI_S10", + "percentage_invoice": 1000, + "percentage_sales_tax": 1000, + "percentage_input_tax": 1000, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. FI 10%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT FI 10%", + "short": "", + "long": "" + } + } + }, + "FI_S0": { + "abbr": "FI_S0", + "percentage_invoice": 0, + "percentage_sales_tax": 0, + "percentage_input_tax": 0, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. FI 0%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT FI 0%", + "short": "", + "long": "" + } + } + }, + "FR_S20": { + "abbr": "FR_S20", + "percentage_invoice": 2000, + "percentage_sales_tax": 2000, + "percentage_input_tax": 2000, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. FR 20%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT FR 20%", + "short": "", + "long": "" + } + } + }, + "FR_S10": { + "abbr": "FR_S10", + "percentage_invoice": 1000, + "percentage_sales_tax": 1000, + "percentage_input_tax": 1000, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. FR 10%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT FR 10%", + "short": "", + "long": "" + } + } + }, + "FR_S5.5": { + "abbr": "FR_S5.5", + "percentage_invoice": 550, + "percentage_sales_tax": 550, + "percentage_input_tax": 550, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. FR 5.5%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT FR 5.5%", + "short": "", + "long": "" + } + } + }, + "FR_S2.1": { + "abbr": "FR_S2.1", + "percentage_invoice": 210, + "percentage_sales_tax": 210, + "percentage_input_tax": 210, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. FR 2.1%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT FR 2.1%", + "short": "", + "long": "" + } + } + }, + "FR_S0": { + "abbr": "FR_S0", + "percentage_invoice": 0, + "percentage_sales_tax": 0, + "percentage_input_tax": 0, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. FR 0%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT FR 0%", + "short": "", + "long": "" + } + } + }, + "DE_S19": { + "abbr": "DE_S19", + "percentage_invoice": 1900, + "percentage_sales_tax": 1900, + "percentage_input_tax": 1900, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. DE 19%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT DE 19%", + "short": "", + "long": "" + } + } + }, + "DE_S7": { + "abbr": "DE_S7", + "percentage_invoice": 700, + "percentage_sales_tax": 700, + "percentage_input_tax": 700, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. DE 7%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT DE 7%", + "short": "", + "long": "" + } + } + }, + "DE_S0": { + "abbr": "DE_S0", + "percentage_invoice": 0, + "percentage_sales_tax": 0, + "percentage_input_tax": 0, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. DE 0%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT DE 0%", + "short": "", + "long": "" + } + } + }, + "GR_S24": { + "abbr": "GR_S24", + "percentage_invoice": 2400, + "percentage_sales_tax": 2400, + "percentage_input_tax": 2400, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. GR 24%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT GR 24%", + "short": "", + "long": "" + } + } + }, + "GR_S13": { + "abbr": "GR_S13", + "percentage_invoice": 1300, + "percentage_sales_tax": 1300, + "percentage_input_tax": 1300, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. GR 13%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT GR 13%", + "short": "", + "long": "" + } + } + }, + "GR_S6": { + "abbr": "GR_S6", + "percentage_invoice": 600, + "percentage_sales_tax": 600, + "percentage_input_tax": 600, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. GR 6%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT GR 6%", + "short": "", + "long": "" + } + } + }, + "GR_S0": { + "abbr": "GR_S0", + "percentage_invoice": 0, + "percentage_sales_tax": 0, + "percentage_input_tax": 0, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. GR 0%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT GR 0%", + "short": "", + "long": "" + } + } + }, + "HU_S27": { + "abbr": "HU_S27", + "percentage_invoice": 2700, + "percentage_sales_tax": 2700, + "percentage_input_tax": 2700, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. HU 27%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT HU 27%", + "short": "", + "long": "" + } + } + }, + "HU_S18": { + "abbr": "HU_S18", + "percentage_invoice": 1800, + "percentage_sales_tax": 1800, + "percentage_input_tax": 1800, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. HU 18%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT HU 18%", + "short": "", + "long": "" + } + } + }, + "HU_S5": { + "abbr": "HU_S5", + "percentage_invoice": 500, + "percentage_sales_tax": 500, + "percentage_input_tax": 500, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. HU 5%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT HU 5%", + "short": "", + "long": "" + } + } + }, + "HU_S0": { + "abbr": "HU_S0", + "percentage_invoice": 0, + "percentage_sales_tax": 0, + "percentage_input_tax": 0, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. HU 0%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT HU 0%", + "short": "", + "long": "" + } + } + }, + "IE_S23": { + "abbr": "IE_S23", + "percentage_invoice": 2300, + "percentage_sales_tax": 2300, + "percentage_input_tax": 2300, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. IE 23%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT IE 23%", + "short": "", + "long": "" + } + } + }, + "IE_S13.5": { + "abbr": "IE_S13.5", + "percentage_invoice": 1350, + "percentage_sales_tax": 1350, + "percentage_input_tax": 1350, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. IE 13.5%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT IE 13.5%", + "short": "", + "long": "" + } + } + }, + "IE_S9": { + "abbr": "IE_S9", + "percentage_invoice": 900, + "percentage_sales_tax": 900, + "percentage_input_tax": 900, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. IE 9%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT IE 9%", + "short": "", + "long": "" + } + } + }, + "IE_S4.8": { + "abbr": "IE_S4.8", + "percentage_invoice": 480, + "percentage_sales_tax": 480, + "percentage_input_tax": 480, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. IE 4.8%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT IE 4.8%", + "short": "", + "long": "" + } + } + }, + "IE_S0": { + "abbr": "IE_S0", + "percentage_invoice": 0, + "percentage_sales_tax": 0, + "percentage_input_tax": 0, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. IE 0%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT IE 0%", + "short": "", + "long": "" + } + } + }, + "IT_S22": { + "abbr": "IT_S22", + "percentage_invoice": 2200, + "percentage_sales_tax": 2200, + "percentage_input_tax": 2200, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. IT 22%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT IT 22%", + "short": "", + "long": "" + } + } + }, + "IT_S10": { + "abbr": "IT_S10", + "percentage_invoice": 1000, + "percentage_sales_tax": 1000, + "percentage_input_tax": 1000, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. IT 10%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT IT 10%", + "short": "", + "long": "" + } + } + }, + "IT_S5": { + "abbr": "IT_S5", + "percentage_invoice": 500, + "percentage_sales_tax": 500, + "percentage_input_tax": 500, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. IT 5%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT IT 5%", + "short": "", + "long": "" + } + } + }, + "IT_S4": { + "abbr": "IT_S4", + "percentage_invoice": 400, + "percentage_sales_tax": 400, + "percentage_input_tax": 400, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. IT 4%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT IT 4%", + "short": "", + "long": "" + } + } + }, + "IT_S0": { + "abbr": "IT_S0", + "percentage_invoice": 0, + "percentage_sales_tax": 0, + "percentage_input_tax": 0, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. IT 0%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT IT 0%", + "short": "", + "long": "" + } + } + }, + "LV_S21": { + "abbr": "LV_S21", + "percentage_invoice": 2100, + "percentage_sales_tax": 2100, + "percentage_input_tax": 2100, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. LV 21%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT LV 21%", + "short": "", + "long": "" + } + } + }, + "LV_S12": { + "abbr": "LV_S12", + "percentage_invoice": 1200, + "percentage_sales_tax": 1200, + "percentage_input_tax": 1200, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. LV 12%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT LV 12%", + "short": "", + "long": "" + } + } + }, + "LV_S5": { + "abbr": "LV_S5", + "percentage_invoice": 500, + "percentage_sales_tax": 500, + "percentage_input_tax": 500, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. LV 5%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT LV 5%", + "short": "", + "long": "" + } + } + }, + "LV_S0": { + "abbr": "LV_S0", + "percentage_invoice": 0, + "percentage_sales_tax": 0, + "percentage_input_tax": 0, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. LV 0%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT LV 0%", + "short": "", + "long": "" + } + } + }, + "LT_S21": { + "abbr": "LT_S21", + "percentage_invoice": 2100, + "percentage_sales_tax": 2100, + "percentage_input_tax": 2100, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. LT 21%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT LT 21%", + "short": "", + "long": "" + } + } + }, + "LT_S9": { + "abbr": "LT_S9", + "percentage_invoice": 900, + "percentage_sales_tax": 900, + "percentage_input_tax": 900, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. LT 9%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT LT 9%", + "short": "", + "long": "" + } + } + }, + "LT_S5": { + "abbr": "LT_S5", + "percentage_invoice": 500, + "percentage_sales_tax": 500, + "percentage_input_tax": 500, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. LT 5%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT LT 5%", + "short": "", + "long": "" + } + } + }, + "LT_S0": { + "abbr": "LT_S0", + "percentage_invoice": 0, + "percentage_sales_tax": 0, + "percentage_input_tax": 0, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. LT 0%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT LT 0%", + "short": "", + "long": "" + } + } + }, + "LU_S17": { + "abbr": "LU_S17", + "percentage_invoice": 1700, + "percentage_sales_tax": 1700, + "percentage_input_tax": 1700, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. LU 17%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT LU 17%", + "short": "", + "long": "" + } + } + }, + "LU_S14": { + "abbr": "LU_S14", + "percentage_invoice": 1400, + "percentage_sales_tax": 1400, + "percentage_input_tax": 1400, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. LU 14%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT LU 14%", + "short": "", + "long": "" + } + } + }, + "LU_S8": { + "abbr": "LU_S8", + "percentage_invoice": 800, + "percentage_sales_tax": 800, + "percentage_input_tax": 800, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. LU 8%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT LU 8%", + "short": "", + "long": "" + } + } + }, + "LU_S3": { + "abbr": "LU_S3", + "percentage_invoice": 300, + "percentage_sales_tax": 300, + "percentage_input_tax": 300, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. LU 3%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT LU 3%", + "short": "", + "long": "" + } + } + }, + "LU_S0": { + "abbr": "LU_S0", + "percentage_invoice": 0, + "percentage_sales_tax": 0, + "percentage_input_tax": 0, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. LU 0%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT LU 0%", + "short": "", + "long": "" + } + } + }, + "MT_S18": { + "abbr": "MT_S18", + "percentage_invoice": 1800, + "percentage_sales_tax": 1800, + "percentage_input_tax": 1800, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. MT 18%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT MT 18%", + "short": "", + "long": "" + } + } + }, + "MT_S7": { + "abbr": "MT_S7", + "percentage_invoice": 700, + "percentage_sales_tax": 700, + "percentage_input_tax": 700, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. MT 7%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT MT 7%", + "short": "", + "long": "" + } + } + }, + "MT_S5": { + "abbr": "MT_S5", + "percentage_invoice": 500, + "percentage_sales_tax": 500, + "percentage_input_tax": 500, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. MT 5%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT MT 5%", + "short": "", + "long": "" + } + } + }, + "MT_S0": { + "abbr": "MT_S0", + "percentage_invoice": 0, + "percentage_sales_tax": 0, + "percentage_input_tax": 0, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. MT 0%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT MT 0%", + "short": "", + "long": "" + } + } + }, + "NL_S21": { + "abbr": "NL_S21", + "percentage_invoice": 2100, + "percentage_sales_tax": 2100, + "percentage_input_tax": 2100, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. NL 21%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT NL 21%", + "short": "", + "long": "" + } + } + }, + "NL_S9": { + "abbr": "NL_S9", + "percentage_invoice": 900, + "percentage_sales_tax": 900, + "percentage_input_tax": 900, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. NL 9%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT NL 9%", + "short": "", + "long": "" + } + } + }, + "NL_S0": { + "abbr": "NL_S0", + "percentage_invoice": 0, + "percentage_sales_tax": 0, + "percentage_input_tax": 0, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. NL 0%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT NL 0%", + "short": "", + "long": "" + } + } + }, + "PL_S23": { + "abbr": "PL_S23", + "percentage_invoice": 2300, + "percentage_sales_tax": 2300, + "percentage_input_tax": 2300, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. PL 23%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT PL 23%", + "short": "", + "long": "" + } + } + }, + "PL_S8": { + "abbr": "PL_S8", + "percentage_invoice": 800, + "percentage_sales_tax": 800, + "percentage_input_tax": 800, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. PL 8%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT PL 8%", + "short": "", + "long": "" + } + } + }, + "PL_S5": { + "abbr": "PL_S5", + "percentage_invoice": 500, + "percentage_sales_tax": 500, + "percentage_input_tax": 500, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. PL 5%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT PL 5%", + "short": "", + "long": "" + } + } + }, + "PL_S0": { + "abbr": "PL_S0", + "percentage_invoice": 0, + "percentage_sales_tax": 0, + "percentage_input_tax": 0, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. PL 0%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT PL 0%", + "short": "", + "long": "" + } + } + }, + "PT_S23": { + "abbr": "PT_S23", + "percentage_invoice": 2300, + "percentage_sales_tax": 2300, + "percentage_input_tax": 2300, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. PT 23%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT PT 23%", + "short": "", + "long": "" + } + } + }, + "PT_S13": { + "abbr": "PT_S13", + "percentage_invoice": 1300, + "percentage_sales_tax": 1300, + "percentage_input_tax": 1300, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. PT 13%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT PT 13%", + "short": "", + "long": "" + } + } + }, + "PT_S6": { + "abbr": "PT_S6", + "percentage_invoice": 600, + "percentage_sales_tax": 600, + "percentage_input_tax": 600, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. PT 6%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT PT 6%", + "short": "", + "long": "" + } + } + }, + "PT_S0": { + "abbr": "PT_S0", + "percentage_invoice": 0, + "percentage_sales_tax": 0, + "percentage_input_tax": 0, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. PT 0%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT PT 0%", + "short": "", + "long": "" + } + } + }, + "RO_S19": { + "abbr": "RO_S19", + "percentage_invoice": 1900, + "percentage_sales_tax": 1900, + "percentage_input_tax": 1900, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. RO 19%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT RO 19%", + "short": "", + "long": "" + } + } + }, + "RO_S9": { + "abbr": "RO_S9", + "percentage_invoice": 900, + "percentage_sales_tax": 900, + "percentage_input_tax": 900, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. RO 9%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT RO 9%", + "short": "", + "long": "" + } + } + }, + "RO_S5": { + "abbr": "RO_S5", + "percentage_invoice": 500, + "percentage_sales_tax": 500, + "percentage_input_tax": 500, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. RO 5%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT RO 5%", + "short": "", + "long": "" + } + } + }, + "RO_S0": { + "abbr": "RO_S0", + "percentage_invoice": 0, + "percentage_sales_tax": 0, + "percentage_input_tax": 0, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. RO 0%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT RO 0%", + "short": "", + "long": "" + } + } + }, + "SK_S20": { + "abbr": "SK_S20", + "percentage_invoice": 2000, + "percentage_sales_tax": 2000, + "percentage_input_tax": 2000, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. SK 20%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT SK 20%", + "short": "", + "long": "" + } + } + }, + "SK_S10": { + "abbr": "SK_S10", + "percentage_invoice": 1000, + "percentage_sales_tax": 1000, + "percentage_input_tax": 1000, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. SK 10%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT SK 10%", + "short": "", + "long": "" + } + } + }, + "SK_S0": { + "abbr": "SK_S0", + "percentage_invoice": 0, + "percentage_sales_tax": 0, + "percentage_input_tax": 0, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. SK 0%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT SK 0%", + "short": "", + "long": "" + } + } + }, + "SI_S22": { + "abbr": "SI_S22", + "percentage_invoice": 2200, + "percentage_sales_tax": 2200, + "percentage_input_tax": 2200, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. SI 22%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT SI 22%", + "short": "", + "long": "" + } + } + }, + "SI_S9.5": { + "abbr": "SI_S9.5", + "percentage_invoice": 950, + "percentage_sales_tax": 950, + "percentage_input_tax": 950, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. SI 9.5%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT SI 9.5%", + "short": "", + "long": "" + } + } + }, + "SI_S5": { + "abbr": "SI_S5", + "percentage_invoice": 500, + "percentage_sales_tax": 500, + "percentage_input_tax": 500, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. SI 5%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT SI 5%", + "short": "", + "long": "" + } + } + }, + "SI_S0": { + "abbr": "SI_S0", + "percentage_invoice": 0, + "percentage_sales_tax": 0, + "percentage_input_tax": 0, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. SI 0%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT SI 0%", + "short": "", + "long": "" + } + } + }, + "ES_S21": { + "abbr": "ES_S21", + "percentage_invoice": 2100, + "percentage_sales_tax": 2100, + "percentage_input_tax": 2100, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. ES 21%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT ES 21%", + "short": "", + "long": "" + } + } + }, + "ES_S10": { + "abbr": "ES_S10", + "percentage_invoice": 1000, + "percentage_sales_tax": 1000, + "percentage_input_tax": 1000, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. ES 10%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT ES 10%", + "short": "", + "long": "" + } + } + }, + "ES_S4": { + "abbr": "ES_S4", + "percentage_invoice": 400, + "percentage_sales_tax": 400, + "percentage_input_tax": 400, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. ES 4%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT ES 4%", + "short": "", + "long": "" + } + } + }, + "ES_S0": { + "abbr": "ES_S0", + "percentage_invoice": 0, + "percentage_sales_tax": 0, + "percentage_input_tax": 0, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. ES 0%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT ES 0%", + "short": "", + "long": "" + } + } + }, + "SE_S25": { + "abbr": "SE_S25", + "percentage_invoice": 2500, + "percentage_sales_tax": 2500, + "percentage_input_tax": 2500, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. SE 25%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT SE 25%", + "short": "", + "long": "" + } + } + }, + "SE_S12": { + "abbr": "SE_S12", + "percentage_invoice": 1200, + "percentage_sales_tax": 1200, + "percentage_input_tax": 1200, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. SE 12%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT SE 12%", + "short": "", + "long": "" + } + } + }, + "SE_S6": { + "abbr": "SE_S6", + "percentage_invoice": 600, + "percentage_sales_tax": 600, + "percentage_input_tax": 600, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. SE 6%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT SE 6%", + "short": "", + "long": "" + } + } + }, + "SE_S0": { + "abbr": "SE_S0", + "percentage_invoice": 0, + "percentage_sales_tax": 0, + "percentage_input_tax": 0, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. SE 0%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT SE 0%", + "short": "", + "long": "" + + } + } + }, + "GB_S20": { + "abbr": "GB_S20", + "percentage_invoice": 2000, + "percentage_sales_tax": 2000, + "percentage_input_tax": 2000, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. GB 20%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT GB 20%", + "short": "", + "long": "" + } + } + }, + "GB_S5": { + "abbr": "GB_S5", + "percentage_invoice": 500, + "percentage_sales_tax": 500, + "percentage_input_tax": 500, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. GB 5%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT GB 5%", + "short": "", + "long": "" + } + } + }, + "GB_S0": { + "abbr": "GB_S0", + "percentage_invoice": 0, + "percentage_sales_tax": 0, + "percentage_input_tax": 0, + "tax_report": { + "base": null, + "amount": 43 + }, + "markers": [], + "l11n": { + "de": { + "title": "Lokale USt. GB 0%", + "short": "", + "long": "" + }, + "en": { + "title": "Local VAT GB 0%", + "short": "", + "long": "" + } + } + } +} \ No newline at end of file diff --git a/Admin/Installer.php b/Admin/Installer.php index 40c9167..88e3101 100755 --- a/Admin/Installer.php +++ b/Admin/Installer.php @@ -14,7 +14,13 @@ declare(strict_types=1); namespace Modules\Finance\Admin; +use phpOMS\Application\ApplicationAbstract; +use phpOMS\Config\SettingsInterface; +use phpOMS\Message\Http\HttpRequest; +use phpOMS\Message\Http\HttpResponse; use phpOMS\Module\InstallerAbstract; +use phpOMS\Module\ModuleInfo; +use phpOMS\Uri\HttpUri; /** * Installer class. @@ -33,4 +39,74 @@ final class Installer extends InstallerAbstract * @since 1.0.0 */ public const PATH = __DIR__; + + /** + * {@inheritdoc} + */ + public static function install(ApplicationAbstract $app, ModuleInfo $info, SettingsInterface $cfgHandler) : void + { + parent::install($app, $info, $cfgHandler); + + $fileContent = \file_get_contents(__DIR__ . '/Install/taxcodes.json'); + if ($fileContent === false) { + return; + } + + $taxes = \json_decode($fileContent, true); + foreach ($taxes as $type) { + self::createCode($app, $type); + } + } + + private static function createCode(ApplicationAbstract $app, array $data) : array + { + /** @var \Modules\Finance\Controller\ApiController $module */ + $module = $app->moduleManager->get('Finance'); + + $response = new HttpResponse(); + $request = new HttpRequest(new HttpUri('')); + + $request->header->account = 1; + $request->setData('abbr', $data['abbr'] ?? ''); + $request->setData('percentage_invoice', $data['percentage_invoice'] ?? 0); + $request->setData('percentage_sales_tax', $data['percentage_sales_tax'] ?? 0); + $request->setData('percentage_input_tax', $data['percentage_input_tax'] ?? 0); + $request->setData('title', \reset($data['l11n'])['title'] ?? ''); + $request->setData('short', \reset($data['l11n'])['short'] ?? ''); + $request->setData('long', \reset($data['l11n'])['long'] ?? ''); + $request->setData('language', \array_keys($data['l11n'])[0]); + + $module->apiTaxCodeCreate($request, $response); + + $responseData = $response->get(''); + if (!\is_array($responseData)) { + return []; + } + + /** @var \Modules\Finace\Models\TaxCode $code */ + $code = $responseData['response']; + $id = $code->getId(); + + $isFirst = true; + foreach ($data['l11n'] as $lang => $l11n) { + if ($isFirst) { + $isFirst = false; + continue; + } + + $response = new HttpResponse(); + $request = new HttpRequest(new HttpUri('')); + + $request->header->account = 1; + $request->setData('title', $l11n['title'] ?? ''); + $request->setData('short', $l11n['short'] ?? ''); + $request->setData('long', $l11n['long'] ?? ''); + $request->setData('language', $lang); + $request->setData('code', $id); + + $module->apiTaxCodeL11nCreate($request, $response); + } + + return $code->toArray(); + } } diff --git a/Controller/ApiController.php b/Controller/ApiController.php new file mode 100644 index 0000000..0362602 --- /dev/null +++ b/Controller/ApiController.php @@ -0,0 +1,182 @@ + + * + * @since 1.0.0 + */ + private function validateTaxCodeCreate(RequestAbstract $request) : array + { + $val = []; + if (($val['abbr'] = empty($request->getData('abbr'))) + || ($val['title'] = empty($request->getData('title'))) + ) { + return $val; + } + + return []; + } + + /** + * Api method to create document + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param mixed $data Generic data + * + * @return void + * + * @api + * + * @since 1.0.0 + */ + public function apiTaxCodeCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void + { + if (!empty($val = $this->validateTaxCodeCreate($request))) { + $response->set('tax_code_create', new FormValidation($val)); + $response->header->status = RequestStatusCode::R_400; + + return; + } + + $code = $this->createTaxCodeFromRequest($request); + $this->createModel($request->header->account, $code, TaxCodeMapper::class, 'tax_code', $request->getOrigin()); + + $this->fillJsonResponse($request, $response, NotificationLevel::OK, 'Code', 'Tax code successfully created', $code); + } + + /** + * Method to create task from request. + * + * @param RequestAbstract $request Request + * + * @return TaxCode + * + * @since 1.0.0 + */ + private function createTaxCodeFromRequest(RequestAbstract $request) : TaxCode + { + $code = new TaxCode(); + $code->abbr = (string) ($request->getData('abbr') ?? ''); + $code->percentageInvoice = (int) ($request->getData('percentage_invoice') ?? 0); + $code->percentageSales = (int) ($request->getData('percentage_sales_tax') ?? 0); + $code->percentageInput = (int) ($request->getData('percentage_input_tax') ?? 0); + + if (!empty($request->getData('title'))) { + $code->l11n->title = (string) ($request->getData('title') ?? ''); + $code->l11n->short = (string) ($request->getData('short') ?? ''); + $code->l11n->long = (string) ($request->getData('long') ?? ''); + $code->l11n->setLanguage((string) ($request->getData('language') ?? 'en')); + } + + return $code; + } + + /** + * Validate l11n create request + * + * @param RequestAbstract $request Request + * + * @return array + * + * @since 1.0.0 + */ + private function validateTaxCodeL11nCreate(RequestAbstract $request) : array + { + $val = []; + if (($val['title'] = empty($request->getData('title'))) + || ($val['code'] = empty($request->getData('code'))) + ) { + return $val; + } + + return []; + } + + /** + * Api method to create tag localization + * + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param mixed $data Generic data + * + * @return void + * + * @api + * + * @since 1.0.0 + */ + public function apiTaxCodeL11nCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void + { + if (!empty($val = $this->validateTaxCodeL11nCreate($request))) { + $response->set('tax_code_l11n_create', new FormValidation($val)); + $response->header->status = RequestStatusCode::R_400; + + return; + } + + $l11nCode = $this->createTaxCodeL11nFromRequest($request); + $this->createModel($request->header->account, $l11nCode, TaxCodeL11nMapper::class, 'tax_code_l11n', $request->getOrigin()); + + $this->fillJsonResponse($request, $response, NotificationLevel::OK, 'Localization', 'Localization successfully created', $l11nCode); + } + + /** + * Method to create tag localization from request. + * + * @param RequestAbstract $request Request + * + * @return TaxCodeL11n + * + * @since 1.0.0 + */ + private function createTaxCodeL11nFromRequest(RequestAbstract $request) : TaxCodeL11n + { + $l11n = new TaxCodeL11n(); + $l11n->title = (string) ($request->getData('title') ?? ''); + $l11n->short = (string) ($request->getData('short') ?? ''); + $l11n->long = (string) ($request->getData('long') ?? ''); + $l11n->code = (int) ($request->getData('code') ?? 0); + $l11n->setLanguage((string) ($request->getData('language') ?? $request->getLanguage())); + + return $l11n; + } +} diff --git a/Models/EUVATRates.php b/Models/EUVATRates.php new file mode 100644 index 0000000..26637ec --- /dev/null +++ b/Models/EUVATRates.php @@ -0,0 +1,197 @@ + [ + [2000, 'S'], + [1300, 'R'], + [1000, 'R'], + [0, 'Z'], + ], + '_BEL' => [ + [2100, 'S'], + [1200, 'R'], + [600, 'R'], + [0, 'Z'], + ], + '_BGR' => [ + [2000, 'S'], + [2100, 'R'], + [1000, 'R'], + [900, 'R'], + [0, 'Z'], + ], + '_HRV' => [ + [2500, 'S'], + [1300, 'R'], + [500, 'R'], + [0, 'Z'], + ], + '_CYP' => [ + [1900, 'S'], + [900, 'R'], + [500, 'R'], + [0, 'Z'], + ], + '_CZE' => [ + [2100, 'S'], + [1500, 'R'], + [1000, 'R'], + [0, 'Z'], + ], + '_DNK' => [ + [2500, 'S'], + [0, 'Z'], + ], + '_EST' => [ + [2000, 'S'], + [900, 'R'], + [0, 'Z'], + ], + '_FIN' => [ + [2400, 'S'], + [1400, 'R'], + [1000, 'R'], + [0, 'Z'], + ], + '_FRA' => [ + [2000, 'S'], + [1000, 'R'], + [550, 'R'], + [210, 'R'], + [0, 'Z'], + ], + '_DEU' => [ + [1900, 'S'], + [700, 'R'], + [0, 'Z'], + ], + '_GRC' => [ + [2400, 'S'], + [1300, 'R'], + [600, 'R'], + [0, 'Z'], + ], + '_HUN' => [ + [2700, 'S'], + [1800, 'R'], + [500, 'R'], + [0, 'Z'], + ], + '_IRL' => [ + [2300, 'S'], + [1350, 'R'], + [900, 'R'], + [480, 'R'], + [0, 'Z'], + ], + '_ITA' => [ + [2200, 'S'], + [1000, 'R'], + [500, 'R'], + [400, 'R'], + [0, 'Z'], + ], + '_LVA' => [ + [2100, 'S'], + [1200, 'R'], + [500, 'R'], + [0, 'Z'], + ], + '_LTU' => [ + [2100, 'S'], + [900, 'R'], + [500, 'R'], + [0, 'Z'], + ], + '_LUX' => [ + [1700, 'S'], + [1400, 'R'], + [800, 'R'], + [300, 'R'], + [0, 'Z'], + ], + '_MLT' => [ + [1800, 'S'], + [700, 'R'], + [500, 'R'], + [0, 'Z'], + ], + '_NLD' => [ + [2100, 'S'], + [900, 'R'], + [0, 'Z'], + ], + '_POL' => [ + [2300, 'S'], + [800, 'R'], + [500, 'R'], + [0, 'Z'], + ], + '_PRT' => [ + [2300, 'S'], + [1300, 'R'], + [600, 'R'], + [0, 'Z'], + ], + '_ROU' => [ + [1900, 'S'], + [900, 'R'], + [500, 'R'], + [0, 'Z'], + ], + '_SVK' => [ + [2000, 'S'], + [1000, 'R'], + [0, 'Z'], + ], + '_SVN' => [ + [2200, 'S'], + [950, 'R'], + [500, 'R'], + [0, 'Z'], + ], + '_ESP' => [ + [2100, 'S'], + [1000, 'R'], + [400, 'R'], + [0, 'Z'], + ], + '_SWE' => [ + [2500, 'S'], + [1200, 'R'], + [600, 'R'], + [0, 'Z'], + ], + '_GBR' => [ + [2000, 'S'], + [500, 'R'], + [0, 'Z'], + ], + ]; +} diff --git a/Models/NullTaxCode.php b/Models/NullTaxCode.php new file mode 100644 index 0000000..c6fb20e --- /dev/null +++ b/Models/NullTaxCode.php @@ -0,0 +1,46 @@ +id = $id; + } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() : mixed + { + return ['id' => $this->id]; + } +} diff --git a/Models/NullTaxCodeL11n.php b/Models/NullTaxCodeL11n.php new file mode 100644 index 0000000..8d0b137 --- /dev/null +++ b/Models/NullTaxCodeL11n.php @@ -0,0 +1,46 @@ +id = $id; + } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() : mixed + { + return ['id' => $this->id]; + } +} diff --git a/Models/TaxCode.php b/Models/TaxCode.php new file mode 100644 index 0000000..0e71b00 --- /dev/null +++ b/Models/TaxCode.php @@ -0,0 +1,83 @@ +l11n = new TaxCodeL11n(); + } + + /** + * Get id + * + * @return int + * + * @since 1.0.0 + */ + public function getId() : int + { + return $this->id; + } + + /** + * {@inheritdoc} + */ + public function toArray() : array + { + return [ + 'id' => $this->id, + ]; + } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() : mixed + { + return $this->toArray(); + } +} diff --git a/Models/TaxCodeL11n.php b/Models/TaxCodeL11n.php new file mode 100644 index 0000000..ea72413 --- /dev/null +++ b/Models/TaxCodeL11n.php @@ -0,0 +1,145 @@ +id; + } + + /** + * Get language + * + * @return string + * + * @since 1.0.0 + */ + public function getLanguage() : string + { + return $this->language; + } + + /** + * Set language + * + * @param string $language Language + * + * @return void + * + * @since 1.0.0 + */ + public function setLanguage(string $language) : void + { + $this->language = $language; + } + + /** + * {@inheritdoc} + */ + public function toArray() : array + { + return [ + 'id' => $this->id, + 'title' => $this->title, + 'short' => $this->short, + 'long' => $this->long, + 'language' => $this->language, + ]; + } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() : mixed + { + return $this->toArray(); + } +} diff --git a/Models/TaxCodeL11nMapper.php b/Models/TaxCodeL11nMapper.php new file mode 100644 index 0000000..11724e6 --- /dev/null +++ b/Models/TaxCodeL11nMapper.php @@ -0,0 +1,59 @@ + + * @since 1.0.0 + */ + public const COLUMNS = [ + 'tax_code_l11n_id' => ['name' => 'tax_code_l11n_id', 'type' => 'int', 'internal' => 'id'], + 'tax_code_l11n_text_title' => ['name' => 'tax_code_l11n_text_title', 'type' => 'string', 'internal' => 'title'], + 'tax_code_l11n_text_short' => ['name' => 'tax_code_l11n_text_short', 'type' => 'string', 'internal' => 'short'], + 'tax_code_l11n_text_long' => ['name' => 'tax_code_l11n_text_long', 'type' => 'string', 'internal' => 'long'], + 'tax_code_l11n_lang' => ['name' => 'tax_code_l11n_lang', 'type' => 'string', 'internal' => 'language'], + 'tax_code_l11n_code' => ['name' => 'tax_code_l11n_code', 'type' => 'int', 'internal' => 'code'], + ]; + + /** + * Primary table. + * + * @var string + * @since 1.0.0 + */ + public const TABLE = 'tax_code_l11n'; + + /** + * Primary field name. + * + * @var string + * @since 1.0.0 + */ + public const PRIMARYFIELD = 'tax_code_l11n_id'; +} diff --git a/Models/TaxCodeMapper.php b/Models/TaxCodeMapper.php new file mode 100644 index 0000000..2d1b1d6 --- /dev/null +++ b/Models/TaxCodeMapper.php @@ -0,0 +1,73 @@ + + * @since 1.0.0 + */ + public const COLUMNS = [ + 'tax_code_id' => ['name' => 'tax_code_id', 'type' => 'int', 'internal' => 'id'], + 'tax_code_abbr' => ['name' => 'tax_code_abbr', 'type' => 'string', 'internal' => 'abbr'], + 'tax_code_invoice' => ['name' => 'tax_code_invoice', 'type' => 'int', 'internal' => 'percentageInvoice'], + 'tax_code_sales' => ['name' => 'tax_code_sales', 'type' => 'int', 'internal' => 'percentageSales'], + 'tax_code_input' => ['name' => 'tax_code_input', 'type' => 'int', 'internal' => 'percentageInput'], + ]; + + /** + * Primary table. + * + * @var string + * @since 1.0.0 + */ + public const TABLE = 'tax_code'; + + /** + * Primary field name. + * + * @var string + * @since 1.0.0 + */ + public const PRIMARYFIELD = 'tax_code_id'; + + /** + * Has many relation. + * + * @var array + * @since 1.0.0 + */ + public const HAS_MANY = [ + 'l11n' => [ + 'mapper' => TaxCodeL11nMapper::class, + 'table' => 'tax_code_l11n', + 'self' => 'tax_code_l11n_code', + 'external' => null, + ], + ]; +} diff --git a/composer.json b/composer.json index fcc0462..8cb1788 100755 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "karaka/karaka", - "description": "PHP Framework for Karaka.", + "description": "PHP Framework for Jingga.", "authors": [ { "name": "Dennis Eichhorn", diff --git a/info.json b/info.json index d574eb0..157aa8b 100755 --- a/info.json +++ b/info.json @@ -11,7 +11,7 @@ "phpOMS-db": "1.0.0" }, "creator": { - "name": "Karaka", + "name": "Jingga", "website": "jingga.app" }, "description": "Finance module.",