summaryrefslogtreecommitdiff
path: root/include/file_templates.hpp
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrikboy@gmail.com>2025-09-13 18:47:01 +0200
committerAldrik Ramaekers <aldrikboy@gmail.com>2025-09-13 18:47:01 +0200
commit38019a9693375ac6719ffec43bff63774e142387 (patch)
treee9374df460f7949c93a9dc031f450bffb906f6c2 /include/file_templates.hpp
parentd8a9d534a5a39fd3d51a6ffaf92fde39a4b4077c (diff)
invoice peppol work
Diffstat (limited to 'include/file_templates.hpp')
-rw-r--r--include/file_templates.hpp109
1 files changed, 92 insertions, 17 deletions
diff --git a/include/file_templates.hpp b/include/file_templates.hpp
index cb89050..af2f373 100644
--- a/include/file_templates.hpp
+++ b/include/file_templates.hpp
@@ -64,23 +64,37 @@ const char* peppol_invoice_tax_subtotal_template =
" </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"
+" <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: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:Amount currencyID=\"{{CURRENCY}}\">{{DISCOUNT_TOTAL}}</cbc:Amount>\n"
+" <cbc:BaseAmount currencyID=\"{{CURRENCY}}\">{{DISCOUNT_BASE_AMOUNT}}</cbc:BaseAmount>\n"
+" </cac:AllowanceCharge>\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 =
@@ -94,12 +108,25 @@ const char *peppol_invoice_template =
"\n"
" <cbc:ID>{{INVOICE_ID}}</cbc:ID>\n"
" <cbc:IssueDate>{{ISSUE_DATE}}</cbc:IssueDate>\n"
+" <cbc:DueDate>{{DUE_DATE}}</cbc:DueDate>\n"
" <cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>\n"
" <cbc:DocumentCurrencyCode>{{CURRENCY}}</cbc:DocumentCurrencyCode>\n"
"\n"
+" <cac:AdditionalDocumentReference>\n"
+" <cbc:ID>{{INVOICE_DOCUMENT}}</cbc:ID>\n"
+" </cac:AdditionalDocumentReference>\n"
+"\n"
+" <cac:ProjectReference>\n"
+" <cbc:ID>{{PROJECT_ID}}</cbc:ID>\n"
+" </cac:ProjectReference>\n"
+" <cbc:AccountingCost>{{COST_CENTER_CODE}}</cbc:AccountingCost>\n"
+"\n"
" <cac:AccountingSupplierParty>\n"
" <cac:Party>\n"
" <cbc:EndpointID schemeID=\"{{SUPPLIER_ENDPOINT_SCHEME}}\">{{SUPPLIER_ENDPOINT_ID}}</cbc:EndpointID>\n"
+" <cac:PartyIdentification>\n"
+" <cbc:ID schemeID=\"ZZZ\">{{SUPPLIER_ID}}</cbc:ID>\n"
+" </cac:PartyIdentification>\n"
" <cac:PartyName>\n"
" <cbc:Name>{{SUPPLIER_NAME}}</cbc:Name>\n"
" </cac:PartyName>\n"
@@ -119,12 +146,27 @@ const char *peppol_invoice_template =
" <cbc:ID>VAT</cbc:ID>\n"
" </cac:TaxScheme>\n"
" </cac:PartyTaxScheme>\n"
+"\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"
+" <cbc:Name>{{SUPPLIER_NAME}}</cbc:Name>\n"
+" <cbc:Telephone>{{SUPPLIER_PHONE_NUMBER}}</cbc:Telephone>\n"
+" <cbc:ElectronicMail>{{SUPPLIER_EMAIL}}</cbc:ElectronicMail>\n"
+" </cac:Contact>\n"
+"\n"
" </cac:Party>\n"
" </cac:AccountingSupplierParty>\n"
"\n"
" <cac:AccountingCustomerParty>\n"
" <cac:Party>\n"
" <cbc:EndpointID schemeID=\"{{CUSTOMER_ENDPOINT_SCHEME}}\">{{CUSTOMER_ENDPOINT_ID}}</cbc:EndpointID>\n"
+" <cac:PartyIdentification>\n"
+" <cbc:ID schemeID=\"ZZZ\">{{CUSTOMER_ID}}</cbc:ID>\n"
+" </cac:PartyIdentification>\n"
" <cac:PartyName>\n"
" <cbc:Name>{{CUSTOMER_NAME}}</cbc:Name>\n"
" </cac:PartyName>\n"
@@ -144,9 +186,42 @@ const char *peppol_invoice_template =
" <cbc:ID>VAT</cbc:ID>\n"
" </cac:TaxScheme>\n"
" </cac:PartyTaxScheme>\n"
+"\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"
+" <cbc:Name>{{CUSTOMER_NAME}}</cbc:Name>\n"
+" <cbc:Telephone>{{CUSTOMER_PHONE_NUMBER}}</cbc:Telephone>\n"
+" <cbc:ElectronicMail>{{CUSTOMER_EMAIL}}</cbc:ElectronicMail>\n"
+" </cac:Contact>\n"
+"\n"
" </cac:Party>\n"
" </cac:AccountingCustomerParty>\n"
"\n"
+"<cac:Delivery>\n"
+" <cbc:ActualDeliveryDate>{{DELIVERY_DATE}}</cbc:ActualDeliveryDate>\n"
+" <cac:DeliveryLocation>\n"
+" <cac:Address>\n"
+" <cbc:StreetName>{{DELIVERY_STREET}}</cbc:StreetName>\n"
+" <cbc:AdditionalStreetName>{{DELIVERY_STREET2}}</cbc:AdditionalStreetName>\n"
+" <cbc:CityName>{{DELIVERY_CITY}}</cbc:CityName>\n"
+" <cbc:PostalZone>{{DELIVERY_POSTAL}}</cbc:PostalZone>\n"
+" <cbc:CountrySubentity>{{DELIVERY_REGION}}</cbc:CountrySubentity>\n"
+" <cac:Country>\n"
+" <cbc:IdentificationCode>{{DELIVERY_COUNTRY}}</cbc:IdentificationCode>\n"
+" </cac:Country>\n"
+" </cac:Address>\n"
+" </cac:DeliveryLocation>\n"
+" <cac:DeliveryParty>\n"
+" <cac:PartyName>\n"
+" <cbc:Name>{{DELIVERY_NAME}}</cbc:Name>\n"
+" </cac:PartyName>\n"
+" </cac:DeliveryParty>\n"
+"</cac:Delivery>\n"
+"\n"
" <cac:PaymentMeans>\n"
" <cbc:PaymentMeansCode>{{PAYMENT_TYPE}}</cbc:PaymentMeansCode>\n"
" <cbc:PaymentID>{{INVOICE_ID}}</cbc:PaymentID>\n"