Installing Invoice Templates Manager¶
Upload the files¶
- Unpack the download.
-
Copy the
InvoiceTemplatesfolder intoextensions/Others/of your Paymenter installation, so that the main class is at:/var/www/paymenter/extensions/Others/InvoiceTemplates/InvoiceTemplates.phpThe folder name must be exactly
InvoiceTemplates.
Create the database table¶
The extension does not run its migration by itself. Run it from the shell before you enable the extension:
cd /var/www/paymenter
php artisan optimize:clear
composer dump-autoload
php artisan migrate --path=extensions/Others/InvoiceTemplates/database/migrations
This creates one table, ext_invoice_templates.
Warning
Do not enable the extension before the migration has run. Without the table, every invoice PDF fails with a database error. That affects PDF downloads and the PDF attached to invoice e-mails.
Enable the extension¶
- In the admin area, open Extensions and click Install Extension. This opens Available Extensions on the Ready to Install / Upload tab.
- Find InvoiceTemplates in the list, click Install and confirm.
- Paymenter opens the extension's settings page. Switch on Enabled and save.
On the first request after enabling, the extension creates the three built-in templates if the table is empty. Modern Blue is flagged as the default.
Warning
From this moment all invoice PDFs use Modern Blue. If you want to prepare your own template first, see First-time setup for how to keep Paymenter's own PDF until you are ready.
First-time setup¶
- Open Invoice Templates > Templates. You see the three built-in templates.
- Use Preview to look at each one, or create your own. See Usage.
- Decide which template is used for all invoices, in one of two ways:
- Click Set Default on the template in the list, or
- open the extension's settings page again and choose it under Default invoice template. The list there only fills once the templates exist, so reload the page after enabling.
- Download an invoice PDF from an existing invoice to check the result.
To keep Paymenter's own PDF layout while you work on a template, leave Default invoice template empty and make sure no active template has Default Template switched on. See Which template is used.
If other staff roles should manage templates, give them the permissions listed in Configuration.
Updating¶
- Replace the
extensions/Others/InvoiceTemplatesfolder with the new version. -
Run the same commands as for installation:
cd /var/www/paymenter php artisan optimize:clear composer dump-autoload php artisan migrate --path=extensions/Others/InvoiceTemplates/database/migrations
Your templates are stored in the database and are not touched by an update. The built-in templates are only created when the table is empty, so an update does not change or re-add them.
Uninstalling¶
- In the admin area, open Extensions, edit InvoiceTemplates and click Uninstall Extension. To only switch it off, turn off Enabled and save instead. Invoice PDFs then use Paymenter's own layout again.
- Delete the folder
extensions/Others/InvoiceTemplates.
Warning
Uninstalling does not drop the ext_invoice_templates table. Your templates stay in the database.
To remove the data as well, drop the table and its migration record:
DROP TABLE ext_invoice_templates;
DELETE FROM migrations WHERE migration = '2024_01_01_000000_create_ext_invoice_templates_table';