Last Updated 2 years ago

PrestaShop Invoices Installation and User Manual

Module Installation

The module uses two Override overrides:
  • override/classes/order/OrderHistory.php (changeIdOrderState() method);
  • override/controllers/admin/AdminOrdersController.php (postProcess() method).
The first method is responsible for automatically generating invoices when the order status changes. The second method is responsible for generating invoices from the order view.

If a problem occurs during installation, it means that your shop is already using the above-mentioned override files. In the event of conflicts with existing override files, the above-mentioned files from the module must be manually merged with the override files in your shop.

If you have problems during installation, merge the override files yourself, with the help of a programmer or open a help request on HelpDesk.

Module in your store

Once installed, the module creates an additional item in the main Back-Office menu:
PrestaShow Modules > Invoice Extender

image
In the module configuration, you will find the following items:
  • Invoice list
  • Main settings
  • Invoice configuration
  • Add invoice
  • GTU codes
  • Reverse charge
  • Export to CSV / PDF
The module also adds a tab for handling and generating invoices in the order view (AdminOrdersController):

image

For the customer, the module adds an 'Invoices' tab in the 'My Account' view. This contains all invoices generated for the customer. The tab can be deactivated in the configuration options (described later).

First configuration

Your data
Before you start working with the module, you need to complete the invoicing entity details. The module supports PrestaShop Multistore, so you can set up a different entity for each shop.
VAT, company name, address and account numbers can be completed in the Main settings tab.

Invoices configuration

The module allows the following types of document to be generated:
  • Pro-forma invoice (Pro-forma invoice)
  • Invoice (Invoice)
  • Duplicate invoice (Duplicate invoice)
  • Corrective invoice (Corrective invoice)
  • Corrective invoice (Refund invoice)
On the Invoice Configuration tab , for each type of document, specify:
  • Header (title/name)
  • Template (appearance)
  • Start number (if you do not need to start numbering from a specific number, leave this field blank, numbering will start from number 1)
  • Invoice numbering format

Invoice numbering configuration

For each invoice type you can configure your own, arbitrary invoice numbering format. To do this, use the pre-defined specifiers.

Remember the brackets {} :
  • {%%%%%} - the number of '%' characters indicates the length of the numeric part of the invoice symbol (for five '%' with an invoice order number of 100, the result is: 00100)
  • {YYYY} - year in YYYY format (2016)
  • {YYY} - year in YY format (01-99)
  • {MM} month in MM format (01-12)
  • {M} month in M format (1-12)
  • {DD} - day in DD format (01-31)
  • {D} - day in format D (1-31)
  • Any characters: all characters apart from the { } brackets will appear in the invoice number in an identical way - for example, you can add the text "CORRECT"
Example of invoice number specifier and result:
  • Specyfikator: FV/{RRRR}/{MM}-{%%%%%%}/MAG2
  • Result: FV/2022/10-000005/MAG2

Automatically invoice generating

Set in each type of invoice (except for the correction invoice) the statuses of the orders for which the document will issue automatically.

What is the difference between an correct invoice and an correct invoice - return?

An correct invoice - return generates a document that withdraws all items from the main invoice. This applies when the order is fully returned. As a result, the document can be generated automatically (e.g. on order status 'Return') and does not require staff intervention.
Note: The numbering of correction invoice and correction - return are independent of each other.

Description of functions in the Main settings

  1. Reset invoice numbers monthly
    This function allows each consecutive month to start the invoice number from the beginning, i.e. the value 1. To use this function, it is required to specify the month and year specifier in the invoice numbering, e.g. {M}, {MM}, {YYYY}.
  2. Send invoices to customers (email)
    When a document is issued, the invoice is sent in PDF format to the customer's email address. You can change the look and content of the invoice email by editing the tpl and txt files in the /mails/ folder. Remember to make a copy of this folder. This folder will be overwritten when upgrading the module to a new version.
  3. Additional email addresses
    You can enter multiple additional email addresses to which invoices will be sent (as BCC). Separate them with commas. This can be, for example, the email address of the accounting office.
  4. Show "My invoices" tab in "My customer account".
    Allows the customer to download all issued documents after logging into the shop (My account > Invoices). You can disable this tab, e.g. when testing the module in your shop.
  5. Split payment and Split payment amount
    You can define the invoice amount from which the 'Split payment' annotation will appear on the document.
  6. Show delivery address on invoice
    Adds the delivery address on the invoice.
  7. Show fields:
    Payment date - field to be completed by the shop administration before the invoice is issued
    Sale date - field to be completed by the shop administration before the invoice is issued
    Delivery date - field to be completed by the shop administration before the invoice is issued
    Remarks - field to be completed by the shop administration before the invoice is issued
    Payment summary - the payments recorded in the system compared to the invoice value. The following information is added to the invoice: Paid X PLN with Y PLN. The amounts are taken from the space indicated in the image below:
    1. image
  8. Show Currency Conversion on Invoice and Default Conversion Currency
    On invoices issued in currencies other than your country's currency, a summary will be added with the conversion of amounts to your country's currency, e.g. EUR > PLN.


    image
  9. Ask the customer for a sales document
    When placing an order, the module will ask the customer for their preferred type of document: receipt or invoice. If the customer selects a receipt, the system will not automatically issue an invoice for this order and will block the possibility to issue an invoice from the order level.
  10. Show GTU codes in CSV file
    GTU codes defined for products will appear on exported invoices in CSV format. The following section describes how to define GTU codes.
  11. Show invoice procedures in CSV file
    The procedures defined for the invoice will appear with the exported invoices in CSV format. The following section describes how to define procedures.
  12. Show GTU codes on the invoice
    On the PDF invoice, the associated GTU code will be displayed next to the product name. The following section describes how to define GTU codes.
  13. Use the rate "Without VAT"
    The documents will display the text "ZW*" instead of the 0% rate, and the document will be annotated with: "* Based on Article 113(9) of the VAT Act". This is a complete solution for streamlining sales by non-VATers.
  14. Show first and last name in the billing address
    For documents issued to legal entities (with a TIN number), the display of the Name of the person placing the order can be switched off, leaving only the TIN and the company name.
  15. Export correction invoice differences to CSV
    Allows you to change the display mode of the corrective documents:
    YES option : will display and export the difference against the main invoice (e.g. -£40).
    Option NO : will display and export the final value of the correction invoice (e.g. 56 PLN - while the main invoice was for 96 PLN).
  16. Invoice logo
    Upload your own logo file for inclusion on the invoice. The logo will be displayed in the exact resolution at which it was uploaded.

Reverse Charge

In this tab, you can set for which delivery countries Reverse Charge is to apply. You can set the label of the tax to be displayed instead of "0%" and additional explanatory text on the document.

image

Invoices export

The module allows documents to be exported collectively in CSV and PDF format (collectively in a zip file). To export invoices, select the date range, invoice type, currency and format (CSV/PDF).

The Invoice type and Currency fields are selectable.

Editing the appearance of invoices

The invoice templates, which are responsible for their appearance, are contained in ".tpl" files. The templates can be freely edited.

To create your own invoice template:

  1. Duplicate the directory on the server modules/pshowinvoiceextender/views/templates/invoices/2 and save it under the next number e.g. 3.
  2. Add an entry in the database pshow_ie_invoice_theme and name the template by assigning it a number.
  3. Point to the created template in the configuration of the invoice in question (described earlier).
Note: Any changes to the files in directories "1" and "2" will be overwritten with each update - make a copy before updating the module.

Please Wait!

Please wait... it will take a second!