From f67e92f55b6223f2806c3d5ef1cbe2a638920562 Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Fri, 15 Aug 2025 17:28:00 +0200 Subject: working on invoice form --- include/administration.hpp | 8 +++++--- include/ui.hpp | 7 +++++-- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/administration.hpp b/include/administration.hpp index 0917ee5..af9b29e 100644 --- a/include/administration.hpp +++ b/include/administration.hpp @@ -94,18 +94,19 @@ typedef struct char sequential_number[16]; // INV0000000000 - INV9999999999 char customer_id[16]; char supplier_id[16]; + address shipping_address; time_t issued_at; time_t expires_at; time_t delivered_at; - char document[255]; - list_t billing_items; + char document[255]; // path to copy of document for incomming invoice. char project_id[16]; char cost_center_id[16]; + + list_t billing_items; s32 total; s32 tax; s32 net; invoice_status status; - address shipping_address; char currency[8]; time_t keep_untill; time_t payment_on_account_date; @@ -158,6 +159,7 @@ u32 administration_get_project_count(); u32 administration_get_projects(u32 page_index, u32 page_size, project* buffer); bool administration_is_project_valid(project data); project administration_create_empty_project(); +u32 administration_get_all_projects(project* buffer); u32 administration_get_tax_bracket_count(); u32 administration_get_tax_brackets(country_tax_bracket* buffer); diff --git a/include/ui.hpp b/include/ui.hpp index 5c5b6fc..c482eb7 100644 --- a/include/ui.hpp +++ b/include/ui.hpp @@ -11,7 +11,7 @@ typedef enum void ui_helper_draw_required_tag(); void ui_helper_show_toast(const char* msg); void ui_helper_draw_toasts(); -int ui_helper_TextInputWithAutocomplete(const char* label, const char* hint, char* buffer, size_t buf_size, char** suggestions, int suggestion_count); + void ui_draw_main(); void ui_draw_contacts(); @@ -22,4 +22,7 @@ void ui_draw_settings(); void ui_setup_invoices(); void ui_setup_contacts(); void ui_setup_projects(); -void ui_setup_settings(); \ No newline at end of file +void ui_setup_settings(); + +// Custom imgui widgets. +int ui_helper_TextInputWithAutocomplete(const char* label, const char* hint, char* buffer, size_t buf_size, char** suggestions, int suggestion_count); \ No newline at end of file -- cgit v1.2.3-70-g09d2