summaryrefslogtreecommitdiff
path: root/src/countries
diff options
context:
space:
mode:
Diffstat (limited to 'src/countries')
-rw-r--r--src/countries/nl.cpp44
1 files changed, 35 insertions, 9 deletions
diff --git a/src/countries/nl.cpp b/src/countries/nl.cpp
index 22a4ee2..8fe3c7f 100644
--- a/src/countries/nl.cpp
+++ b/src/countries/nl.cpp
@@ -139,6 +139,31 @@ 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, ...)
+{
+ tax_rate result;
+ result.type = type;
+ result.tax_section_count = 0;
+ result.rate = rate;
+ strops::copy(result.internal_code, internal_code, sizeof(result.internal_code));
+ strops::copy(result.category_code, category_code, sizeof(result.category_code));
+
+ va_list args;
+ va_start(args, rate);
+
+ char* tax_category = 0;
+ do
+ {
+ tax_category = va_arg(args, char*);
+ if (tax_category) strops::copy(result.tax_sections[result.tax_section_count++], tax_category, MAX_LEN_SHORT_DESC);
+ else break;
+ } while (1);
+
+ va_end(args);
+
+ return result;
+}
+
static tax_rate _create_tax_rate(tax_rate_type type, char* internal_code, float rate, ...)
{
tax_rate result;
@@ -146,6 +171,7 @@ static tax_rate _create_tax_rate(tax_rate_type type, char* internal_code, float
result.tax_section_count = 0;
result.rate = rate;
strops::copy(result.internal_code, internal_code, sizeof(result.internal_code));
+ strops::copy(result.category_code, "S", sizeof(result.category_code));
va_list args;
va_start(args, rate);
@@ -171,15 +197,15 @@ u32 _nl_get_available_tax_rates(tax_rate* buffer, u32 buffer_size)
#define ADD(_line) if (cc < buffer_size) buffer[cc++] = _line; else assert(0);
// Outgoing
- ADD(_create_tax_rate(tax_rate_type::TAX_RATE_OUTGOING_INVOICE, "NL/21", 21.00, "NL/1a", 0));
- ADD(_create_tax_rate(tax_rate_type::TAX_RATE_OUTGOING_INVOICE, "NL/9", 9.00, "NL/1b", 0));
- ADD(_create_tax_rate(tax_rate_type::TAX_RATE_OUTGOING_INVOICE, "NL/0", 0.00, "NL/1e", 0));
- ADD(_create_tax_rate(tax_rate_type::TAX_RATE_OUTGOING_INVOICE, "NL/BTV", 0.00, "", 0));
- ADD(_create_tax_rate(tax_rate_type::TAX_RATE_OUTGOING_INVOICE, "NL/BVB", 0.00, "NL/1e", 0));
- ADD(_create_tax_rate(tax_rate_type::TAX_RATE_OUTGOING_INVOICE, "NL/PBEU", 0.00, "NL/3a", 0));
- ADD(_create_tax_rate(tax_rate_type::TAX_RATE_OUTGOING_INVOICE, "NL/PIEU", 0.00, "NL/3b", 0));
- ADD(_create_tax_rate(tax_rate_type::TAX_RATE_OUTGOING_INVOICE, "NL/DIEU", 0.00, "NL/3b", 0));
- ADD(_create_tax_rate(tax_rate_type::TAX_RATE_OUTGOING_INVOICE, "NL/NBTW", 0.00, "", 0));
+ ADD(_create_tax_rate(tax_rate_type::TAX_RATE_OUTGOING_INVOICE, "NL/21", "S", 21.00, "NL/1a", 0));
+ ADD(_create_tax_rate(tax_rate_type::TAX_RATE_OUTGOING_INVOICE, "NL/9", "AA", 9.00, "NL/1b", 0));
+ ADD(_create_tax_rate(tax_rate_type::TAX_RATE_OUTGOING_INVOICE, "NL/0", "Z", 0.00, "NL/1e", 0));
+ ADD(_create_tax_rate(tax_rate_type::TAX_RATE_OUTGOING_INVOICE, "NL/BTV", "E", 0.00, "", 0));
+ ADD(_create_tax_rate(tax_rate_type::TAX_RATE_OUTGOING_INVOICE, "NL/BVB", "AE", 0.00, "NL/1e", 0));
+ ADD(_create_tax_rate(tax_rate_type::TAX_RATE_OUTGOING_INVOICE, "NL/PBEU", "G", 0.00, "NL/3a", 0));
+ ADD(_create_tax_rate(tax_rate_type::TAX_RATE_OUTGOING_INVOICE, "NL/PIEU", "G", 0.00, "NL/3b", 0));
+ ADD(_create_tax_rate(tax_rate_type::TAX_RATE_OUTGOING_INVOICE, "NL/DIEU", "G", 0.00, "NL/3b", 0));
+ ADD(_create_tax_rate(tax_rate_type::TAX_RATE_OUTGOING_INVOICE, "NL/NBTW", "O", 0.00, "", 0));
// Unieregeling diensten
ADD(_create_tax_rate(tax_rate_type::TAX_RATE_OUTGOING_INVOICE, "NL/MT/18/D", 18.00, "OBU", 0));