From 8d5c72406c1848dc7ab83daf4702fa13ce754530 Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Tue, 16 Sep 2025 19:26:15 +0200 Subject: renamed country_tax_bracket to tax_rate --- include/administration.hpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'include/administration.hpp') diff --git a/include/administration.hpp b/include/administration.hpp index 6123df4..7c1b0d0 100644 --- a/include/administration.hpp +++ b/include/administration.hpp @@ -33,7 +33,7 @@ typedef struct char country_code[MAX_LEN_COUNTRY_CODE]; // 2 letter country code float rate; // 0-100% char category_code[MAX_LEN_CODE]; // Category code. https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL5305/ -} country_tax_bracket; +} tax_rate; typedef struct { @@ -115,7 +115,7 @@ typedef struct float allowance; // Total discount. float net; // Total net, with discount. char currency[MAX_LEN_CURRENCY]; // 3 letter code - char tax_bracket_id[MAX_LEN_ID]; // T/[id] + char tax_rate_id[MAX_LEN_ID]; // T/[id] float tax; float total; } billing_item; @@ -308,7 +308,7 @@ typedef void (*data_changed_event)(); typedef void (*data_deleted_event)(char id[MAX_LEN_ID]); typedef void (*invoice_changed_event)(invoice* invoice); typedef void (*contact_changed_event)(contact* contact); -typedef void (*taxbracket_changed_event)(country_tax_bracket* bracket); +typedef void (*taxrate_changed_event)(tax_rate* rate); typedef void (*costcenter_changed_event)(cost_center* cost_center); typedef void (*project_changed_event)(project* project); @@ -324,7 +324,7 @@ typedef struct list_t contacts; list_t projects; - list_t tax_brackets; + list_t tax_rates; list_t cost_centers; u32 invoice_count; @@ -367,7 +367,7 @@ void administration_set_data_changed_event_callback(data_changed_event ev); void administration_set_data_deleted_event_callback(data_deleted_event ev); void administration_set_invoice_changed_event_callback(invoice_changed_event ev); void administration_set_contact_changed_event_callback(contact_changed_event ev); -void administration_set_taxbracket_changed_event_callback(taxbracket_changed_event ev); +void administration_set_taxrate_changed_event_callback(taxrate_changed_event ev); void administration_set_costcenter_changed_event_callback(costcenter_changed_event ev); void administration_set_project_changed_event_callback(project_changed_event ev); @@ -425,17 +425,17 @@ u32 administration_project_get_all(project* buffer); u32 administration_project_get_partial_list(u32 page_index, u32 page_size, project* buffer); a_err administration_project_get_by_id(project* buffer, char* id); -// Tax bracket functions. +// Tax rate functions. // ======================= -u32 administration_tax_bracket_count(); -country_tax_bracket administration_tax_bracket_create_empty(); -a_err administration_tax_bracket_import(country_tax_bracket data); -a_err administration_tax_bracket_add(country_tax_bracket data); -a_err administration_tax_bracket_update(country_tax_bracket data); +u32 administration_tax_rate_count(); +tax_rate administration_tax_rate_create_empty(); +a_err administration_tax_rate_import(tax_rate data); +a_err administration_tax_rate_add(tax_rate data); +a_err administration_tax_rate_update(tax_rate data); -a_err administration_tax_bracket_get_by_id(country_tax_bracket* buffer, char* id); -u32 administration_tax_bracket_get_all(country_tax_bracket* buffer); -u32 administration_tax_bracket_get_by_country(country_tax_bracket* buffer, char* country_code); +a_err administration_tax_rate_get_by_id(tax_rate* buffer, char* id); +u32 administration_tax_rate_get_all(tax_rate* buffer); +u32 administration_tax_rate_get_by_country(tax_rate* buffer, char* country_code); // Cost center functions. // ======================= @@ -470,8 +470,8 @@ u32 administration_invoice_get_partial_list_outgoing(u32 page_index, u32 pag u32 administration_invoice_get_partial_list_incomming(u32 page_index, u32 page_size, invoice* buffer); u32 administration_invoice_get_all(invoice* buffer); -u32 administration_invoice_get_tax_brackets(invoice* invoice, country_tax_bracket* buffer); -bool administration_invoice_get_subtotal_for_tax_bracket(invoice* invoice, country_tax_bracket bracket, tax_subtotal* buffer); +u32 administration_invoice_get_tax_rates(invoice* invoice, tax_rate* buffer); +bool administration_invoice_get_subtotal_for_tax_rate(invoice* invoice, tax_rate rate, tax_subtotal* buffer); // Billing item functions. // ======================= -- cgit v1.2.3-70-g09d2