summaryrefslogtreecommitdiff
path: root/include/countries.hpp
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrikboy@gmail.com>2025-10-05 20:28:18 +0200
committerAldrik Ramaekers <aldrikboy@gmail.com>2025-10-05 20:28:18 +0200
commit1c53bd3ac83cc7a985983ac656bc2599276808a4 (patch)
tree47b890b696649fcf85462d71058fb66c078bdca0 /include/countries.hpp
parent8aa66a6c6c0d8984b7d2668c03bad5a3b29e3a33 (diff)
country data, working on tax reports
Diffstat (limited to 'include/countries.hpp')
-rw-r--r--include/countries.hpp42
1 files changed, 42 insertions, 0 deletions
diff --git a/include/countries.hpp b/include/countries.hpp
new file mode 100644
index 0000000..0849ed6
--- /dev/null
+++ b/include/countries.hpp
@@ -0,0 +1,42 @@
+/*
+* Copyright (c) 2025 Aldrik Ramaekers <aldrik.ramaekers@gmail.com>
+*
+* Permission to use, copy, modify, and/or distribute this software for any
+* purpose with or without fee is hereby granted, provided that the above
+* copyright notice and this permission notice appear in all copies.
+*
+* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+*/
+
+#pragma once
+
+#include "administration.hpp"
+
+typedef struct
+{
+ char* country_code;
+ bool is_EU;
+ time_t (*get_default_invoice_expire_duration)();
+ void (*fill_tax_report_with_categories)(tax_report* report);
+ char* (*get_tax_category_for_billing_item)(invoice* inv, billing_item* item);
+} country_impl;
+
+namespace country {
+
+ s32 get_count();
+ char* get_code_by_index(s32 index);
+
+ time_t get_default_invoice_expire_duration(char* country_code);
+
+ bool is_EU(char* country_code);
+ bool tax_is_implemented(char* country_code);
+ void fill_tax_report_with_categories(char* country_code, tax_report* report);
+ char* get_tax_category_for_billing_item(char* country_code, invoice* inv, billing_item* item);
+
+} \ No newline at end of file