diff options
| author | Aldrik Ramaekers <aldrikboy@gmail.com> | 2025-10-04 16:53:57 +0200 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrikboy@gmail.com> | 2025-10-04 16:53:57 +0200 |
| commit | f9f1955748a3b369f0a015405af131c9b6e3285c (patch) | |
| tree | c74cec6b30daccee2d1841627b3913c51fd549e3 /src/importer.cpp | |
| parent | 2855642dd16cea260f3b32351f0529328a0bcb15 (diff) | |
namespace for logger, strops, locales
Diffstat (limited to 'src/importer.cpp')
| -rw-r--r-- | src/importer.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/importer.cpp b/src/importer.cpp index 404ee8c..42fdaa4 100644 --- a/src/importer.cpp +++ b/src/importer.cpp @@ -23,7 +23,7 @@ #define CPPHTTPLIB_OPENSSL_SUPPORT #include "httplib.h" -#include "log.hpp" +#include "logger.hpp" #include "importer.hpp" #include "strops.hpp" #include "administration_reader.hpp" @@ -65,7 +65,7 @@ static int _ai_document_to_invoice_t(void *arg) { memset(template_buffer, 0, query_buffer_len); strncpy(template_buffer, file_template::peppol_invoice_template, query_buffer_len); - strops_replace(template_buffer, 50000, "{{INVOICE_LINE_LIST}}", file_template::peppol_invoice_line_template); + strops::replace(template_buffer, 50000, "{{INVOICE_LINE_LIST}}", file_template::peppol_invoice_line_template); char* ai_query = "\n\nI have provided a file containing an invoice. Fill in the above Peppol 3.0 template with the information from the invoice.\n" @@ -120,15 +120,15 @@ static int _ai_document_to_invoice_t(void *arg) { // Set customer or supplier depending on incomming or outgoing. contact my_info = administration_company_info_get(); memcpy(&inv.customer, &my_info, sizeof(contact)); - strops_copy(inv.customer.id, MY_COMPANY_ID, MAX_LEN_ID); + strops::copy(inv.customer.id, MY_COMPANY_ID, MAX_LEN_ID); // Project and cost centers cannot be interpreted from file so are set to 0. - strops_copy(inv.project_id, "", MAX_LEN_ID); - strops_copy(inv.cost_center_id, "", MAX_LEN_ID); + strops::copy(inv.project_id, "", MAX_LEN_ID); + strops::copy(inv.cost_center_id, "", MAX_LEN_ID); // Set document references and save copy to disk. - strops_copy(inv.document.original_path, file_path, MAX_LEN_PATH); - strops_copy(inv.document.copy_path, "", MAX_LEN_PATH); + strops::copy(inv.document.original_path, file_path, MAX_LEN_PATH); + strops::copy(inv.document.copy_path, "", MAX_LEN_PATH); // Set dates. if (inv.expires_at == 0) { @@ -153,7 +153,7 @@ import_invoice_request* ai_document_to_invoice(char* file_path) result->started_at = time(NULL); result->error = I_ERR_SUCCESS; result->status = import_status::IMPORT_STARTING; - strops_copy(result->file_path, file_path, MAX_LEN_PATH); + strops::copy(result->file_path, file_path, MAX_LEN_PATH); thrd_t thr; if (thrd_create(&thr, _ai_document_to_invoice_t, result) != thrd_success) { |
