summaryrefslogtreecommitdiff
path: root/src/administration_writer.cpp
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrikboy@gmail.com>2025-10-10 22:03:05 +0200
committerAldrik Ramaekers <aldrikboy@gmail.com>2025-10-10 22:03:05 +0200
commitd976c1227f367a4547a004597b8d360a8958eba9 (patch)
tree891b89263176375f058598b629b145177531a54a /src/administration_writer.cpp
parent1c53bd3ac83cc7a985983ac656bc2599276808a4 (diff)
working on NL tax reports
Diffstat (limited to 'src/administration_writer.cpp')
-rw-r--r--src/administration_writer.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/administration_writer.cpp b/src/administration_writer.cpp
index f7069a6..81c90fa 100644
--- a/src/administration_writer.cpp
+++ b/src/administration_writer.cpp
@@ -426,7 +426,12 @@ bool administration_writer::save_invoice_blocking(invoice inv)
strops::replace(tax_entry_file_content, tax_entry_buf_length, "{{CURRENCY}}", inv.currency);
strops::replace_float(tax_entry_file_content, tax_entry_buf_length, "{{TAXABLE_AMOUNT}}", subtotal.net, 2);
strops::replace_float(tax_entry_file_content, tax_entry_buf_length, "{{TAX_AMOUNT}}", subtotal.tax, 2);
- strops::replace(tax_entry_file_content, tax_entry_buf_length, "{{TAX_CATEGORY}}", tax_rate_buffer[i].category_code);
+
+ char tax_category[10];
+ strops::copy(tax_category, tax_rate_buffer[i].category_code, sizeof(tax_category));
+ strops::tokenize(tax_category, "#");
+
+ strops::replace(tax_entry_file_content, tax_entry_buf_length, "{{TAX_CATEGORY}}", tax_category);
strops::replace_float(tax_entry_file_content, tax_entry_buf_length, "{{TAX_PERCENT}}", tax_rate_buffer[i].rate, 2);
u32 content_len = (u32)strlen(tax_entry_file_content);