{% macro render_purchase_table(purchases, supplier=None, formatLang) %} {% if purchases %}
PO No. | State | {% if not supplier %}Supplier | {% endif %}Address | Product | Quantity | Amount | {% for purchase in purchases %}
---|---|---|---|---|---|---|
{{ purchase.reference }} | {{ purchase.state }} | {% if not supplier %}{{ purchase.party.name }} | {% endif %}{{ purchase.invoice_address.rec_name }} | {{ purchase.total_amount|currencyformat(purchase.currency.code) }} | ||
{{ line.product.name }} | {{ formatLang(line.quantity, purchase.party.lang, digits=line.unit_digits) }} {% if line.unit.symbol != 'u' %}{{ line.unit.symbol }}{% endif %} |