{% extends 'report_html_purchase/reports/base.html' %} {% block title %} Purchase {% endblock %} {% block report_header scoped %} {% set purchase = record %} {% if purchase.state == 'quotation' %} RFQ {% elif purchase.state == 'draft' %} Draft PO {% else %} Purchase Order {% endif %} {% if purchase.number %} {% endif %}
Purchase # {{ purchase.number }}
Purchase Date {{ purchase.purchase_date and purchase.purchase_date|dateformat }}
{% endblock report_header %} {% block report_body scoped %} {% set purchase = record %} {% if purchase.invoice_address %} {% endif %} {% if purchase.warehouse and purchase.warehouse.address %} {% endif %}
Vendor
{% for line in purchase.invoice_address.full_address.split('\n') %} {{ line }}
{% endfor %}
Ship To
{% for line in purchase.warehouse.address.full_address.split('\n') %} {{ line }}
{% endfor %}
{% if purchase.state != 'quotation' %} {% endif %} {% for line in purchase.lines %} {% if purchase.state != 'quotation' %} {% endif %} {% endfor %}
# Product Description QuantityUnit Price Amount
{{ loop.index }} {% if line.product %} {{ line.product.code }} {% else %} - {% endif %} {% if line.product %} {{ line.product.name }} {% else %} {{ line.description }} {% endif %} {% if line.quantity is not none %} {{ format_number(line.quantity, purchase.party.lang, digits=line.unit_digits) }} {% if line.unit.symbol != 'u' %}{{ line.unit.symbol }}{% endif %} {% endif %} {% if line.unit_price is not none %} {{ line.unit_price|currencyformat(purchase.currency.code, format="\xa4#,##0.0000") }}{% if line.unit.symbol != 'u' %}/{{ line.unit.symbol }}{% endif %} {% endif %} {{ line.amount|currencyformat(purchase.currency.code) }}
{% if purchase.state != 'quotation' %}
Subtotal   {{ purchase.untaxed_amount|currencyformat(purchase.currency.code) }}
Tax   {{ purchase.tax_amount|currencyformat(purchase.currency.code) }}
Total   {{ purchase.total_amount|currencyformat(purchase.currency.code) }}
{% endif %} {% endblock report_body %}