From 18bfbc423d188683973a0a3d6c31c9225158e262 Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Sat, 18 Oct 2025 23:10:20 +0200 Subject: tax rate refactor --- include/administration.hpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'include/administration.hpp') diff --git a/include/administration.hpp b/include/administration.hpp index 5053d7e..151df2a 100644 --- a/include/administration.hpp +++ b/include/administration.hpp @@ -46,12 +46,28 @@ #define MY_COMPANY_ID "C/1" +typedef enum +{ + TAX_RATE_OUTGOING_INVOICE, + TAX_RATE_INCOMMING_INVOICE, + + TAX_RATE_TYPE_END, +} tax_rate_type; + +#define MAX_TAX_SECTION_PER_RATE 3 typedef struct { char id[MAX_LEN_ID]; // T/[id] - char country_code[MAX_LEN_COUNTRY_CODE]; // 2 letter country code + char internal_code[MAX_LEN_SHORT_DESC]; float rate; // 0-100% + u32 tax_section_count; + char tax_sections[MAX_TAX_SECTION_PER_RATE][MAX_LEN_SHORT_DESC]; // Country specific tax section + tax_rate_type type; + + // depricated: + char tax_section[MAX_LEN_SHORT_DESC]; char category_code[MAX_LEN_CODE]; // Category code. https://docs.peppol.eu/poacc/billing/3.0/codelist/UNCL5305/ + char country_code[MAX_LEN_COUNTRY_CODE]; // 2 letter country code } tax_rate; typedef struct -- cgit v1.2.3-70-g09d2