Finance & RegTech
Outgoing e-invoices from Unit4 ERP
Key achievements
olmk0292yoyavecfpyffgded8w89uf-large.webp&w=3840&q=75)
„Their competence and solution-oriented approach have been key factors in successfully developing and implementing the targeted Invoice2XML solution.“
Antje Lindner, COO, ACE Solutions
Client
ACE Solutions is a Unit4 Business Software (formerly Agresso) consulting and implementation partner and Hotovo's partner since 2017. Besides implementing Unit4 ERP for its customers, ACE offers its own product extensions that solve recurring finance processes on top of the platform. Invoice2XML, its outgoing e-invoicing extension and the sales-side counterpart of Invoice2UBW, is used by ACE itself and runs in production at multiple ACE customers, both on-premise and in Unit4 Cloud.
Case study
The need
ACE's customers bill their clients directly from Unit4 (project and timesheet invoices, sales order invoices and free-text invoices), but the standard processes only produce PDF printouts. German public-sector clients already demanded XRechnung, and the German e-invoicing mandate (receipt from 2025, issuing phased in from 2027) requires structured, standard-compliant data on every B2B invoice. ACE needed an extension that turns each invoice Unit4 already prints into a valid ZUGFeRD/XRechnung e-invoice and archives it automatically. Without it, customers would face rejected invoices, delayed payments and manual rework outside the ERP.
Core issue
- Moving standards – ZUGFeRD and XRechnung kept evolving during the product's lifetime (XRechnung 3.0.1, ZUGFeRD library upgrades up to 18.0), and every change had to reach customers without breaking their invoicing.
- Seven processes, one engine – project billing (TS02, TS22, TS25), sales order invoicing (SO07, SO13) and free-text invoicing (FI01, FI09) each keep invoice data differently in Unit4 tables and report outputs.
- Tax and rounding precision – VAT categories, exemptions, discounts, rounding and line totals must reconcile exactly with the printed PDF, or the invoice is rejected by the recipient's validation.
- Deep ERP integration – everything had to run inside Unit4 server processes without modifying the standard reports: reading invoice data, embedding the XML into the PDF as PDF/A-3 and storing the result in Unit4 Document Archive.
- Customer-specific rules – each customer fills buyer references, purchase order IDs, performance periods, bank details and addresses differently, so the product had to be configurable rather than forked per customer.
Our solution
Hotovo took full ownership of Invoice2XML, from solution design with ACE consultants through development, testing and packaging to releases deployed in customers' Unit4 environments. The team has maintained it since the first release in 2021.
Rather than replacing Unit4's invoice reports, the team hooked into them. After a standard invoicing process prints its PDF, Invoice2XML reads the invoice data from Unit4 and builds a ZUGFeRD or XRechnung XML. It embeds the XML into the PDF as a PDF/A-3 hybrid invoice, stores it in Unit4 Document Archive and can also email it to the customer. Accountants keep working in their usual processes, and the e-invoice is produced automatically.
Key technical capabilities delivered
- Seven invoicing processes covered – project and timesheet invoicing (TS02, TS22, TS25), sales order invoicing (SO07, SO13) and free-text invoicing (FI01, FI09), including invoice copies and credit notes.
- Standards-compliant XML generation – ZUGFeRD Comfort (EN 16931), Extended and XRechnung profiles built with ZUGFeRD-csharp and kept current with XRechnung 3.0.1.
- Hybrid PDF/A-3 invoices – the generated XML is embedded into the original Unit4 PDF as a ZUGFeRD/Factur-X attachment with matching conformance-level metadata. The result is one PDF/A-3b file that both people and machines can read.
- Own PDF processing service – Hotovo built PDFProcessorService, a .NET 9 REST API running on Azure App Service in ACE's subscription. Token-secured endpoints embed the XML and convert the invoice to PDF/A-3b, offer a size-optimised variant, and extract the XML back from existing e-invoices.
- File-size optimisation – font subsetting, removal of unused objects and image re-compression keep converted invoices well within Unit4 Document Archive limits.
- Value mapping via flexifield – Unit4 units, payment methods and other codes are mapped to standard code lists through a configurable flexifield instead of hard-coded values.
- Custom XML node mapping – customer-specific values (buyer reference, purchase order ID, notes, performance period, bank details) are routed to the right business terms (BT-xx) by configuration.
- Tax, discount and rounding engine – VAT categories, exemption reasons, allowances, charges and rounding are calculated so the XML reconciles exactly with the printed invoice.
- Archiving and distribution – finished e-invoices are stored in Unit4 Document Archive (2008 and 2014 APIs) with configurable document types and indexes, and can be emailed to the customer.
- Cloud-ready packaging – one install package for on-premise and Unit4 Cloud, PowerShell install and uninstall scripts, versioned database scripts and a license key generator.
- Automated test coverage – 490+ NUnit tests (590+ incl. parameterised cases) covering every process, XML business terms, tax calculations and customer-specific rules.
Compliance and quality controls
- Official profiles, not hand-made XML – XML is generated through the established ZUGFeRD-csharp library against official profiles, so output follows EN 16931 and XRechnung rules by construction.
- Reconciled with the PDF – amounts, taxes and line totals are computed from the same Unit4 data the printed invoice uses, so the visual and the structured invoice never disagree.
- Clean, valid output – empty or inapplicable elements (e.g. empty BT-29, VAT identifiers on invoices not subject to VAT) are removed and over-long values moved to notes, so recipients' validators accept the file.
- Archive-grade PDF/A-3b – after conversion the service restores the embedded XML's MIME type and description, so validators and Unit4 recognise the e-invoice attachment. Sample invoices from real customers are part of its test suite.
- Regression-tested per customer – every process variant and customer configuration has automated tests with XML fixtures, so a change for one customer cannot silently break another.
- Traceable – each run is logged with diagnostic detail and saved file logs, so support can trace any invoice from print to archive.
Key results
- Compliant e-invoices early – first release (TS02) shipped in August 2021, more than three years before the first stage of the German B2B mandate. Coverage has since grown to seven invoicing processes.
- No change for accountants – invoices are still created in standard Unit4 processes. The e-invoice is generated, embedded and archived automatically.
- In production at multiple customers – six customer-specific configurations served from a single codebase, on-premise and in Unit4 Cloud.
- Continuous delivery – 31 versions and 1,000+ commits over five years, each release with documented release notes and a versioned install package.
- Kept current with the standards – XRechnung 3.0.1 and successive ZUGFeRD library upgrades rolled out as tested, versioned releases.
- AI-accelerated delivery – the team uses Claude Code for analysis, implementation, testing and release automation. Six releases shipped in eight weeks in autumn 2026.
- One suite for both directions – together with Invoice2UBW, Invoice2XML covers both incoming and outgoing e-invoices for Unit4.
- Mandate rollout – as the German e-invoice issuing obligation phases in from 2027, Invoice2XML is being extended to more customers and process variants.
Hotovo remains ACE Solutions' development partner for Unit4 extensions, a collaboration running since 2017.
Tech stack
- Unit4: Unit4 Business World Milestone 7 server processes and report extensions (ACT), flexifields, common parameters
- Backend: C#, .NET Framework 4.6.2, ZUGFeRD-csharp 18.0, Unit4 DocumentArchive web services (SOAP), SQL Server, Microsoft.Extensions DI and logging
- QA & Testing: NUnit, Moq, MockHttp, XMLUnit, real customer XML fixtures, UAT with ACE consultants
- PDF Service: PDFProcessorService, a Hotovo-built ASP.NET Core minimal API (.NET 9) on Azure App Service (ACE subscription), Aspose.PDF, ZUGFeRD.PDF-csharp, NUnit
- AI Dev Tooling: Visual Studio + Claude Code
- Infrastructure: Unit4 Cloud and on-premise, Microsoft Azure (PDF service), PowerShell install scripts, Azure Pipelines, Git, Jira, Confluence
Team size
Hotovo team:
- 1–2 Full-Stack Developers – Unit4 (Agresso) extensions in C#/.NET, server processes, ZUGFeRD/XRechnung, EN 16931 tax rules
On client side:
- ACE Solutions consultants – business requirements, customer setup, user acceptance testing
The developers use Claude Code for analysis, implementation, code review and release automation.
1y8bw9zwfkekqjq4zuqkimrxonh0ju-small.webp&w=3840&q=75)
bpbmnhkyjx1n9mc6e5yeyhtcluq9u0-small.webp&w=3840&q=75)


euua9o2fq5z0suhnfth70r89t234p0-small.webp&w=3840&q=75)













5bu3ff6jrd3rkfexehtdzzir8p1hs7-small.webp&w=3840&q=75)
ffejbupeoflmiy7b1rg817ztopi7hl-small.webp&w=3840&q=75)

9u80rif7ydl8z0gol4yocpxdjxa79j-small.webp&w=3840&q=75)




