summaryrefslogtreecommitdiff
path: root/include/file_templates.hpp
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrikboy@gmail.com>2025-09-06 17:52:54 +0200
committerAldrik Ramaekers <aldrikboy@gmail.com>2025-09-06 17:52:54 +0200
commit17e035839a19a8b10d329c28ccaa44ff608d3a33 (patch)
treeac1e8a9bd087d24c695d07fa492fe2d729a08b2e /include/file_templates.hpp
parent68d0ef1586a90ddef6d0cef7ebd593828282c76a (diff)
peppol file generation work
Diffstat (limited to 'include/file_templates.hpp')
-rw-r--r--include/file_templates.hpp42
1 files changed, 22 insertions, 20 deletions
diff --git a/include/file_templates.hpp b/include/file_templates.hpp
index 3559fbe..de3f509 100644
--- a/include/file_templates.hpp
+++ b/include/file_templates.hpp
@@ -19,7 +19,7 @@ const char* taxbracket_save_template =
" <Id>{{TAXBRACKET_ID}}</Id>\n"
" <CountryCode>{{TAXBRACKET_COUNTRY}}</CountryCode>\n"
" <Rate>{{TAXBRACKET_RATE}}</Rate>\n"
-" <Description>{{TAXBRACKET_DESCRIPTION}}</Description>\n"
+" <Description>{{TAXBRACKET_CATEGORY}}</Description>\n"
"</CountryTaxBracket>\n";
const char* contact_save_template =
@@ -62,6 +62,26 @@ const char* peppol_invoice_tax_subtotal_template =
" </cac:TaxCategory>\n"
" </cac:TaxSubtotal>\n";
+const char* peppol_invoice_line_template =
+" <cac:InvoiceLine>\n"
+" <cbc:ID>{{LINE_ID}}</cbc:ID>\n"
+" <cbc:InvoicedQuantity unitCode=\"{{UNIT_CODE}}\">{{QUANTITY}}</cbc:InvoicedQuantity>\n"
+" <cbc:LineExtensionAmount currencyID=\"{{CURRENCY}}\">{{LINE_AMOUNT}}</cbc:LineExtensionAmount>\n"
+" <cac:Item>\n"
+" <cbc:Name>{{ITEM_NAME}}</cbc:Name>\n"
+" <cac:ClassifiedTaxCategory>\n"
+" <cbc:ID>{{LINE_TAX_CATEGORY}}</cbc:ID>\n"
+" <cbc:Percent>{{LINE_TAX_PERCENT}}</cbc:Percent>\n"
+" <cac:TaxScheme>\n"
+" <cbc:ID>VAT</cbc:ID>\n"
+" </cac:TaxScheme>\n"
+" </cac:ClassifiedTaxCategory>\n"
+" </cac:Item>\n"
+" <cac:Price>\n"
+" <cbc:PriceAmount currencyID=\"{{CURRENCY}}\">{{UNIT_PRICE}}</cbc:PriceAmount>\n"
+" </cac:Price>\n"
+" </cac:InvoiceLine>\n";
+
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"
@@ -151,24 +171,6 @@ const char *peppol_invoice_template =
" <cbc:PayableAmount currencyID=\"{{CURRENCY}}\">{{PAYABLE_AMOUNT}}</cbc:PayableAmount>\n"
" </cac:LegalMonetaryTotal>\n"
"\n"
-" <cac:InvoiceLine>\n"
-" <cbc:ID>{{LINE_ID}}</cbc:ID>\n"
-" <cbc:InvoicedQuantity unitCode=\"{{UNIT_CODE}}\">{{QUANTITY}}</cbc:InvoicedQuantity>\n"
-" <cbc:LineExtensionAmount currencyID=\"{{CURRENCY}}\">{{LINE_AMOUNT}}</cbc:LineExtensionAmount>\n"
-" <cac:Item>\n"
-" <cbc:Description>{{ITEM_DESCRIPTION}}</cbc:Description>\n"
-" <cbc:Name>{{ITEM_NAME}}</cbc:Name>\n"
-" <cac:ClassifiedTaxCategory>\n"
-" <cbc:ID>{{LINE_TAX_CATEGORY}}</cbc:ID>\n"
-" <cbc:Percent>{{LINE_TAX_PERCENT}}</cbc:Percent>\n"
-" <cac:TaxScheme>\n"
-" <cbc:ID>VAT</cbc:ID>\n"
-" </cac:TaxScheme>\n"
-" </cac:ClassifiedTaxCategory>\n"
-" </cac:Item>\n"
-" <cac:Price>\n"
-" <cbc:PriceAmount currencyID=\"{{CURRENCY}}\">{{UNIT_PRICE}}</cbc:PriceAmount>\n"
-" </cac:Price>\n"
-" </cac:InvoiceLine>\n"
+" {{INVOICE_LINE_LIST}}"
"\n"
"</Invoice>\n";