From aa7b5ef6ab4f45d2e8e0caa7942db31fc60b3861 Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Sat, 27 Sep 2025 11:56:24 +0200 Subject: document selector for invoice --- include/administration.hpp | 8 +++++++- include/file_templates.hpp | 3 ++- include/ui.hpp | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/administration.hpp b/include/administration.hpp index b3f453e..e926aa6 100644 --- a/include/administration.hpp +++ b/include/administration.hpp @@ -249,6 +249,12 @@ typedef struct float allowance; } tax_subtotal; +typedef struct +{ + char original_path[MAX_LEN_PATH]; + char copy_path[MAX_LEN_PATH]; +} document; + typedef struct { char id[MAX_LEN_ID]; // I/[id] @@ -256,7 +262,7 @@ typedef struct time_t issued_at; time_t expires_at; time_t delivered_at; - char document[MAX_LEN_PATH]; // path to copy of document for incomming invoice. + document document; // path to copy of document for incomming invoice. char project_id[MAX_LEN_ID]; // Optional. char cost_center_id[MAX_LEN_ID]; // For incomming invoices. optional. list_t billing_items; diff --git a/include/file_templates.hpp b/include/file_templates.hpp index 4ed3611..8571368 100644 --- a/include/file_templates.hpp +++ b/include/file_templates.hpp @@ -134,7 +134,8 @@ const char *peppol_invoice_template = " \n" "\n" " \n" -" {{INVOICE_DOCUMENT}}\n" +" {{INVOICE_DOCUMENT_COPY}}\n" +" {{INVOICE_DOCUMENT_ORIG}}\n" " \n" "\n" " \n" diff --git a/include/ui.hpp b/include/ui.hpp index ebfa210..955964b 100644 --- a/include/ui.hpp +++ b/include/ui.hpp @@ -98,6 +98,7 @@ namespace ImGui void InputTextWithError(const char* text, char* buffer, size_t buf_size, bool has_error); int TextInputWithAutocomplete(const char* hint, char* buffer, size_t buf_size, char** suggestions, int suggestion_count, bool has_error); + bool FormFileSelector(char* buffer); void FormContactAutocomplete(contact* buffer, bool has_error); void FormInputTextWithErrorHint(const char* hint, char* buffer, size_t buf_size, bool has_error); void FormCountryCombo(char* buffer, size_t buf_size); -- cgit v1.2.3-70-g09d2