/* * Copyright (c) 2025 Aldrik Ramaekers * * 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); bool (*add_billing_item_to_tax_report)(tax_report* report, invoice* inv, billing_item* item); float (*calculate_tax_report_final)(tax_report* report); time_t (*get_invoice_date_to_use_for_tax_report)(invoice* inv); } 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); bool add_billing_item_to_tax_report(char* country_code, tax_report* report, invoice* inv, billing_item* item); float calculate_tax_report_final(char* country_code, tax_report* report); time_t get_invoice_date_to_use_for_tax_report(char* country_code, invoice* inv); }