diff options
| author | Aldrik Ramaekers <aldrikboy@gmail.com> | 2025-10-19 13:49:36 +0200 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrikboy@gmail.com> | 2025-10-19 13:49:36 +0200 |
| commit | 60dfc4cab91b0076901cac81ba6cb1f2d198b06c (patch) | |
| tree | b5408e86171782eb28017702b79e47f0ca03ed89 /include | |
| parent | 18bfbc423d188683973a0a3d6c31c9225158e262 (diff) | |
new tax rate format, ui and r/w
Diffstat (limited to 'include')
| -rw-r--r-- | include/administration.hpp | 12 | ||||
| -rw-r--r-- | include/file_templates.hpp | 6 |
2 files changed, 10 insertions, 8 deletions
diff --git a/include/administration.hpp b/include/administration.hpp index 151df2a..c8013b9 100644 --- a/include/administration.hpp +++ b/include/administration.hpp @@ -57,7 +57,7 @@ typedef enum #define MAX_TAX_SECTION_PER_RATE 3 typedef struct { - char id[MAX_LEN_ID]; // T/[id] + char id[MAX_LEN_ID]; // T/[id] TODO: can we get rid of this? char internal_code[MAX_LEN_SHORT_DESC]; float rate; // 0-100% u32 tax_section_count; @@ -538,12 +538,14 @@ namespace administration { tax_rate tax_rate_create_empty(); a_err tax_rate_import(tax_rate data); a_err tax_rate_add(tax_rate data); - a_err tax_rate_update(tax_rate data); + a_err tax_rate_exists(tax_rate data); + a_err tax_rate_remove(tax_rate data); - a_err tax_rate_get_by_shorthandle(tax_rate* buffer, char* handle); - a_err tax_rate_get_by_id(tax_rate* buffer, char* id); + a_err tax_rate_update(tax_rate data); // TODO remove + a_err tax_rate_get_by_shorthandle(tax_rate* buffer, char* handle); // TODO remove + a_err tax_rate_get_by_id(tax_rate* buffer, char* id); // TODO remove u32 tax_rate_get_all(tax_rate* buffer); - u32 tax_rate_get_by_country(tax_rate* buffer, u32 code_count, char** country_codes); + u32 tax_rate_get_by_country(tax_rate* buffer, u32 code_count, char** country_codes); // TODO remove // Cost center functions. // ======================= diff --git a/include/file_templates.hpp b/include/file_templates.hpp index b4a4a07..c44e624 100644 --- a/include/file_templates.hpp +++ b/include/file_templates.hpp @@ -34,10 +34,10 @@ namespace file_template { static const char* taxrate_save_template = "<CountryTaxBracket>\n" - " <Id>{{TAXBRACKET_ID}}</Id>\n" - " <CountryCode>{{TAXBRACKET_COUNTRY}}</CountryCode>\n" + " <Id>{{TAXBRACKET_INTERNAL_CODE}}</Id>\n" " <Rate>{{TAXBRACKET_RATE}}</Rate>\n" - " <Category>{{TAXBRACKET_CATEGORY}}</Category>\n" + " <Type>{{TAXBRACKET_TYPE}}</Type>\n" + " <TaxSections>{{TAXBRACKET_SECTIONS}}</TaxSections>\n" "</CountryTaxBracket>"; static const char* contact_save_template = |
