From d82352eacc9c7c3aa16664e79f35a8708e64019b Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 21 Jul 2014 12:02:37 +0530 Subject: [PATCH] item grid, added other printable fields in description --- .../print_formats/includes/item_grid.html | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/erpnext/templates/print_formats/includes/item_grid.html b/erpnext/templates/print_formats/includes/item_grid.html index a166ced57a..f9d3c1f5e8 100644 --- a/erpnext/templates/print_formats/includes/item_grid.html +++ b/erpnext/templates/print_formats/includes/item_grid.html @@ -1,3 +1,7 @@ +{%- from "templates/print_formats/standard_macros.html" import print_value -%} +{%- set std_fields = ("item_code", "item_name", "description", "qty", "rate", "amount", "stock_uom") -%} +{%- set visible_columns = get_visible_columns(doc.get(df.fieldname), table_meta) -%} + @@ -18,11 +22,21 @@ {%- endif %} +
{{ row.description }} + {%- for field in visible_columns -%} + {%- if (field.fieldname not in std_fields) and + (row[field.fieldname] not in (None, "")) -%} +
{{ field.label }}: + {{ frappe.format_value(row[field.fieldname], field, doc) }}

+ {%- endif -%} + {%- endfor -%}
- + frappe.format_value(row.rate, + table_meta.get_field("rate"), doc) }} + {%- endfor -%}
-
{{ row.description }}
{{ row.qty }} {{ row.stock_uom }} {{ - format(row.rate, table_meta.get_field("rate"), doc) }}{{ format(row.amount, table_meta.get_field("amount"), doc) }}{{ + frappe.format_value(row.amount, + table_meta.get_field("amount"), doc) }}