Package net.tangly.erp.invoices.domain
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.
-
ClassDescriptionA product sold by a legal entity and referenced in an invoice or an invoice line.Defines the product categories we offer in our shop.The abstraction of an invoice with a set of positions, subtotals, and a total.The invoice item represents a position of sold items defined through a product.Define a legal entity referenced in an invoice.The invoice line represents one line or position in an invoice.The subtotal defines the sum for a set of positions in the invoice.