summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/administration.hpp1
-rw-r--r--include/config.hpp7
-rw-r--r--include/file_templates.hpp8
-rw-r--r--include/ui.hpp18
4 files changed, 23 insertions, 11 deletions
diff --git a/include/administration.hpp b/include/administration.hpp
index cfdb293..0d15195 100644
--- a/include/administration.hpp
+++ b/include/administration.hpp
@@ -367,6 +367,7 @@ typedef struct
#define A_ERR_MISSING_BUSINESSID (1ULL << 14)
#define A_ERR_MAX_ITEMS_REACHED (1ULL << 15)
#define A_ERR_MISSING_CODE (1ULL << 16)
+#define A_ERR_MISSING_EMAIL (1ULL << 17)
typedef uint32_t a_err;
diff --git a/include/config.hpp b/include/config.hpp
index 2284c8a..9598841 100644
--- a/include/config.hpp
+++ b/include/config.hpp
@@ -29,4 +29,9 @@
#define u8 uint8_t
#define u16 uint16_t
#define u32 uint32_t
-#define u64 uint64_t \ No newline at end of file
+#define u64 uint64_t
+
+extern const char* country_codes[];
+extern s32 country_count;
+
+#define COLOR_ERROR_OUTLINE IM_COL32(255, 0, 0, 80) \ No newline at end of file
diff --git a/include/file_templates.hpp b/include/file_templates.hpp
index 1980d97..9064abf 100644
--- a/include/file_templates.hpp
+++ b/include/file_templates.hpp
@@ -84,14 +84,10 @@ const char* peppol_invoice_line_template =
" <cbc:InvoicedQuantity unitCode=\"{{UNIT_CODE}}\">{{QUANTITY}}</cbc:InvoicedQuantity>\n"
" <cbc:LineExtensionAmount currencyID=\"{{CURRENCY}}\">{{LINE_AMOUNT}}</cbc:LineExtensionAmount>\n"
-" <cac:OrderLineReference>\n"
-" <cbc:LineID>{{TAX_BRACKET_ID}}</cbc:LineID>\n"
-" </cac:OrderLineReference>\n"
-
" <cac:AllowanceCharge>\n"
" <cbc:ChargeIndicator>false</cbc:ChargeIndicator>\n"
" <cbc:AllowanceChargeReason>Discount</cbc:AllowanceChargeReason>\n"
-" {{ALLOWANCE_IS_PERCENTAGE}}\n"
+" <cbc:MultiplierFactorNumeric>{{DISCOUNT_TOTAL_PERCENTAGE}}</cbc:MultiplierFactorNumeric>\n"
" <cbc:Amount currencyID=\"{{CURRENCY}}\">{{DISCOUNT_TOTAL}}</cbc:Amount>\n"
" <cbc:BaseAmount currencyID=\"{{CURRENCY}}\">{{DISCOUNT_BASE_AMOUNT}}</cbc:BaseAmount>\n"
" </cac:AllowanceCharge>\n"
@@ -168,7 +164,6 @@ const char *peppol_invoice_template =
"\n"
" <cac:PartyLegalEntity>\n"
" <cbc:RegistrationName>{{SUPPLIER_LEGAL_NAME}}</cbc:RegistrationName>\n"
-" <cbc:CompanyID schemeID=\"ZZZ\">{{SUPPLIER_BUSINESS_ID}}</cbc:CompanyID>\n"
" </cac:PartyLegalEntity>\n"
"\n"
" <cac:Contact>\n"
@@ -208,7 +203,6 @@ const char *peppol_invoice_template =
"\n"
" <cac:PartyLegalEntity>\n"
" <cbc:RegistrationName>{{CUSTOMER_LEGAL_NAME}}</cbc:RegistrationName>\n"
-" <cbc:CompanyID schemeID=\"ZZZ\">{{CUSTOMER_BUSINESS_ID}}</cbc:CompanyID>\n"
" </cac:PartyLegalEntity>\n"
"\n"
" <cac:Contact>\n"
diff --git a/include/ui.hpp b/include/ui.hpp
index cdffa58..d6c5fad 100644
--- a/include/ui.hpp
+++ b/include/ui.hpp
@@ -17,6 +17,7 @@
#pragma once
#include "imgui.h"
+#include "administration.hpp"
#define STATUS_TEXT_LEN 64
#define STATUS_DURATION 4.0f
@@ -61,8 +62,6 @@ typedef struct
extern ImFont* fontBold;
extern ImFont* fontBig;
-void ui_helper_draw_required_tag();
-
ui_status ui_get_status();
void ui_set_status_loading(bool loading);
void ui_set_status_error(const char* txt);
@@ -94,4 +93,17 @@ void ui_destroy_expenses();
void ui_destroy_earnings();
// Custom imgui widgets.
-int TextInputWithAutocomplete(const char* label, const char* hint, char* buffer, size_t buf_size, char** suggestions, int suggestion_count); \ No newline at end of file
+namespace ImGui
+{
+ int TextInputWithAutocomplete(const char* hint, char* buffer, size_t buf_size, char** suggestions, int suggestion_count, bool has_error);
+
+ void FormContactAutocomplete(contact* buffer, bool has_error);
+ void FormInputTextWithErrorHint(const char* hint, void* data, char* buffer, size_t buf_size, bool has_error);
+ void FormCountryCombo(void* data, char* buffer, size_t buf_size);
+ void FormContactTypeCombo(contact_type* type);
+ void FormCostCenterCombo(char* costcenter_id);
+ void FormProjectCombo(char* project_id);
+ void FormTaxRateCombo(char* tax_rate_id, char* orig_country, char* dest_country);
+ bool FormCurrencyCombo(char* currency);
+ void FormToggleCombo(bool *buffer, char* option1, char* option2);
+} \ No newline at end of file