<style>p { margin: 0; }span.fr-emoticon.fr-emoticon-img { background-repeat: no-repeat !important; font-size: inherit; height: 1em; width: 1em; min-height: 20px; min-width: 20px; display: inline-block; margin: -0.1em 0.1em 0.1em; line-height: 1; vertical-align: middle; } span.fr-emoticon { font-weight: normal; font-family: "Apple Color Emoji", "Segoe UI Emoji", "NotoColorEmoji", "Segoe UI Symbol", "Android Emoji", "EmojiSymbols"; display: inline; line-height: 0; } blockquote { border-left: solid 2px #5e35b1; color: #5e35b1; margin-left:0; padding-left:5px;}blockquote blockquote{ border-color: #00bcd4; color: #00bcd4;}blockquote blockquote blockquote{ border-color: #43a047; color: #43a047;} table.grid{ border-collapse: collapse;} table.grid td, table.grid th { border: 1px solid #ddd;} .fr-fic.fr-dib{ display: block; margin: 5px auto;}.fr-fic.fr-dib.fr-fir{ text-align: right; margin: 5px 0 5px auto;}.fr-fic.fr-dib.fr-fil{ text-align: left; margin: 5px auto 5px 0;}.fr-fic.fr-dii{ float: none; margin: 5px auto;}.fr-fic.fr-dii.fr-fil{ float: left; margin: 5px auto;}.fr-fic.fr-dii.fr-fir{ float: right; margin: 5px auto;}img.fr-dib.fr-fir { margin-right: 0; text-align: right;}img.fr-dib.fr-fil { margin-left: 0; text-align: left;}img.fr-dib { margin: 5px auto; display: block; float: none;}img.fr-bordered { box-sizing: content-box; border: solid 5px #CCC;}img.fr-shadow { box-shadow: 10px 10px 5px 0px #cccccc;}img.fr-rounded { border-radius: 10px; -moz-border-radius: 10px; -webkit-border-radius: 10px; -moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box;}</style><style>
p {
margin: 0;
}
span.fr-emoticon.fr-emoticon-img {
background-repeat: no-repeat !important; font-size: inherit; height: 1em; width: 1em; min-height: 20px; min-width: 20px; display: inline-block; margin: -0.1em 0.1em 0.1em; line-height: 1; vertical-align: middle;
}
span.fr-emoticon {
font-weight: normal; font-family: "Apple Color Emoji", "Segoe UI Emoji", "NotoColorEmoji", "Segoe UI Symbol", "Android Emoji", "EmojiSymbols"; display: inline; line-height: 0;
}
blockquote {
border-left: solid 2px #5e35b1; color: #5e35b1; margin-left: 0; padding-left: 5px;
}
blockquote blockquote {
border-color: #00bcd4; color: #00bcd4;
}
blockquote blockquote blockquote {
border-color: #43a047; color: #43a047;
}
table.grid {
border-collapse: collapse;
}
table.grid td,
table.grid th {
border: 1px solid #ddd;
}
.fr-fic.fr-dib {
display: block; margin: 5px auto;
}
.fr-fic.fr-dib.fr-fir {
text-align: right; margin: 5px 0 5px auto;
}
.fr-fic.fr-dib.fr-fil {
text-align: left; margin: 5px auto 5px 0;
}
.fr-fic.fr-dii {
float: none; margin: 5px auto;
}
.fr-fic.fr-dii.fr-fil {
float: left; margin: 5px auto;
}
.fr-fic.fr-dii.fr-fir {
float: right; margin: 5px auto;
}
img.fr-dib.fr-fir {
margin-right: 0; text-align: right;
}
img.fr-dib.fr-fil {
margin-left: 0; text-align: left;
}
img.fr-dib {
margin: 5px auto; display: block; float: none;
}
img.fr-bordered {
box-sizing: content-box; border: solid 5px #CCC;
}
img.fr-shadow {
box-shadow: 10px 10px 5px 0px #cccccc;
}
img.fr-rounded {
border-radius: 10px; -moz-border-radius: 10px; -webkit-border-radius: 10px; -moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box;
}
</style><p id="isPasted"><strong>In this guide we will cover:</strong></p><p><strong>- eInvoicing</strong></p><p><strong>- How to embed an XML Attachment to an invoice PDF</strong></p><p><br></p><p><br></p><p><strong><span style="font-size: 14pt;">eInvoicing</span></strong></p><p>Commencing January 1st 2025, the European Union will begin to implement eInvoicing.</p><p>Compliance for this will be optional for 1 year.</p><p>Commencing January 1st 2026, eInvoicing will be made mandatory for all customers in the EU. This will be any clients hosted on our DE server group.</p><p><br></p><p>More information can be found on the EU official eInvoicing page: <a data-fr-linked="true" href="https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing">https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eInvoicing</a></p><p><br></p><p>This functionality is available as of v2.170 and will be available on all Stable builds by January 1st 2026 to comply with the regulations.</p><p><br></p><p><br></p><p><span style="font-size: 14pt;"><strong>How to embed an XML Attachment to an invoice PDF<br></strong></span></p><p>This functionality can be used when you are required to have invoice details in an XML format embedded into your PDF invoices. </p><p><br></p><p>The XML template we provide is based on the EN16931 specification's 'Basic' template. Please note that you may need to adjust this template to match your required specification.</p><p><br></p><p><strong><span style="font-size: 12pt;">Customising the XML template</span></strong></p><p>To customise the template that is is used for the invoice head to configuration > reporting > PDF templates > change the entity to 'Invoice XMLs'. </p><p><br></p><p>Here, you will see the default XML Template, you can either edit this template, or create a new one. Select the template you would like to edit, head to the 'XML attachments' tab and edit the line in the table. </p><p><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6Ijg2N2Y1ZmQ0LWI5YmQtNGQzOC1iYTEyLTA4MTBkNDkwNDYxZiJ9.6TuNVm1sqVNi3FFKvlpicObETg-gsyAmcW8B_FXHHM0" class="fr-fic fr-fil fr-dib" width="1445" style="width: 1447px; height: 596.379px;" height="596"></p><p><br></p><p><strong><span style="font-size: 10pt;">Fig 1. Edit XML invoice template</span></strong></p><p><br></p><p>Now you will be able to see the XML for the template. This already includes variables such as $-INVOICEDATE, $-INVOICETOTAL, $invoiceaddress1 to pull through the key details of the invoice , but additional variables can be added in here to pull though more data if required. To see a list of available variables select the 'View $-variables' button on the template configuration page. </p><p><br></p><p><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImNkOGVlN2RkLWUxMzgtNDdmOC05MDk2LWVhMGM0MDBjOWQ2NyJ9.WB0sioWoSKTUmKA0uKEtwJNMIPu9wuGRxs-ABnCjJNY" class="fr-fic fr-fil fr-dib" width="1632" style="width: 1634px; height: 800.692px;" height="801"></p><p><strong><span style="font-size: 10pt;">Fig 2. XML for template</span></strong></p><p><br></p><p>XML for invoice lines can be set under the 'Invoice line XML' section of the editor. The variable $-INVOICEXMLLINES can be used to pull through this XML. </p><p><br></p><p>XML for Tax codes can be set under the 'Tax detail XML' section of the editor. The variable $-TAXXMLDETAIL can be used to pull through this XML. </p><p><br></p><p>Once you are happy with your template save the editor screen and save the overall template. </p><p><br></p><p><strong><span style="font-size: 12pt;">Apply an XML template to an invoice PDF</span></strong></p><p>In order for an invoice PDF to have the invoice details in XML format embedded against it, an XML template must be set against the invoice template being used. </p><p><br></p><p>Head to configuration > reporting > PDF templates > change the entity to invoices > select a template, edit the page and under the details tab you will see the setting 'XML Attachment Template'. </p><p><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjdjMzU5MWQzLTAzODEtNGI5NC05MzYzLTI1MDk0YzY3YjllMCJ9.TkBlPeYjNc8npYvWIkbUTnCM3z8zKNEB2iAnE4Thve0" class="fr-fic fr-fil fr-dib" width="1432" style="width: 1434px; height: 830.855px;" height="831"></p><p><strong><span style="font-size: 10pt;">Fig 3. Assign XML template to invoice PDF template</span></strong></p><p><br></p><p>Here, set the XML template you would like to use, hit save. </p><p><br></p><p>Now, when you generate an invoice PDF (using this PDF template) it will automatically have the XML template added as an embedded XML attachment. </p><p><br></p><p><strong><em>Note: only specific PDF readers can show attachments embedded in a PDF. For example, you can see them in Adobe, but you cannot in native readers in browsers.</em></strong></p><p><br></p><p><strong><span style="font-size: 12pt;">Display a warning when there is a discrepancy between the Total tax or Revenue on the PDF and XML (<strong id="isPasted">recommended)</strong></span></strong></p><p>This can be used for additional monitoring, we recommend this is enabled.</p><p><br></p><p>Head to Configuration > Billing > Invoice Creation, enable the setting 'Enable XML Attachment generation warnings'</p><p><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6ImM5ZDUyOGRhLTJhOTctNGJhNS05YzJiLWE5OGVmYTQzZGYwNCJ9.4zjT45snotCDbJoHwgwa5T5Cov_dINEo-ou0GBXQceU" class="fr-fic fr-fil fr-dib" width="476" height="233"></p><p><strong><span style="font-size: 10pt;">Fig 4. Enable XML Attachment generation warnings</span></strong></p><p><br></p><p>Once enabled, a pop up message will appear if there is a discrepancy between the total tax or revenue on the invoice PDF and the invoice XML. This will be checked each time an invoice PDF is generated. </p><p><img src="https://halo.haloservicedesk.com/api/attachment/image?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjEwYzZiMGJjLTFjZjQtNDg1ZC04NGQyLWEzYjcxZmQ1NjBhYSJ9.leEjZOPmYB_4WitY5ApYZiZwhkm-Ts5iE04FPfTxpmg" class="fr-fic fr-fil fr-dib" width="832" style="width: 834px; height: 136.182px;" height="136"></p><p><strong><span style="font-size: 10pt;">Fig 5. Pop up warning for discrepancy between the total tax or revenue</span></strong></p>