PHPackages                             lenvanessen/commerce-invoices - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. lenvanessen/commerce-invoices

ActiveCraft-plugin

lenvanessen/commerce-invoices
=============================

A pdf of an orders does not equal an invoice, invoices should be: Immutable, sequentialy numbered. Commerce Invoices allows you to create moment-in-time snapshots of a order to create a invoice or credit invoice

0.1.9(4y ago)36232[1 issues](https://github.com/lenvanessen/commerce-invoices/issues)MITPHP

Since Apr 26Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/lenvanessen/commerce-invoices)[ Packagist](https://packagist.org/packages/lenvanessen/commerce-invoices)[ RSS](/packages/lenvanessen-commerce-invoices/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (5)Versions (14)Used By (0)

Commerce Invoices plugin for Craft CMS 3.x
==========================================

[](#commerce-invoices-plugin-for-craft-cms-3x)

Craft Commerce is great! Their PDF system is pretty awesome to. However, pdf of an order does not equal an invoice, invoices should be: Immutable and sequentially numbered.

Commerce Invoices is an extension for Craft Commerce that allows you to:

- Create PDF invoices for orders (automatically if they reach a certain status, or manually)
- (Partially) Credit an invoice, create a credit-note
- Automatically re-stock your inventory when you (partially) credit a order
- Keep a solid invoice history, immutable and irreversible so that your accountant will be a happy man (or woman, or any other pronoun)

[![Screenshot](resources/img/screenshot.png)](resources/img/screenshot.png)

Requirements
------------

[](#requirements)

This plugin requires Craft CMS 3.0.0-beta.23 or later.

Installation
------------

[](#installation)

To install the plugin, follow these instructions.

1. Open your terminal and go to your Craft project:

    ```
     cd /path/to/project

    ```
2. Then tell Composer to load the plugin:

    ```
     composer require lenvanessen/commerce-invoices

    ```
3. In the Control Panel, go to Settings → Plugins and click the “Install” button for Commerce Invoices.

Configuring Commerce Invoices
-----------------------------

[](#configuring-commerce-invoices)

### Setting up e-mails &amp; PDFs

[](#setting-up-e-mails--pdfs)

This extension integrates nicely with Craft's built-in system for Commerce E-mails and PDFs. However, there is a slight deviation. Normally, you'd trigger an email by assigning it to a specific order status. If you want the PDF of an invoice to be attached, this will not work like this. This is due to the fact that one order can contain multiple Invoices, and Multiple Credit Invoices. So just because the order reaches a status, doesn't mean the plugin knows what pdf you want sent to the customer.

The same principle applies to Craft's native PDFs. You can create PDFs from Crafts internal system, but they only get the `order` variable and are linked to a specific order, not to an invoice or credit invoice. For this reason, we don't assign a native PDF to the e-mail we're about to create, it will be added automatically.

The correct set-up is as follows:

1. Go to Craft Commerce and create a new e-mail. You can assign a PDF, as long as it's not the pdf for the invoice (which you shoundn't have created anyways;)
2. Go to Invoices &gt; Settings and select the newly created email. While your here, you can also select the PDF template for the invoice.
3. Done;)

### Building the invoice PDF

[](#building-the-invoice-pdf)

You can easily check a preview of the invoice by navigation to:

By passing a specific invoice id you can test certain invoices, using the query parameter ?invoiceId={ID}. This is useful if you want to test a specific scenario or have problems with specific invoices. It's not necessary, you can also leave it blank and it will get the last invoice.

The only condition is that your site is not in production mode. You can also find a example PDF in the sourcecode of this extension, under templates.

Commerce Invoices Roadmap
-------------------------

[](#commerce-invoices-roadmap)

Some things to do, and ideas for potential features:

- Automatic refund creation
- Release it

Brought to you by [Len van Essen](wndr.digital)

Icons made by [Pixel perfect](https://www.flaticon.com/authors/pixel-perfect "Pixel perfect") from [www.flaticon.com](https://www.flaticon.com/ "Flaticon")

###  Health Score

32

—

LowBetter than 71% of packages

Maintenance44

Moderate activity, may be stable

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~34 days

Recently: every ~0 days

Total

10

Last Release

1536d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6e05f0077d10f9ef66e3e5326a9944dd94b6266de8c219da5117b959fb28a654?d=identicon)[wndr](/maintainers/wndr)

---

Top Contributors

[![lenvanessen](https://avatars.githubusercontent.com/u/23024452?v=4)](https://github.com/lenvanessen "lenvanessen (1 commits)")

---

Tags

cmsCraftcraftcmscraft-plugincommerce invoices

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/lenvanessen-commerce-invoices/health.svg)

```
[![Health](https://phpackages.com/badges/lenvanessen-commerce-invoices/health.svg)](https://phpackages.com/packages/lenvanessen-commerce-invoices)
```

###  Alternatives

[nystudio107/craft-seomatic

SEOmatic facilitates modern SEO best practices &amp; implementation for Craft CMS 5. It is a turnkey SEO system that is comprehensive, powerful, and flexible.

1741.4M46](/packages/nystudio107-craft-seomatic)[verbb/image-resizer

Resize assets when they are uploaded.

127269.1k7](/packages/verbb-image-resizer)[verbb/formie

The most user-friendly forms plugin for Craft.

101372.9k40](/packages/verbb-formie)[verbb/tablemaker

Create customizable and user-defined table fields.

40168.8k1](/packages/verbb-tablemaker)[wrav/oembed

A simple plugin to extract media information from websites, like youtube videos, twitter statuses or blog articles.

36205.0k3](/packages/wrav-oembed)[verbb/hyper

A user-friendly links field for Craft.

24130.9k9](/packages/verbb-hyper)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
