diff options
| author | Aldrik Ramaekers <aldrikboy@gmail.com> | 2025-09-06 11:58:12 +0200 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrikboy@gmail.com> | 2025-09-06 11:58:12 +0200 |
| commit | 68d0ef1586a90ddef6d0cef7ebd593828282c76a (patch) | |
| tree | 6166037ca8a5d5ad168badc7ff5b76510bf05df4 /include/file_templates.hpp | |
| parent | b970907ef53f1b8367285cbe7c2dc2a7fa47967f (diff) | |
working on invoice templates
Diffstat (limited to 'include/file_templates.hpp')
| -rw-r--r-- | include/file_templates.hpp | 79 |
1 files changed, 67 insertions, 12 deletions
diff --git a/include/file_templates.hpp b/include/file_templates.hpp index f267055..3559fbe 100644 --- a/include/file_templates.hpp +++ b/include/file_templates.hpp @@ -1,3 +1,67 @@ +const char* project_save_template = +"<Project>\n" +" <Id>{{PROJECT_ID}}</Id>\n" +" <Description>{{PROJECT_DESCRIPTION}}</Description>\n" +" <State>{{PROJECT_STATE}}</State>\n" +" <StartDate>{{PROJECT_STARTDATE}}</StartDate>\n" +" <EndDate>{{PROJECT_ENDDATE}}</EndDate>\n" +"</Project>\n"; + +const char* costcenter_save_template = +"<CostCenter>\n" +" <Id>{{COSTCENTER_ID}}</Id>\n" +" <Code>{{COSTCENTER_CODE}}</Code>\n" +" <Description>{{COSTCENTER_DESCRIPTION}}</Description>\n" +"</CostCenter>\n"; + +const char* taxbracket_save_template = +"<CountryTaxBracket>\n" +" <Id>{{TAXBRACKET_ID}}</Id>\n" +" <CountryCode>{{TAXBRACKET_COUNTRY}}</CountryCode>\n" +" <Rate>{{TAXBRACKET_RATE}}</Rate>\n" +" <Description>{{TAXBRACKET_DESCRIPTION}}</Description>\n" +"</CountryTaxBracket>\n"; + +const char* contact_save_template = +"<Contact>\n" +" <Id>{{CONTACT_ID}}</Id>\n" +" <Name>{{CONTACT_NAME}}</Name>\n" +" <Type>{{CONTACT_TYPE}}</Type>\n" +" <TaxId>{{CONTACT_TAXID}}</TaxId>\n" +" <BusinessId>{{CONTACT_BUSINESSID}}</BusinessId>\n" +" <Email>{{CONTACT_EMAIL}}</Email>\n" +" <PhoneNumber>{{CONTACT_PHONENUMBER}}</PhoneNumber>\n" +" <BankAccount>{{CONTACT_BANKACCOUNT}}</BankAccount>\n" +" <Address>\n" +" <AddressLine1>{{CONTACT_ADDRESS1}}</AddressLine1>\n" +" <AddressLine2>{{CONTACT_ADDRESS2}}</AddressLine2>\n" +" <CountryCode>{{CONTACT_COUNTRY}}</CountryCode>\n" +" <City>{{CONTACT_CITY}}</City>\n" +" <Postal>{{CONTACT_POSTAL}}</Postal>\n" +" <Region>{{CONTACT_REGION}}</Region>\n" +" </Address>\n" +"</Contact>\n"; + +const char* administration_save_template = +"<Administration>\n" +" <NextId>{{NEXT_ID}}</NextId>\n" +" <NextSequenceNumber>{{NEXT_SEQUENCE_NUMBER}}</NextSequenceNumber>\n" +" <ProgramVersion>{{PROGRAM_VERSION}}</ProgramVersion>\n" +"</Administration>\n"; + +const char* peppol_invoice_tax_subtotal_template = +" <cac:TaxSubtotal>\n" +" <cbc:TaxableAmount currencyID=\"{{CURRENCY}}\">{{TAXABLE_AMOUNT}}</cbc:TaxableAmount>\n" +" <cbc:TaxAmount currencyID=\"{{CURRENCY}}\">{{TAX_AMOUNT}}</cbc:TaxAmount>\n" +" <cac:TaxCategory>\n" +" <cbc:ID>{{TAX_CATEGORY}}</cbc:ID>\n" +" <cbc:Percent>{{TAX_PERCENT}}</cbc:Percent>\n" +" <cac:TaxScheme>\n" +" <cbc:ID>VAT</cbc:ID>\n" +" </cac:TaxScheme>\n" +" </cac:TaxCategory>\n" +" </cac:TaxSubtotal>\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" @@ -63,7 +127,8 @@ const char *peppol_invoice_template = " </cac:AccountingCustomerParty>\n" "\n" " <cac:PaymentMeans>\n" -" <cbc:PaymentMeansCode>31</cbc:PaymentMeansCode>\n" +" <cbc:PaymentMeansCode>{{PAYMENT_TYPE}}</cbc:PaymentMeansCode>\n" +" <cbc:PaymentID>{{INVOICE_ID}}</cbc:PaymentID>\n" " <cac:PayeeFinancialAccount>\n" " <cbc:ID>{{SUPPLIER_IBAN}}</cbc:ID>\n" " <cac:FinancialInstitutionBranch>\n" @@ -76,17 +141,7 @@ const char *peppol_invoice_template = "\n" " <cac:TaxTotal>\n" " <cbc:TaxAmount currencyID=\"{{CURRENCY}}\">{{TOTAL_TAX_AMOUNT}}</cbc:TaxAmount>\n" -" <cac:TaxSubtotal>\n" -" <cbc:TaxableAmount currencyID=\"{{CURRENCY}}\">{{TAXABLE_AMOUNT}}</cbc:TaxableAmount>\n" -" <cbc:TaxAmount currencyID=\"{{CURRENCY}}\">{{TAX_AMOUNT}}</cbc:TaxAmount>\n" -" <cac:TaxCategory>\n" -" <cbc:ID>{{TAX_CATEGORY}}</cbc:ID>\n" -" <cbc:Percent>{{TAX_PERCENT}}</cbc:Percent>\n" -" <cac:TaxScheme>\n" -" <cbc:ID>VAT</cbc:ID>\n" -" </cac:TaxScheme>\n" -" </cac:TaxCategory>\n" -" </cac:TaxSubtotal>\n" +" {{TAX_SUBTOTAL_LIST}}" " </cac:TaxTotal>\n" "\n" " <cac:LegalMonetaryTotal>\n" |
