2014-07-28 21:17:20 +05:30

45 lines
1.6 KiB
HTML

{%- from "templates/print_formats/standard_macros.html" import print_value -%}
{%- set std_fields = ("item_code", "item_name", "description", "qty", "rate", "amount", "stock_uom", "uom") -%}
{%- set visible_columns = get_visible_columns(doc.get(df.fieldname), table_meta) -%}
<table class="table table-bordered">
<tbody>
<tr>
<th>{{ _("Sr") }}</th>
<th>{{ _("Item Name") }}</th>
<th>{{ _("Description") }}</th>
<th class="text-right">{{ _("Qty") }}</th>
<th class="text-right">{{ _("Rate") }}</th>
<th class="text-right">{{ _("Amount") }}</th>
</tr>
{%- for row in data -%}
<tr>
<td style="width: 3%;">{{ row.idx }}</td>
<td style="width: 20%;">
{{ row.item_name }}
{% if row.item_code != row.item_name and not row.meta.get_field("item_code").print_hide -%}
<br>Item Code: {{ row.item_code }}
{%- endif %}
</td>
<td style="width: 37%;">
<div style="border: 0px;">{{ row.description }}
{%- for field in visible_columns -%}
{%- if (field.fieldname not in std_fields) and
(row[field.fieldname] not in (None, "", 0)) -%}
<br><strong>{{ _(field.label) }}:</strong>
{{ row.get_formatted(field.fieldname, doc) }}
{%- endif -%}
{%- endfor -%}
</div>
</td>
<td style="width: 10%; text-align: right;">{{ row.get_formatted("qty", doc) }}<br>
<small>{{ row.uom or row.stock_uom }}</small></td>
<td style="width: 15%; text-align: right;">{{
row.get_formatted("rate", doc) }}</td>
<td style="width: 15%; text-align: right;">{{
row.get_formatted("amount", doc) }}</td>
</tr>
{%- endfor -%}
</tbody>
</table>