{# Building blocks shared by the company-form PDFs. Each mirrors a part of the printed form. #}
{% macro letterhead(full) %}
{{ company_name }}
{% if full %}
{{ company_address }}
Website: {{ company_website }} E-Mail:{{ company_email }}
PHONE: {{ company_phone }}
{% endif %}
{% endmacro %}
{# NAME / HEADQUARTER on the left, DATE / MONTH on the right — empty slots stay empty. #}
{% macro meta_block(rows) %}
{% if rows %}
{% endif %}
{% endmacro %}
{% macro grid(g, left=False) %}
{% for w in g.widths %}{% endfor %}
{% for h in g.headers %}| {{ h }} | {% endfor %}
{% for r in g.rows %}
{% for c in r.cells %}| {{ c }} | {% endfor %}
{% endfor %}
{% endmacro %}
{# "SIGNATURE" alone, low on the right — the sales / activity / call-report forms. #}
{% macro sign_right(text="SIGNATURE") %}
{{ text }}
{% endmacro %}
{# Tour plan, standard tour plan and fare chart: MR signature plus the AM approval. #}
{% macro sign_approval(approval) %}
| SIGNATURE: {{ approval.mr_name }} |
{{ approval.label }} {{ approval.value }}{% if approval.when %} {{ approval.when }} {% endif %} |
{% endmacro %}