Configure invoices

1/ Invoice PDF A4

You can configure your invoices in 'Settings/Printing/Invoice PDF A4'.

To add your logo, upload it in 'Settings/Printing/Logo'.
Your store information are available in 'Subscriptions/My Account'. Check carefully that all mandatory information are fulfilled.

Different invoice templates are available :
– invoice without the discount detail,
– invoice with the discount detail,
– invoice without taxes,
– invoice on a receipt layout.
Select a template to apply it.
This template will be used to generate your invoices with the 'PDF A4' button in sales.
It will be also used as the attachment file in your email receipts.

In the 'Conditions' field you can add your sales terms or any legal information relevant for your customers.


2/ Advanced invoices and PDF documents

In the Apps section of your account, install the PDF documents application.

This application enables to create templates (in .odt) for your printing documents (invoices, quotations...).
These templates can be created from your text editor (Libre office, Word…) and are using codes (available in the application documentation) to set up the content of your document.
You can download some standard templates.

You can create several different templates for your quotations, purchase orders, delivery notes, invoices…
You can completely customize the document with a specific size (A4, A5, 3-1/8”…) and add any other data like terms of sale.

To print your document in PDF from a sale, select the template in the Action drop down-menu (at the top right corner of the sale).
In 'Settings/Printing/Invoice PDF A4', you can select one of your templates as the default PDF A4 document to be printed when you click on the 'PDF A4' button in a sale.


3/ Generate automatically your PDF document

You can generate automatically your PDF document with a PHP script.

Here is an example of this script. You need to enter:

  • a Token: available in the PDF documents application on your account (Apps section),
  • a Template: name of the template used among templates created in the PDF documents application,
  • an Account: name of your account,
  • a Sale-no: the sale number for which you want to generate the document.
<?php
/**
*
*
* @author: Hiboutik
* @email contact[at]hiboutik.com
*
***********************************************************************************************************************
* @licence GPLv3 as in "https://gnu.org/licenses/gpl.html"
***********************************************************************************************************************
*
* Ce script permet de récupérer une facture au format PDF
* Token : cf app "Documents PDF"
* Template : l'intitulé de votre modèle de facture
*
*/

$token = "IqKSpo8B2etlO6Pci829deg7ZPLFOCmfX4Jxigbd";
$template = "ticket";
$sale_no = 24349;
$account = "moncompte";

/// POST data
$data = [
'token' => $token,
'template' => $template,
'sale_no' => $sale_no,
];
// Setup cURL
$ch = curl_init("https://pdf.hiboutik.net/pdf/?account=$account");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $data,
]);
$response = curl_exec($ch);

// Check for errors
if (curl_errno($ch) === 0 && curl_getinfo($ch, CURLINFO_RESPONSE_CODE) === 200) {
// Stream file
header("Content-Description: File Transfer");
header("Content-Type: application/octet-stream");
header("Content-Disposition:attachment;filename=\"facture_$sale_no.pdf\"");
header("Expires: 0");
header("Cache-Control: must-revalidate");
header("Pragma: public");
header("Content-Length: '.strlen($response)");
print $response;
} else {
// Show errors
print 'CURL error: '.curl_error($ch)."\n";
print 'HTTP status '.curl_getinfo($ch, CURLINFO_RESPONSE_CODE)."\n";
print_r(json_decode($response, true));
}
curl_close($ch);

Send us a request

Click here

  • FR +33 (0)1 48 78 40 06
  • FR +41 (0)21 519 00 17
  • FR +32 (0)2 318 82 77
  • FR +34 (0)912 69 39 94