# dfproforma — Automatic Proforma Invoice Generation

> Overview dfproforma automates proforma invoice generation in PrestaShop 8. As soon as an order reaches a configured status, the module creates a customised PDF (logo, numbering, multilingual footer) and makes…

- Page: <https://www.datafirefly.com/en/documentation/dfproforma/>
- Language: en
- Last updated: 2026-07-02
- Other languages: [fr](https://www.datafirefly.com/documentation/dfproforma/index.md), [es](https://www.datafirefly.com/es/documentation/dfproforma/index.md), [de](https://www.datafirefly.com/de/documentation/dfproforma/index.md), [pl](https://www.datafirefly.com/pl/documentation/dfproforma/index.md), [it](https://www.datafirefly.com/it/documentation/dfproforma/index.md), [pt](https://www.datafirefly.com/pt/documentation/dfproforma/index.md), [nl](https://www.datafirefly.com/nl/documentation/dfproforma/index.md)
- Index: <https://www.datafirefly.com/en/documentation/llms.txt>

## Overview

dfproforma automates proforma invoice generation in PrestaShop 8. As soon as an order reaches a configured status, the module creates a customised PDF (logo, numbering, multilingual footer) and makes it available to the customer from their account. Manual generation from the order page is always available regardless of the order status.

**Primary use case:** B2B contexts where the customer needs a proforma invoice before confirming payment or getting internal purchase approval.

## Installation

1. In the PrestaShop back office, go to **Modules > Module Manager**.
2. Click **Upload a module** and select the `dfproforma.zip` file.
3. Click **Install**. SQL tables are created automatically.
4. The module appears in the list as _Proforma Invoice Generator_.

Compatibility: PrestaShop 8.0 to 8.x, PHP 7.4 to 8.3, multistore.

## General Configuration

Access the configuration via **Modules > Module Manager > dfproforma > Configure**.

### Trigger Statuses

Check the order statuses that should trigger automatic proforma generation. As soon as an order moves to one of these statuses, the PDF is created and stored on the server.

Recommendation: trigger on _Payment accepted_ for standard flows, or on _Awaiting payment_ for B2B contexts where the proforma precedes payment.

### PDF Logo

Upload a dedicated logo for proforma invoices (accepted formats: PNG, JPG). If this field is left empty, the store logo is used by default.

### Email Attachment

Enable the **Attach proforma to confirmation emails** option to automatically attach the PDF to order emails (`order_conf`, `bankwire`, `cheque`, `payment`).

## Proforma Numbering

Numbering is configurable per installed language. For each language:

- **Prefix**: text added before the number (e.g. `PROFORMA`, `PRO`).
- **Starting number**: integer from which the counter starts (e.g. `1` or `1000`).
- **Number of digits**: counter length with zero-padding (e.g. `6` → `000001`).

Example: prefix `PROFORMA`, start `1`, 6 digits → first proforma numbered `PROFORMA-000001`.

In multistore mode, numbering is isolated per store: the composite key `proforma_number + id_shop` guarantees uniqueness with no duplicates across stores.

### PDF Footer

Enter the footer text for each active language. This text appears at the bottom of every proforma generated in the corresponding language.

## Manual Generation from the Back Office

On every order page, a **Proforma Invoice** card appears in the side panel:

- If a proforma exists: direct PDF download link.
- If no proforma exists: a **Generate proforma** button to create it immediately, regardless of the order status.

## Customer Download

Customers access their proformas from their account:

- **Order detail page**: a _Download proforma_ button appears directly below the order information.
- **Order history**: proforma links are integrated via JavaScript with no additional AJAX request (added in v1.0.2).

Access is protected by the order's secure key (`secure_key`) — a customer can only download their own proformas.

## PDF Structure

Each generated proforma contains:

- Proforma number (according to the configured numbering)
- Generation date
- Store logo (or custom logo)
- Store and buyer contact details
- Product table with quantities and unit prices (excl. and incl. tax)
- Totals (excl. tax, VAT, incl. tax, shipping)
- Custom footer in the order language

## Multistore

dfproforma is natively compatible with PrestaShop 8 multistore mode:

- Configuration (statuses, logo, numbering, footer) is independent per store.
- PDF files are stored in a separate folder per store.
- Numbering is unique per number + store combination.

## Uninstallation

Uninstallation removes the `df_proforma` SQL table and all configuration keys prefixed `DFPROFORMA_`. Already generated PDF files are kept on the server.

## Changelog

- **v1.0.2** — Order history integration via the `actionFrontControllerSetMedia` hook; links displayed without extra AJAX request.
- **v1.0.1** — Minor stability fixes.
- **v1.0.0** — Initial release: status-triggered generation, customisable PDF, email attachment, customer download.
