summaryrefslogtreecommitdiff
path: root/src/ui/ui_expenses.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/ui_expenses.cpp')
-rw-r--r--src/ui/ui_expenses.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ui/ui_expenses.cpp b/src/ui/ui_expenses.cpp
index 808d7fb..cd5e186 100644
--- a/src/ui/ui_expenses.cpp
+++ b/src/ui/ui_expenses.cpp
@@ -17,13 +17,13 @@ static invoice active_invoice = {0};
static invoice selected_for_removal = {0};
static cost_center* cost_center_list_buffer = 0;
-static country_tax_bracket* tax_bracket_list_buffer = 0;
+static tax_rate* tax_rate_list_buffer = 0;
static project* project_list_buffer = 0;
static billing_item* invoice_items_buffer = 0;
void ui_draw_address_form(address* buffer);
void draw_contact_form_ex(contact* buffer, bool viewing_only = false, bool with_autocomplete = false, bool* on_autocomplete = 0);
-void draw_tax_bracket_selector(char* tax_bracket_id, country_tax_bracket* buffer, char* country_code);
+void draw_tax_rate_selector(char* tax_rate_id, tax_rate* buffer, char* country_code);
bool draw_currency_selector(char* currency);
void draw_costcenter_selector(char* costcenter_id, cost_center* buffer)
@@ -101,7 +101,7 @@ void draw_project_selector(char* project_id, project* buffer)
void ui_destroy_expenses()
{
free(cost_center_list_buffer);
- free(tax_bracket_list_buffer);
+ free(tax_rate_list_buffer);
free(project_list_buffer);
free(invoice_items_buffer);
}
@@ -114,8 +114,8 @@ void ui_setup_expenses()
u32 costcenter_count = administration_cost_center_count();
cost_center_list_buffer = (cost_center*) malloc(sizeof(cost_center) * costcenter_count);
- u32 tax_bracket_count = administration_tax_bracket_count();
- tax_bracket_list_buffer = (country_tax_bracket*) malloc(sizeof(country_tax_bracket) * tax_bracket_count);
+ u32 tax_rate_count = administration_tax_rate_count();
+ tax_rate_list_buffer = (tax_rate*) malloc(sizeof(tax_rate) * tax_rate_count);
u32 project_count = administration_project_count();
project_list_buffer = (project*) malloc(sizeof(project) * project_count);
@@ -215,7 +215,7 @@ static void draw_expense_items_form(invoice* invoice)
ImGui::TableSetColumnIndex(6);
ImGui::PushItemWidth(-1);
// TODO: should be country of invoice issuer
- draw_tax_bracket_selector(item.tax_bracket_id, tax_bracket_list_buffer, administration_company_info_get().address.country_code);
+ draw_tax_rate_selector(item.tax_rate_id, tax_rate_list_buffer, administration_company_info_get().address.country_code);
ImGui::PopItemWidth();
ImGui::TableSetColumnIndex(7);