diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/administration.hpp | 9 | ||||
| -rw-r--r-- | include/countries.hpp | 8 | ||||
| -rw-r--r-- | include/strops.hpp | 1 |
3 files changed, 15 insertions, 3 deletions
diff --git a/include/administration.hpp b/include/administration.hpp index 54f8aac..69c0c0a 100644 --- a/include/administration.hpp +++ b/include/administration.hpp @@ -443,10 +443,17 @@ namespace administration { void set_project_changed_event_callback(project_changed_event ev); // Company info functions. + // ======================= contact company_info_get(); void company_info_import(contact data); void company_info_set(contact data); + + // Tax functions. + // ======================= + tax_line* get_tax_line_from_report(tax_report* quarter, char* category); + void create_tax_statement(tax_statement* statement); + // Other functions. // ======================= char* get_file_path(); @@ -463,7 +470,6 @@ namespace administration { void set_ai_service(ai_service provider); void create_income_statement(income_statement* statement); - void create_tax_statement(tax_statement* statement); bool can_create_invoices(); // Contact functions. @@ -541,6 +547,7 @@ namespace administration { invoice invoice_create_copy(invoice* invoice); a_err invoice_is_valid(invoice* invoice); + bool invoice_has_intra_community_services(invoice* invoice); char* invoice_get_status_string(invoice* invoice); u32 invoice_get_partial_list_outgoing(u32 page_index, u32 page_size, invoice* buffer); diff --git a/include/countries.hpp b/include/countries.hpp index 0849ed6..8b4bb88 100644 --- a/include/countries.hpp +++ b/include/countries.hpp @@ -24,7 +24,9 @@ typedef struct 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); + 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 { @@ -37,6 +39,8 @@ namespace country { 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); + 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); }
\ No newline at end of file diff --git a/include/strops.hpp b/include/strops.hpp index 5dc7368..206aaee 100644 --- a/include/strops.hpp +++ b/include/strops.hpp @@ -23,6 +23,7 @@ namespace strops { size_t copy(char *dst, const char *src, size_t size); char* contains(char* a, char* b); bool equals(const char* a, const char* b); + char* tokenize(char* a, const char* find); s32 format_va(char* s, size_t n, const char* format, va_list args); s32 format(char* s, size_t n, const char* format, ...); |
