Invoice¶
Invoice (bill) is a document provided by the seller (you) to the customers in the product transactions. The invoice template is created in the Website Editor in the Templates application. Here you define a template (pattern) that will be used to generate invoices on your online store. You can have only one invoice template per one E-shop Settings.
There are some prerequisites you need to fulfil in order to use your Invoice template successfully: Invoice Template, E-shop Settings and Document Sequences:
The Invoice template itself. You can use the default one or code your own in the Templates application (in a particular website editor).
It is necessary to create a Document Sequences in the Administration module in the Document Sequences application. Document Sequence generates unique numbers for your Invoices because every Invoice must have an identification number. These Document Sequence have to be added to the E-shop Settings.
Created Invoice template has to be also connected with particular E-shop Settings.
There are several ways how to distribute an Invoice to customers:
You can add an Invoice as an attachment to the Purchase Confirmation E-mail. This setting can be done in the E-shop Settings application (located in the Administration module) on the E-mails tab. Here you add the template you have created in the Templates application and assign it to the e-mail type on the E-mails tab as an attachment.
Display a button for download. Use the System Page for successful payment to create this button (/downloadinvoice).
You can download an Invoice directly from BizBox Admin and send it to your customers manually (in a detail of a particular order).
Create an Invoice¶
Invoices are created in the Templates application in a particular website (Tools and Settings tab). As a default you can see here a default Invoice. You can create your own or you can just edit the default one according to your needs. In this tutorial we have created a new one that will be modified.
Before you start creating your Invoice you need to know, that the Invoice is a personalized document. It means that every customer has their own Invoice that contains information about the customer and the customer’s purchase. This customization is provided by parameters. A parameter carries particular information (such as a customer’s name or products from order) that is connected with the customer and particular order.
If you insert these parameters into the Invoice code, you create a personalized document. If you need more information about parameters and how to use them, see the invoice parameters.
If you want to know how to create and use an Invoice on your online store, please follow this tutorial. We assume that you already have:
A functional online store with products, so you can test your Invoice after you create it.
A Branch which is used to dispatch orders from your online store (information about a Branch will be used and displayed in the Invoice).
An E-shop Settings where you will define the usage of the Invoice we will create in this tutorial.
A Document Sequence for an Invoice that generates a unique number of Invoices.
A little experience with coding in HTML. You don’t need to be a programmer, but you should know the base and be able to create a valid HTML document.
If you don’t have something from the list above, please follow related tutorials, help-sites and create all these prerequisites before you start with the Invoice.
If you have it, you can start with the tutorial:
Run a particular website.
Run the Templates application (Tools and Settings tab) by simply clicking on its name.
In the toolbar click the New button.
Name is a required field that is never displayed to customers and serves only for your own and BizBox Admin purposes.
Description field is optional, but we recommend you to insert short info about this Invoice, because it can save your time in the future.
Type field is used to define the purpose of this template. You need to select the Invoice.
Base Template defines an existing template which will be used as a default for this newly created one. Select the Invoice.
Language defines the language in which this template is coded. This is really important if you are using a multilingual Website because you can subsequently create translations for it. Offered languages are dependent on the languages you have added into BizBox in the Languages application. If you are looking for a language that is not a part of this selection, add it in the Languages application first.
Click the Add button.
The Content tab is opened automatically and you can see the content of a default Invoice which you can freely edit.
As you can see, Invoice is coded in table form. Right in the beginning you can see a parameter {{ invoice.number }} that carries the number of the Invoice. This number is generated thanks to Document Sequences (this is why it is necessary to have created and added Document Sequences in the E-shop Settings).
Parameter display a particular value in the final Invoice. To see all the parameters and how to use them, see the invoice parameters.
Code and change the template according to your needs. After that click the Save button and your Invoice is ready for add to E-shop Settings.
Now it’s the time to add this Invoice to your e-shop settings. We assume that you already have created your E-shop Settings and you are only missing an Invoice.
Run the Administration module.
Run the E-shop Settings application by simply clicking on its name.
Double-click the particular E-shop Settings you are using on your online store.
Navigate to the Documents tab and click the Add button.
In the Type field select Invoice, because you want to add an Invoice to this E-shop Settings.
In the Template field select the Name of the template you have created in the first part of this tutorial.
The Generate Automatically setting is set to YES as default. If you want to generate all Invoices manually in the detail of a particular order, set it to NO. Otherwise the Invoice will be generated for every order switched to the Paid state.
Click the Add button and also the Save button located in the tool bar.
Now is your Invoice ready! Assign it to a particular e-mails (in the E-shop Settings, E-mail tab) and don’t forget to approve the project.
QR Code¶
You can also generate QR codes on invoices (or proforma invoices as well). A QR code on an invoice (PDF) will help the customer to perform a payment.
In the order object is the method getSPayD available. It generates the SPD (SPAYD): IBAN, amount due and currency according to the particular order. Optional parameter is an array of values, which can extend the payment parameters:
dueDate - the payment due date,
message - the message for the recipient;
variableSymbol - the order variable symbol.
Example:
{% set spd = order.getSPayD({'message':'Payment of '~invoice.number}) %}
< barcode code="{{ spd }}" type="QR" error="M" />