From d976c1227f367a4547a004597b8d360a8958eba9 Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Fri, 10 Oct 2025 22:03:05 +0200 Subject: working on NL tax reports --- src/countries.cpp | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'src/countries.cpp') diff --git a/src/countries.cpp b/src/countries.cpp index d4bcae1..5712a7f 100644 --- a/src/countries.cpp +++ b/src/countries.cpp @@ -68,7 +68,7 @@ bool country::tax_is_implemented(char* country_code) if (index == -1) return false; return country_map[index].fill_tax_report_with_categories && - country_map[index].get_tax_category_for_billing_item; + country_map[index].add_billing_item_to_tax_report; } void country::fill_tax_report_with_categories(char* country_code, tax_report* report) @@ -79,10 +79,26 @@ void country::fill_tax_report_with_categories(char* country_code, tax_report* re country_map[index].fill_tax_report_with_categories(report); } -char* country::get_tax_category_for_billing_item(char* country_code, invoice* inv, billing_item* item) +bool country::add_billing_item_to_tax_report(char* country_code, tax_report* report, invoice* inv, billing_item* item) { s32 index = get_index_by_country_code(country_code); assert(index != -1); - return country_map[index].get_tax_category_for_billing_item(inv, item); + return country_map[index].add_billing_item_to_tax_report(report, inv, item); +} + +float country::calculate_tax_report_final(char* country_code, tax_report* report) +{ + s32 index = get_index_by_country_code(country_code); + assert(index != -1); + + return country_map[index].calculate_tax_report_final(report); +} + +time_t country::get_invoice_date_to_use_for_tax_report(char* country_code, invoice* inv) +{ + s32 index = get_index_by_country_code(country_code); + assert(index != -1); + + return country_map[index].get_invoice_date_to_use_for_tax_report(inv); } \ No newline at end of file -- cgit v1.2.3-70-g09d2