Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). Varbase Media Header 9.2.1 Minor update available for module varbase_media_header (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

This module allows store owners to generate, customize, and manage PDF invoices for their customer orders. It can automatically create invoices upon order placement and allows for flexible invoice numbering and customization.

Commerce Invoice is a module for Drupal Commerce that allows store owners to generate, customize, and manage PDF invoices for customer orders. It supports automatic invoice generation, PDF rendering via Entity Print, and flexible invoice numbering through configurable patterns.

Features

  • Automatic invoice generation upon order placement.
  • Manual invoice generation using the provided service.
  • Support for multiple invoice types.
  • PDF generation using the Entity Print module.
  • Configurable invoice numbering using number patterns.

Installation

  1. Enable the module.
  2. Go to the desired Order Type edit form and enable invoicing for that order type.
  3. You can optionally enable automatic invoice generation so that invoices are created when orders are placed.
  4. Ensure your private file system path is correctly configured. See Drupal's documentation on private file systems.

Invoice Type Configuration

Commerce Invoice provides a "Default" invoice type and a "Credit memo" that can be customized at:
/admin/commerce/config/invoice-types

PDF Rendering with Entity Print

This module requires the Entity Print module to generate PDF versions of invoices.
Once Entity Print is installed, set the PDF engine to Php Wkhtmltopdf for best results.

For further details, please refer to Entity Print PDF Engine Support.

Invoice Number Customization

The invoice number format is managed using Commerce Number Patterns.
You can configure these patterns at:
/admin/commerce/config/number-patterns

By default, the included invoice type uses the "infinite" number generation strategy, but this can be adjusted as needed.

Manually Generating Invoices

Developers can generate invoices manually using the service provided by the module:

$invoice_generator = \Drupal::service('commerce_invoice.invoice_generator');
$invoice_generator->generate($orders, $store, $profile);

Activity

Total releases
3
First release
Apr 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 3
Maintenance
Dormant

Release Timeline

Releases

Version Type Release date
8.x-2.2 Stable May 5, 2025
8.x-2.1 Stable May 2, 2025
8.x-2.0 Stable Apr 30, 2025