{%- 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) -%} {%- for row in data -%} {%- endfor -%}
Sr Item Name Description Qty Rate Amount
{{ row.idx }} {{ row.item_name }} {% if row.item_code != row.item_name -%}
Item Code: {{ row.item_code}} {%- endif %}
{{ row.description }} {%- for field in visible_columns -%} {%- if (field.fieldname not in std_fields) and (row[field.fieldname] not in (None, "")) -%}
{{ field.label }}: {{ row.get_formatted(field.fieldname, doc) }}

{%- endif -%} {%- endfor -%}
{{ row.get_formatted("qty", doc) }} {{ row.uom or row.stock_uom }} {{ row.get_formatted("rate", doc) }} {{ row.get_formatted("amount", doc) }}