Introduction

The module’s integration allows you

  • to create invoices for different orders,

  • to choose the format for the invoice - either PDF, or Excel and

  • to send invoices to customers

Business

Development

Core

Entity Definitions

The definitions in this module have id discriminators in the range 200-210.

InvoiceableSiteEntityDefinition

The InvoiceableSiteEntityDefinition adds the invoice page’s features to the SiteEntityDefinition. The SiteEntityDefinition, in its turn, inherits the AbstractEntityDefinition and the AbstractDescriptionableEntityDefinition:

asciidoctor diagram InvoiceableSiteEntityDefinition

The added property here is invoicePage. It is designed to store the invoice page (`CmsPageEntityDefinition `) for the site.

Business Services

InvoiceService

The helper method, defined in the InvoiceService, is issueInvoiceForOrder(). It’s called when a new invoice needs to be issued for a particular order.

Facade

Facades

InvoicePageFacade

The InvoicePageFacade extends the AbstractPageFacade:

asciidoctor diagram InvoicePageFacade

The helper functionalities, defined here, are:

  • to issue an invoice for a given order and

  • to get the page Dto for the current site

Storefront

InvoiceViewController

The InvoiceViewController defines 2 HTTP Endpoints:

  • at /invoice/order/{orderCode} and

  • at /invoice/order/{orderCode}/pdf

For further details on mapping, check the corresponding mapping actuator accessible at /platform/mappings.

There are no views, associated with the module.

Integration

The integration with the Nemesis platform is pretty straight-forward - just add the module in your classpath:

<dependency>
    <groupId>io.nemesis.platform.module</groupId>
    <artifactId>nemesis-module-invoice</artifactId>
</dependency>