Prolab LIS Templates : Quotes
HBS Template Structure
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<title>Devis</title>
<style>
/* CSS styles */
</style>
</head>
<body>
{{{quoteHeader}}}
{{{customerInfo}}}
<table class="params-table">
<thead>
<tr>
<th>Column headers</th>
</tr>
</thead>
<tbody>
{{{quoteLines}}}
</tbody>
{{{quoteSummary}}}
{{{paymentTerms}}}
{{{notes}}}
{{{termsAndConditions}}}
{{{footer}}}
</body>
</html>
JSON Structure
{
"template": "quote",
"data": {
"sectionName": {
"type": "bloc|collection",
"template": "HTML with {{variables}}",
"content": {}
}
},
"outputFormat": "pdf",
"pageFormat": {
"format": "A4",
"margin": { "top": "1.5cm", "right": "1.5cm", "bottom": "1.5cm", "left": "1.5cm" }
},
"printOptions": {
"printBackground": true,
"displayHeaderFooter": true,
"margin": { "top": "1.5cm", "right": "1.5cm", "bottom": "1.5cm", "left": "1.5cm" }
},
"headerTemplate": "<div>Page header</div>",
"footerTemplate": "<div>Page <span class='pageNumber'></span> sur <span class='totalPages'></span></div>",
"css": {
"additional": ["@page { size: A4; }", "body { font-family: 'Segoe UI'; }"]
}
}
Section Types
Bloc: Static content block
{
"type": "bloc",
"template": "<div>{{variable}}</div>",
"content": {}
}
Collection: Dynamic list (repeats for each item)
{
"type": "collection",
"content": {
"default_template": "<tr><td>{{variable}}</td></tr>",
"items": []
}
}
Variables by Section
quoteHeader
| Variable | Type | Required |
|---|---|---|
companyLogoUrl | string | Yes |
companyName | string | Yes |
companySubtitle | string | No |
companyAddress | string | Yes |
companyPhone | string | Yes |
companyEmail | string | Yes |
companyWebsite | string | No |
quoteNumber | string | Yes |
quoteDate | string | Yes |
validUntil | string | No |
customerInfo
| Variable | Type | Required |
|---|---|---|
customerName | string | Yes |
customerEmail | string | Yes |
customerPhone | string | Yes |
customerAddress | string | No |
quoteLines (collection)
| Variable | Type | Required |
|---|---|---|
description | string | Yes |
code | string | Yes |
quantity | number/string | Yes |
unitPrice | number/string | Yes |
lineTotal | number/string | Yes |
currencySymbol | string | Yes |
quoteSummary
| Variable | Type | Required |
|---|---|---|
subtotal | number/string | No |
totalTax | number/string | No |
totalDiscount | number/string | No |
total | number/string | Yes |
currencySymbol | string | Yes |
totalInWordsFrench | string | No |
totalInWordsEnglish | string | No |
validUntil | string | No |
paymentTerms | string | No |
Note: Use colspan based on table columns:
- Quote (5 columns):
colspan='4' - Quote2 (4 columns):
colspan='3'
paymentTerms
| Variable | Type | Required |
|---|---|---|
checkPayeeName | string | No |
bankName | string | No |
bankAccountNumber | string | No |
notes
| Variable | Type | Required |
|---|---|---|
notes | string | No |
termsAndConditions
| Variable | Type | Required |
|---|---|---|
termsAndConditions | string | No |
footer
| Variable | Type | Required |
|---|---|---|
footerText | string | No |
validityDays | number/string | No |
Template Variants
Quote (quote.json): 5 columns (Description, Code, Quantité, Prix unitaire, Total), colspan=’4′, includes subtotal/tax breakdown
Quote2 (quote2.json): 4 columns (Quantité, Description, Prix unitaire, Total), colspan=’3′, simplified summary (no subtotal/tax rows)
Handlebars Syntax
{{variable}} // Variable output
{{{section}}} // Unescaped HTML injection
{{#if variable}}...{{/if}} // Conditional block
{{#if a}}...{{else}}...{{/if}} // If/else







