# Invoice Prefix Generator

This app allows you to generate a sequential invoice number for orders with a **Confirmed** status using the prefix you have entered in the app. You can also add it to all statuses, not just confirmed.&#x20;

For example, a customer adds products to the cart but does not complete the order, and there is still an invoice number generated.

**Here is the reason for generating the invoice number:**

Quite a number of gateways, including PayPal, require an invoice number to be sent along with the payment request. Some gateways, like Mollie, require you to register the order with an invoice number even before the payment is processed. So an invoice number is kind of mandatory in those gateways.

**Features**

* Generate a sequence invoice number for orders with status “CONFIRMED”.
* The default invoice number (used by J2Store / J2Commerce) would be used for all orders with the NEW status. You can treat these numbers as temporary numbers.
* The app also allows you to edit the invoice number and change it manually when required.
* Allows for the definition of a number of zeros to be displayed after the invoice number.

## Installation <a href="#installation" id="installation"></a>

**Step 1:** Go to our [J2Commerce website](https://www.j2commerce.com/) > Extensions > Apps

<figure><img src="https://1405307842-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkVKvFBYm8luCOko7zt2v%2Fuploads%2FuG4mMUNl6h9HwGQNMdFw%2Finvoice-gen-1.webp?alt=media&#x26;token=ec06b12e-e776-40f9-85bd-d9ed852872e8" alt=""><figcaption></figcaption></figure>

**Step 2:** Locate the Invoice Prefix Generator App > click View Details > Add to cart > Checkout.&#x20;

**Step 3:** Go to your My Downloads under your profile button at the top right corner and search for the app. Click Available Versions > View Files > Download Now

<figure><img src="https://1405307842-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkVKvFBYm8luCOko7zt2v%2Fuploads%2FLR5pDTF2Khm0M9Ufap6Z%2Finvoice-gen-2.webp?alt=media&#x26;token=8bb6f5fa-0da0-44df-ab30-1bbed83e2fa2" alt=""><figcaption></figcaption></figure>

**Step 4:** Use the Joomla! installer to install the app. Go to System > Install > Extensions > Download the app

<figure><img src="https://1405307842-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkVKvFBYm8luCOko7zt2v%2Fuploads%2F1GmQrOXnCNI1lB01sXrO%2Fuser-group-3.webp?alt=media&#x26;token=2b7be97e-fa77-4ab1-bf73-e8964bc294d5" alt=""><figcaption></figcaption></figure>

**Step 5:** Go back to System > Manage > Extensions.

<figure><img src="https://1405307842-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkVKvFBYm8luCOko7zt2v%2Fuploads%2FSizJ2IIDYzdl1oe0yOeD%2Fuser-group-5.webp?alt=media&#x26;token=7579696e-f96a-48f0-8714-f3b4554e987f" alt=""><figcaption></figcaption></figure>

**Step 6:** Search for the app Invoice *Number* Generator and enable it.

<figure><img src="https://1405307842-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkVKvFBYm8luCOko7zt2v%2Fuploads%2F62cFTxAvIKg70ARW0JiM%2Finvoice-gen-3.webp?alt=media&#x26;token=f43d907b-5188-4c9f-a3c6-ae6a82e1a362" alt=""><figcaption><p>enable invoice app</p></figcaption></figure>

## Settings <a href="#settings" id="settings"></a>

Now it's time to open the app and configure the settings.&#x20;

**Step 1:** Go to Components > J2Commerce > Apps&#x20;

**Configuration**

**Invoice prefix**

The prefix entered here will be used for the sequence invoice number generated.

**Number of leading zeros**

This option allows you to add zeros to be displayed after the invoice prefix and before the invoice number. If you have an invoice prefix (for example **INV-**) and leading zeros as 4, then the invoice number would be **INV-0001, INV-2,…, INV-0010**. See the image below shows the leading zeros are set to 3, so the invoice numbers are **INVG-001, INVG-002**,..

![invoice settings](https://1405307842-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkVKvFBYm8luCOko7zt2v%2Fuploads%2F5aJvp5s8r6U3daudEiSQ%2Finvoice-gen-5.webp?alt=media\&token=bdfd3a2f-516d-4fff-949f-140949544715)

The example below shows no invoice prefix or zeros added before the invoice number.

To view your sales orders, go to Components > J2Commerce > Sales > Orders

![ipg02](https://1405307842-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkVKvFBYm8luCOko7zt2v%2Fuploads%2FwMUBX4xPzPdIrPl4TLwY%2Finvoice-gen-6a.webp?alt=media\&token=d57ea22e-5ed6-4b0a-9c3b-34a3306cad86)

**Automatically generate an invoice number**

Choosing YES will generate the invoice number only when the order status matches the status selected below. See the image below.

**Generate an invoice number if the order has one of the selected statuses**

The invoice number will be generated only for the orders with the statuses selected here. For example, if you choose the status “Confirmed” and "Pending", then the invoice number will be generated only for the **Confirmed** and **Pending** order statuses. See the image below

![ipg03](https://1405307842-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkVKvFBYm8luCOko7zt2v%2Fuploads%2FHCE9ISuIAgvIafdGhzwo%2Finvoice-gen-9.webp?alt=media\&token=86239d33-ffb0-4f2b-9b05-83d5a47b7943)

<figure><img src="https://1405307842-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkVKvFBYm8luCOko7zt2v%2Fuploads%2FKcv9wyjj8Moi3JVOuRAW%2Finvoice-gen-9a.webp?alt=media&#x26;token=56cc814b-2be0-4076-8907-ffcbd1fa1da9" alt=""><figcaption></figcaption></figure>

**Allow editing invoice numbers manually**

Choosing this option, 'YES' will allow the store owner to edit the invoice number by going to Component > J2Commerce > Sales > Orders > Edit order. For example, sometimes you may need to change the invoice number fora  particular order status. In this case, you can use this option to edit the invoice number manually. See the image below

![ipg04](https://1405307842-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkVKvFBYm8luCOko7zt2v%2Fuploads%2FepyO4XOtzxfnRaf9ce4t%2Finvoice-gen-8.webp?alt=media\&token=2830f5e8-7879-4332-88b6-f815e5352709)
