Package net.tangly.erp.invoices.domain


package net.tangly.erp.invoices.domain
Provides core abstractions used in any commercial application in need of invoice handling. The defined information forms the basis to create an output invoice legible for human beings and fulfilling the European requirements for a legal invoice document.

Abstractions

The invoices package is designed as a bounded domain.

Articles define the items being sold and are referred in invoice lines.

Invoices

Definition

An invoice, bill or tab is a commercial document issued by a seller to a buyer, relating to a sale transaction and indicating the products, quantities, and agreed prices for products or services the seller had provided the buyer.

Payment terms are usually stated on the invoice. These may specify that the buyer has a maximum number of days in which to pay and is sometimes offered a discount if paid before the due date. The buyer could have already paid for the products or services listed on the invoice. To avoid confusion, and consequent unnecessary communications from buyer to seller, some sellers clearly state in large and/or capital letters on an invoice whether it has already been paid.

From the point of view of a seller, an invoice is a sales invoice. From the point of view of a buyer, an invoice is a purchase invoice. The document indicates the buyer and seller, but the term invoice indicates money is owed or owing.

Within the European union, an invoice is primarily legally defined by the EU VAT directive as an accounting voucher (to verify tax and VAT reporting) and secondly as a Civil law (common law) document.

Implementation

An invoice instance shall fully define the content of legally binding invoice. The provided information allows the sending of an invoice either per post mail or per electronic mail. Digital features such as SwissQR code or European FacturX digital invoice can be created with the invoice data.

Invoice instances are archived as a JSON document. Such a document can be stored on a file system or in a database.