diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/administration.hpp | 32 | ||||
| -rw-r--r-- | include/administration_reader.hpp | 2 | ||||
| -rw-r--r-- | include/administration_writer.hpp | 4 | ||||
| -rw-r--r-- | include/file_templates.hpp | 2 |
4 files changed, 20 insertions, 20 deletions
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. // ======================= diff --git a/include/administration_reader.hpp b/include/administration_reader.hpp index ed932bc..d94947e 100644 --- a/include/administration_reader.hpp +++ b/include/administration_reader.hpp @@ -4,7 +4,7 @@ bool administration_reader_open_new(); bool administration_reader_open_existing(char* file_path); bool administration_reader_import_administration_info(char* buffer, size_t buffer_size); -bool administration_reader_import_tax_bracket(char* buffer, size_t buffer_size); +bool administration_reader_import_tax_rate(char* buffer, size_t buffer_size); bool administration_reader_import_cost_center(char* buffer, size_t buffer_size); bool administration_reader_import_project(char* buffer, size_t buffer_size); bool administration_reader_import_contact(char* buffer, size_t buffer_size);
\ No newline at end of file diff --git a/include/administration_writer.hpp b/include/administration_writer.hpp index f1235ae..08fe301 100644 --- a/include/administration_writer.hpp +++ b/include/administration_writer.hpp @@ -14,12 +14,12 @@ bool administration_writer_start_new(); bool administration_writer_delete_entry(char* id); bool administration_writer_save_project_blocking(project project); bool administration_writer_save_cost_center_blocking(cost_center cost); -bool administration_writer_save_tax_bracket_blocking(country_tax_bracket bracket); +bool administration_writer_save_tax_rate_blocking(tax_rate rate); bool administration_writer_save_contact_blocking(contact c); bool administration_writer_save_invoice_blocking(invoice inv); // Archiving functions. bool administration_writer_save_all_administration_info_blocking(); -bool administration_writer_save_all_tax_brackets_blocking(); +bool administration_writer_save_all_tax_rates_blocking(); bool administration_writer_save_all_cost_centers_blocking(); bool administration_writer_save_all_async();
\ No newline at end of file diff --git a/include/file_templates.hpp b/include/file_templates.hpp index ff3252f..d6f9b7d 100644 --- a/include/file_templates.hpp +++ b/include/file_templates.hpp @@ -14,7 +14,7 @@ const char* costcenter_save_template = " <Description>{{COSTCENTER_DESCRIPTION}}</Description>\n" "</CostCenter>"; -const char* taxbracket_save_template = +const char* taxrate_save_template = "<CountryTaxBracket>\n" " <Id>{{TAXBRACKET_ID}}</Id>\n" " <CountryCode>{{TAXBRACKET_COUNTRY}}</CountryCode>\n" |
