Bounded Domain Invoice Model

Invoices Model


Invoices define a business-bounded domain as defined in domain-driven design approach. They are not constrained through external entities such as products, contracts or legal entities. External entities can provide hints to streamline the creation of regular invoices. The invoice article identifier is available as an external identifier to the article bounded domain. Similar identifiers are available for legal entities.

The currency is defined at the invoice level, meaning all invoice items and subtotals should use the same currency.

VAT Rates

We initially stored VAT rates to the article abstraction. Experience showed that VAT rates are subject to change and should be stored in the invoice line.

Each invoice line has a VAT rate and a computed VAT amount baed on the geographical location, time when the inovice line was created and the VAT rate.

The application does not try to provide a comprehensive VAT rate database and delegates the responsibility to the user to select the correct VAT rates. Reasonable hints are provided through the user interface to streamline the selection process.


An invoice contains all the information to create a legally binding document and hove no dependencies to external systems. Invoices should have a unique identifier for accounting purposes. A good practice is to use the identifier as part of the archived file to streamline traceability. Invoices can be stored in a database, exported as a PDF file or as a JSON file. The PDF file is human-readable and adequate for document archiving and legal auditing. The JSON file is an adequate archive format that can digitally be processed.