{% set show_site_op_in_footer = False %} {% set show_printed_time = False %} {%- block bottomleft %}{%- endblock %} {%- block bottomright %}{%- endblock %} {%- extends "weasyprint/base.weasy.html" -%} {%- block pagesize %}portrait{%- endblock %} {%- block footer %} {% set site_op = settings.SITE.site_config.site_company %} {% if site_op %} {%- endif %} {%- endblock footer %} {%- block main %}
{{_("Recipient")}}:
{{obj.recipient.get_address_html()}}

{{_("Date")}}: {{fdl(obj.voucher_date)}}

{{babelattr(obj.journal, 'printed_name')}} {{obj.number}}/{{obj.accounting_period.year}}

{{_("Our reference")}}: {{obj}}
{{_("Your reference")}}: {{obj.your_ref}} {% if getattr(obj, 'invoicing_min_date', None) %}
{{_("Period from {} to {}").format(obj.invoicing_min_date, obj.invoicing_max_date)}} {% endif %}
{{_("Your VAT id")}}: {{obj.partner.vat_id or _("N/A")}} ({{obj.vat_regime}})
{{_("Your customer id")}}: {{obj.partner.id}}
{% if obj.intro %}
{% if obj.intro.startswith("<") %} {{obj.intro}} {% else %} {{restify(obj.intro)}} {% endif %}
{% else %}
{% endif %}
{% block body %} {%- set sums_by_product = SumCollector() -%} {%- for item in obj.items.order_by('seqno') -%} {{- sums_by_product.collect(item.product, item.qty) or '' -}} {%- endfor -%}
{{_("Description")}} {{_("Summary")}} {{_("Ticket")}} {{_("Product")}} {{_("Quantity")}}
{%- if item.description -%}

{{item.title}}

{% if item.description.startswith("<") %} {{item.description}} {% else %} {{restify(item.description)}} {% endif %} {% else %}

{{item.title}}

{% endif %}
{{item.invoiceable.summary}} {{item.invoiceable.ticket}} {{item.invoiceable.get_invoiceable_product()}} {{item.qty}}

{{_("Total quantities")}}

{%- for product, qty in sums_by_product.items() -%} {%- endfor -%}
{{_("Product")}} {{_("Before")}} {{_("This report")}} {{_("After")}}
{{product}} ({{product.delivery_unit}}) {{obj.get_provision('purchased', product, True)}} {{qty}} {{obj.get_provision('purchased', product, False)}}
{%- endblock -%}
{% block payment %}

{% if obj.due_date %} {{_("Due date")}} : {{fds(obj.due_date)}}
{% endif %} {% if obj.payment_term %} {{_("Payment terms")}} : {{obj.payment_term}} {% endif %}

{% endblock payment %}
{% block ending %}

{{_("With best regards.")}}


{{this.user}}

{% if show_site_op_in_footer %}

{% set site_op = settings.SITE.site_config.site_company %} {% for ln in site_op.get_address_lines() %} {{ln}}, {% endfor %} {#{site_op.get_address_html(sep=', ')}#} {{tostring(site_op.contact_details)}}

{% endif %} {% endblock ending %}
{%- endblock main %}