summaryrefslogtreecommitdiff
path: root/src/countries.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/countries.cpp')
-rw-r--r--src/countries.cpp22
1 files changed, 19 insertions, 3 deletions
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