{% set metadata = report.metadata %} {% set branding = metadata.branding|default({}) %} {% set primaryColor = branding.primaryColor|default('#333333') %} {% set fs = branding.fontSize|default(1.0) %} {% set fsBody = (9 * fs)|round(1) ~ 'px' %} {% set fsSmall = (8 * fs)|round(1) ~ 'px' %} {% set fsCompany = (12 * fs)|round(1) ~ 'px' %} {% set fsTitle = (16 * fs)|round(1) ~ 'px' %} {% for section in report.sections %}
{% if section.type == 'grid' %}
{# PDF: only embedded data URIs — never raw URLs (avoids broken image icon) #} {% if branding.showLogo|default(true) and branding.logoSrc|default('') starts with 'data:image/' %} {% endif %} {% if branding.showCompanyName is same as(true) %}
{{ section.data.blocks.company_block.name|default('') }}
{% endif %} {% if section.data.blocks.company_block.address|default('') %}
{{ section.data.blocks.company_block.address }}
{% endif %} {% if section.data.blocks.company_block.cityLine|default('') %}
{{ section.data.blocks.company_block.cityLine }}
{% endif %} {% if section.data.blocks.company_block.phone|default('') %}
Phone. {{ section.data.blocks.company_block.phone }}
{% endif %}
{{ section.data.blocks.company_block.email|default('') }}
{% if section.data.blocks.company_block.website|default('') %}
{{ section.data.blocks.company_block.website }}
{% endif %}
{% if section.data.barcodeSrc|default('') starts with 'data:image/' %} Barcode {% endif %}
{{ branding.headerTitle|default('Document') }}
{% if section.data.documentNumber|default('') %}
{{ section.data.documentNumber }}
{% endif %} {% for entry in section.data.metaEntries|default([]) %}
{{ entry.label }}: {{ entry.value }}
{% endfor %}
{% elseif section.type == 'party' %}
Shipper Consignee
{% set shipperEntries = section.data.partyEntries.shipper|default([]) %} {% if shipperEntries is not empty %} {% for entry in shipperEntries %}
{{ entry.value }}
{% endfor %} {% else %} {% set shipperLines = section.data.partyLines.shipper|default([]) %} {% if shipperLines is not empty %} {% for line in shipperLines %}
{{ line }}
{% endfor %} {% else %}
{{ section.data.parties.shipper|default('')|nl2br }}
{% endif %} {% endif %}
{% set consigneeEntries = section.data.partyEntries.consignee|default([]) %} {% if consigneeEntries is not empty %} {% for entry in consigneeEntries %}
{{ entry.value }}
{% endfor %} {% else %} {% set consigneeLines = section.data.partyLines.consignee|default([]) %} {% if consigneeLines is not empty %} {% for line in consigneeLines %}
{{ line }}
{% endfor %} {% else %}
{{ section.data.parties.consignee|default('')|nl2br }}
{% endif %} {% endif %}
{% elseif section.type in ['text', 'terms'] %} {% if section.title %}

{{ section.title }}

{% endif %}
{{ section.data.content|default('')|raw }}
{% elseif section.type in ['packages_table', 'items_table', 'table', 'rate_details'] %} {% if section.type != 'rate_details' and section.title %}

{{ section.title }}

{% endif %} {% if section.type == 'rate_details' and section.data.tariffTable is defined %} {% set tariffTable = section.data.tariffTable %} {% for header in tariffTable.headers %} {% endfor %} {% for index, cell in tariffTable.row %} {% endfor %}
{{ tariffTable.title }}
{{ header }}
{{ cell }}
{{ tariffTable.footerLabel }} {{ tariffTable.footerTotal }}
{% if section.data.servicesTable is defined and section.data.servicesTable.rows|length > 0 %} {% set servicesTable = section.data.servicesTable %} {% for header in servicesTable.headers %} {% endfor %} {% for row in servicesTable.rows %} {% for index, cell in row %} {% endfor %} {% endfor %}
{{ servicesTable.title }}
{{ header }}
{{ cell }}
{{ servicesTable.footerLabel }} {{ servicesTable.footerTotal }}
{% endif %} {% elseif section.headers|length > 0 %} {% for header in section.headers %} {% endfor %} {% for row in section.rows %} {% for cell in row %} {% endfor %} {% endfor %} {% if section.data.totalsRow is defined %} {% for cell in section.data.totalsRow %} {% endfor %} {% endif %}
{{ header }}
{% if ' / ' in cell %}{% for part in cell|split(' / ') %}{{ part }}{% if not loop.last %}
{% endif %}{% endfor %}{% else %}{{ cell }}{% endif %}
{% if ' / ' in cell %}{% for part in cell|split(' / ') %}{{ part }}{% if not loop.last %}
{% endif %}{% endfor %}{% else %}{{ cell }}{% endif %}
{% endif %} {% if section.data.subtotals is defined %}
{% for label, value in section.data.subtotals %}
{{ label }}: {{ value }}
{% endfor %}
{% endif %} {% elseif section.type == 'charges_summary' %} {% if section.data.layout == 'split' and section.data.panels is defined %} {% set panels = section.data.panels %} {% set leftFields = panels.leftPanel.fields|default([]) %} {% set rightFields = panels.rightPanel.fields|default([]) %} {% set cellStyle = "border:0.75px solid #000; padding:4px 6px; font-size:9px;" %} {% set labelW = "width:65%;" %} {% set valueW = "width:35%; text-align:right;" %} {% set headerStyle = "background:#f2f2f2; font-weight:bold; border:0.75px solid #000; padding:4px 6px; font-size:9px;" %} {% set grandStyle = "background:#f2f2f2; font-weight:bold; border:0.75px solid #000; padding:4px 6px; font-size:9px;" %}
{% for field in leftFields %} {% endfor %}
{{ panels.leftPanel.title|default("Shipment's Basic Details") }}
{{ field.label }} {{ field.value }}
{% for field in rightFields %} {% endfor %} {% if panels.rightPanel.grandTotal is defined and panels.rightPanel.grandTotal %} {% endif %}
{{ field.label }} {% if field.inlinePercent is defined and field.inlinePercent != '' %} {{ field.inlinePercent }} {% endif %} {{ field.value }}
{{ panels.rightPanel.grandTotal.label }} {{ panels.rightPanel.grandTotal.value }}
{% else %} {% if section.title %}

{{ section.title }}

{% endif %} {% for field in section.data.fields|default([]) %} {% endfor %}
{{ field.label }} {{ field.value }}
{% endif %} {% elseif section.type == 'signatures' %} {% for field in section.data.fields|default([]) %} {% endfor %}
{{ field.label }}
{% endif %}
{% endfor %}