PS PrestaShop Intermediate

B2B Consolidated Invoicing — Documentation

Install, configure and automate monthly B2B consolidated invoicing on PrestaShop 8 and 9.

Updated Module version 1.0.0

Overview

Consolidated Invoicing groups all of a professional customer’s orders over a period (the past month, by default) into a single consolidated invoice. Instead of one invoice per order, your B2B customers receive a single monthly invoice, numbered sequentially, with the VAT breakdown by rate and order-by-order detail. The module generates the PDF via the native PrestaShop engine, emails it, and removes the individual invoices from the order emails sent to professional customers.

Individual PrestaShop invoices are never deleted: they remain generated and available in your back office and in the order history. Only the email sent to the B2B customer is lightened of its individual PDF.

Installation

Install the module like any PrestaShop module, from Modules > Module Manager > Upload a module, by sending the ZIP file. On installation, the module creates its tables, its admin tab and a random token value for the cron. No Composer dependency is required.

Configuration

Go to Modules > Module Manager, then click Configure next to Consolidated Invoicing. The configuration page gathers all the settings.

B2B customer groups

Tick the customer group(s) considered as professional. Only customers in these groups have their orders consolidated, receive the consolidated invoice and access the “My consolidated invoices” area. This setting defines your B2B scope.

Included order states

Select the order states that make an order eligible for consolidation (by default: payment accepted, preparation in progress, shipped, delivered). An order whose current state is not in this list is skipped at generation time.

Generation day

Choose the day of the month (1 to 28) on which the cron triggers generation of the previous month. A day between 1 and 28 guarantees the date exists in every month.

Prefix and numbering

Set the numbering prefix (default REC). Consolidated invoices are numbered sequentially in the PREFIX-YYYY-00042 format, via a dedicated counter. Numbers are never reused, even after an invoice is deleted.

Automatic sending and email cleanup

Two switches drive the sending behavior:

  • Automatic email sending: at generation time (cron or manual), the consolidated invoice is emailed to the customer with the PDF attached.
  • Remove individual invoice from order emails: for B2B customers, the individual invoice PDF is removed from order emails, so only one clean email remains — the monthly consolidated invoice.

Two multilingual text areas let you customize the legal notice (by default, a reminder of Article 289 I-3 of the French Tax Code regarding periodic consolidated invoices) and the payment terms shown in the invoice footer. These texts can be entered in each store language.

Cron automation

Automatic generation relies on a token-protected cron URL. Retrieve the full URL (token included) from the information panel on the configuration page, then schedule it in your server’s task scheduler. Example crontab entry for a daily trigger:

0 6 * * * wget -q -O /dev/null "https://yourstore.tld/module/dfdeferredinvoicing/cron?token=YOUR_TOKEN"

The cron is idempotent: it only generates a customer’s invoice if one does not already exist for the period. You can therefore run it every day safely — only the configured generation day actually triggers processing of the previous month.

Optional parameters

  • &force=1: forces generation regardless of the day of the month.
  • &month=6&year=2026: targets a specific period (useful to replay a past month).

The response is returned as JSON, with the number of customers processed, invoices created and orders consolidated.

To test immediately, open the cron URL with &force=1 in your browser: you’ll get the JSON generation summary without waiting for the scheduled day.

Day-to-day use

“Consolidated invoices” tab

A Consolidated invoices tab is added under Orders. It lists all generated consolidated invoices, with the number, customer, period, order count, incl. VAT total and email delivery status. Each row lets you download the PDF, resend the email or delete the invoice.

Manual generation

At the top of this tab, a panel lets you manually generate a period (month and year, pre-filled with the previous month) for all B2B customers or for a specific customer. This is useful for a one-off catch-up or to issue a customer’s invoice on demand.

Customer area

Professional customers get a “My consolidated invoices” link in their account, where they find and download all their consolidated invoices. This link only appears for customers in the configured B2B groups.

What the consolidated invoice contains

Each invoice shows: the store details and the customer’s billing address (company name, VAT number), the order-by-order detail (date, reference, original PrestaShop invoice number, amount), the VAT breakdown by rate (products and shipping), with a rounding adjustment line if a small discrepancy appears, then the HT / VAT / incl. VAT totals, and finally your payment terms and legal notice.

Orders are grouped by currency: a customer who ordered in two different currencies over the same period receives one consolidated invoice per currency.

Guarantees and limits

  • Duplicate-proof: each order is stored in a link table where it is unique. An order already consolidated can never be reused in another consolidated invoice.
  • Deletion: deleting a consolidated invoice releases its orders, which become eligible for a new consolidation. The deleted number, however, is not reassigned.
  • Individual invoices: they remain visible in the customer-side order history; only the email is lightened. Hiding them would break PrestaShop accounting.
  • VAT breakdown: the per-rate split is reconstructed from the order lines and shipping; it may be approximate in the rare case where a single product stacks several taxes.

Compatibility

Consolidated Invoicing is compatible with PrestaShop 8.0 to 9.x, in single-store as well as multistore setups, across the five catalog languages (French, English, Spanish, German, Italian), without any Composer dependency.

Was this page helpful?

Still stuck? Contact support