summaryrefslogtreecommitdiff
path: root/src/countries/nl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/countries/nl.cpp')
-rw-r--r--src/countries/nl.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/countries/nl.cpp b/src/countries/nl.cpp
index 8a56e71..ac44ad9 100644
--- a/src/countries/nl.cpp
+++ b/src/countries/nl.cpp
@@ -145,7 +145,7 @@ time_t _nl_get_invoice_date_to_use_for_tax_report(invoice* inv)
return inv->issued_at;
}
-static tax_rate _create_tax_rate(tax_rate_type type, char* internal_code, char* category_code, float rate, ...)
+static tax_rate _create_tax_rate(tax_rate_type type, const char* internal_code, const char* category_code, float rate, ...)
{
tax_rate result;
result.type = type;
@@ -170,7 +170,7 @@ static tax_rate _create_tax_rate(tax_rate_type type, char* internal_code, char*
return result;
}
-static tax_rate _create_tax_rate(tax_rate_type type, char* internal_code, float rate, ...)
+static tax_rate _create_tax_rate(tax_rate_type type, const char* internal_code, float rate, ...)
{
tax_rate result;
memops::zero(&result, sizeof(tax_rate));
@@ -201,7 +201,13 @@ u32 _nl_get_available_tax_rates(tax_rate* buffer, u32 buffer_size)
assert(buffer);
u32 cc = 0;
- #define ADD(_line) if (cc < buffer_size) buffer[cc++] = _line; else assert(0);
+ #define ADD(_line) \
+ if (cc < buffer_size) \
+ { \
+ tax_rate data = _line;\
+ memops::copy(&buffer[cc++], (const void*)&data, sizeof(tax_rate)); \
+ } \
+ else assert(0);
// Outgoing
ADD(_create_tax_rate(tax_rate_type::TAX_RATE_OUTGOING_INVOICE, "NL/21", "S", 21.00, "NL/1a", 0));