# aune-io/magento2-autoinvoice

> Automatically invoice all complete orders in your Magento 2 store

`composer require aune-io/magento2-autoinvoice`

Canonical URL: https://packagento.com/aune-io/magento2-autoinvoice

## At a glance

- **Vendor**: aune-io (https://packagento.com/aune-io.md)
- **Latest version**: 2.4.1 — released 2026-05-19
- **Pricing**: Free
- **Package type**: Magento 2 module
- **Status**: active, accepting new buyers

## Installation

Packagento is licence-gated, so even free packages need a licence on a project before Composer can resolve them.

1. **Sign in or create an account** at https://packagento.com/customer/account/.

2. **Add the package to your account.** Open https://packagento.com/aune-io/magento2-autoinvoice and complete the free checkout. A licence is minted automatically.

3. **Create or pick a project, then activate the licence on it.**
   - Projects represent the Magento installs you deploy to. Manage them at https://packagento.com/projects/.
   - Activate the new licence on the project you'll deploy this package to. Activation is what generates the Composer credentials scoped to that project.

4. **Add the project credentials to your Magento codebase.**

   Grab the project's public + private key from https://packagento.com/projects/ (open the project, then its Credentials tab), and add them to `auth.json`:

   ```json
   {
     "http-basic": {
       "packagento.com": {
         "username": "ppk_live_...",
         "password": "psk_live_..."
       }
     }
   }
   ```

   Add the Packagento Composer repository to `composer.json`:

   ```json
   {
     "repositories": [
       { "type": "composer", "url": "https://packagento.com" }
     ]
   }
   ```

5. **Install and apply.**

   ```bash
   composer require aune-io/magento2-autoinvoice:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

Automatically invoice all complete orders in your Magento 2 store

## README

Magento 2 procedure to automatically invoice orders in a given status.

[![Build Status](https://travis-ci.org/aune-io/magento2-autoinvoice.svg?branch=master)](https://travis-ci.org/aune-io/magento2-autoinvoice)
[![Coverage Status](https://coveralls.io/repos/github/aune-io/magento2-autoinvoice/badge.svg?branch=master)](https://coveralls.io/github/aune-io/magento2-autoinvoice?branch=master)
[![Latest Stable Version](https://poser.pugx.org/aune-io/magento2-autoinvoice/v/stable)](https://packagist.org/packages/aune-io/magento2-autoinvoice)
[![Latest Unstable Version](https://poser.pugx.org/aune-io/magento2-autoinvoice/v/unstable)](https://packagist.org/packages/aune-io/magento2-autoinvoice)
[![Total Downloads](https://poser.pugx.org/aune-io/magento2-autoinvoice/downloads)](https://packagist.org/packages/aune-io/magento2-autoinvoice)
[![License](https://poser.pugx.org/aune-io/magento2-autoinvoice/license)](https://packagist.org/packages/aune-io/magento2-autoinvoice)

### System requirements
This extension supports the following versions of Magento:

*	Community Edition (CE) versions 2.2.x and 2.3.x and 2.4.x
*	Enterprise Edition (EE) versions 2.2.x and 2.3.x and 2.4.x

### Installation
1. Require the module via Composer
```bash
$ composer require aune-io/magento2-autoinvoice
```

2. Enable the module
```bash
$ bin/magento module:enable Aune_AutoInvoice
$ bin/magento setup:upgrade
```

### Configuration
The configuration of this module is under _Stores > Configuration > Sales > Auto Invoice_.
There, you will be able to activate processing via cron job, and choose the behaviour of the procedure.

The configuration matrix will allow you to set on for which combinations of status and payment method the extension should invoice the orders, as well as the destination status and capture mode.
A configuration example follows.

<img src="https://github.com/aune-io/magento2-autoinvoice/blob/master/screenshots/settings.png" />

### Usage
The module supports two different usage methods.

#### Command line
The following command will execute the procedure:

```bash
$ bin/magento aune:autoinvoice:process
```

A dry run mode is also available, just to see what orders would be affected by the procedure:
```bash
$ bin/magento aune:autoinvoice:process --dry-run=1
```

#### Cron
By activating the cron, the procedure will be automatically executed every hour.

1. Login to the admin
2. Go to Stores > Configuration > Sales > Auto Invoice
3. Set _Schedule procedure_ to yes
4. Specify a custom cron expression, if needed
5. Clean the cache

### Authors, contributors and maintainers

Author:
- [Renato Cason](https://github.com/renatocason)

### License
Licensed under the Open Software License version 3.0

## Recent Versions

| Version | Released |
|---|---|
| 2.4.1 | 2026-05-19 |
| 2.4.0 | 2025-12-01 |
| 2.3.1 | 2024-04-27 |
| 2.3.0 | 2023-10-10 |
| 2.2.0 | 2022-09-12 |
| 2.1.5 | 2022-05-02 |
| 2.1.4 | 2021-10-14 |
| 2.1.3 | 2021-08-18 |
| 2.1.2 | 2021-02-23 |
| 2.1.1 | 2020-10-28 |

Showing 10 of 19 versions. Full release history on https://packagento.com/aune-io/magento2-autoinvoice.

## Dependencies

### Require

| Package | Constraint |
|---|---|
| magento/framework | 101.0.*\|102.0.*\|103.0.* |
| magento/module-sales | 101.0.*\|102.0.*\|103.0.* |
| php | ~7.1.0\|~7.2.0\|~7.3.0\|~7.4.0\|~8.1.0\|~8.2.0\|~8.3.0\|~8.4.0 |

### Require (dev)

| Package | Constraint |
|---|---|
| php-coveralls/php-coveralls | ~2.1.0 |
| phpmd/phpmd | @stable |
| phpunit/phpunit | ~6.5.13 |
| squizlabs/php_codesniffer | 3.3.1 |

## Quality

Latest release (2.4.1) fails the Packagento QA pipeline. Verdicts below are per-cell (Magento line × PHP version) for the matrixed tools, and run-once for the static / security tiers.


### Compatibility

Each Magento line is installed on its supported PHP versions, then the module is built (DI compile + static-content deploy). Cells show passed / failed / untested; staircase gaps render as `–`.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | Pass | Pass | – | – |
| 2.4.8 | – | Pass | Pass | – |
| 2.4.9 | – | – | Pass | not tested |


### Code Quality

Advisory checks against the module's source. Never affect the Compatibility verdict — a phpcs finding can't make a module incompatible.

#### Static Analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| PHPCS | Warning | 5 | 5 warnings (ruleset: Magento2) |
| PHPMD | Pass | 0 |  |
| Cpd | Warning | 2 | 2 duplicated chunks spanning 107 total lines (min-lines=5, min-tokens=70) |
| Composer validate | Pass | 0 |  |

#### PHPStan

Type-checks the module against a real Magento install. Re-runs per Magento + PHP version because resolvable symbols differ between releases.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | 36 | 36 | – | – |
| 2.4.8 | – | 36 | 36 | – |
| 2.4.9 | – | – | 31 | N/A |


### Tests

Unit and integration suites run per Magento + PHP cell. Test failures speak to the module's behaviour, not its compatibility with a line, so they're reported here separately.

#### Unit Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | Error | Error | – | – |
| 2.4.8 | – | Error | not tested | – |
| 2.4.9 | – | – | Error | not tested |

#### Integration Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |


### Security

Dependency-advisory audit (composer audit) plus a source malware scan. A malware detection fails the version outright.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| Composer audit | N/A | 0 | no resolvable dependency tree to audit — Your requirements could not be resolved to an installable set of packages. Problem 1 |
| Malware scan | Pass | 0 |  |

## Licence and pricing

Free. A licence is still minted on checkout and bound to your project for Composer access — no payment step.

Refundable within 14 days of first purchase via https://packagento.com/account/refunds/.

## Install via Claude Code or any MCP client

The Packagento MCP server can run the licence + project + Composer steps above in one tool call:

```
purchase_and_install_packages(
  composer_names=["aune-io/magento2-autoinvoice"],
  project_id="proj_xxx"
)
```

This handles cart, checkout, licence minting, project activation, and writes auth.json credentials. Connect a client with `claude mcp add packagento https://mcp.packagento.com`. Full setup at https://packagento.com/docs/mcp-setup.

## Vendor

aune-io is a Magento 2 vendor on Packagento. See https://packagento.com/aune-io.md for their full catalogue.

