diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/administration.hpp | 10 | ||||
| -rw-r--r-- | include/administration_reader.hpp | 4 | ||||
| -rw-r--r-- | include/file_templates.hpp | 13 |
3 files changed, 20 insertions, 7 deletions
diff --git a/include/administration.hpp b/include/administration.hpp index fede22a..d899987 100644 --- a/include/administration.hpp +++ b/include/administration.hpp @@ -280,6 +280,11 @@ typedef struct typedef struct { + invoice_status status; +} invoice_extras; + +typedef struct +{ char id[MAX_LEN_ID]; // I/[id] char sequential_number[MAX_LEN_SEQ_NUM]; // INV0000000000 - INV9999999999 time_t issued_at; @@ -298,13 +303,14 @@ typedef struct char currency[MAX_LEN_CURRENCY]; // 3 letter code bool is_triangulation; // True if addressee != customer - invoice_status status; bool is_outgoing; // Outgoing or incomming invoice. payment_information payment_means; - + contact supplier; contact customer; delivery_info addressee; + + invoice_extras extras; // Stored outside of invoice file. } invoice; typedef struct diff --git a/include/administration_reader.hpp b/include/administration_reader.hpp index b2311af..bb9ba29 100644 --- a/include/administration_reader.hpp +++ b/include/administration_reader.hpp @@ -16,6 +16,8 @@ #pragma once +#include <zip.h> + namespace administration_reader { bool open_new(); @@ -26,7 +28,7 @@ namespace administration_reader { bool import_cost_center(char* buffer, size_t buffer_size); bool import_project(char* buffer, size_t buffer_size); bool import_contact(char* buffer, size_t buffer_size); - bool import_invoice(char* buffer, size_t buffer_size); + bool import_invoice(zip_t* zip, char* buffer, size_t buffer_size); bool read_invoice_from_xml(invoice* result, char* buffer, size_t buffer_size); }
\ No newline at end of file diff --git a/include/file_templates.hpp b/include/file_templates.hpp index c5e0191..5404270 100644 --- a/include/file_templates.hpp +++ b/include/file_templates.hpp @@ -126,6 +126,11 @@ namespace file_template { " </cac:Price>\n" " </cac:InvoiceLine>\n"; + static const char *invoice_extras_template = + "<InvoiceExtras>\n" + " <Status>{{INVOICE_STATUS}}</Status>\n" + "</InvoiceExtras>\n"; + static const char *peppol_invoice_template = /*"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"*/ "<Invoice xmlns=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\"\n" @@ -141,10 +146,10 @@ namespace file_template { " <cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>\n" " <cbc:DocumentCurrencyCode>{{CURRENCY}}</cbc:DocumentCurrencyCode>\n" "\n" - " <cac:DespatchDocumentReference>\n" - " <cbc:ID>{{INVOICE_STATUS}}</cbc:ID>\n" - " </cac:DespatchDocumentReference>\n" - "\n" + // " <cac:DespatchDocumentReference>\n" + // " <cbc:ID>{{INVOICE_STATUS}}</cbc:ID>\n" + // " </cac:DespatchDocumentReference>\n" + // "\n" " <cac:AdditionalDocumentReference>\n" " <cbc:ID>{{INVOICE_DOCUMENT_COPY}}</cbc:ID>\n" " <cbc:DocumentDescription>{{INVOICE_DOCUMENT_ORIG}}</cbc:DocumentDescription>\n" |
