From 24d38bb4e8538fed2be1da3fb481b5f5d754257b Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Fri, 8 Jan 2016 15:58:38 +0530 Subject: [PATCH] Updated Standard With Columns Print Format (markdown) --- Standard-With-Columns---Print-Format.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Standard-With-Columns---Print-Format.md b/Standard-With-Columns---Print-Format.md index f9c5e61..d4349f6 100644 --- a/Standard-With-Columns---Print-Format.md +++ b/Standard-With-Columns---Print-Format.md @@ -8,8 +8,15 @@ Name: { DocType } - Standard With Columns ##### HTML ``` -{% if doc.fname and doc.table_print_templates and doc.table_print_templates.get(doc.fname) -%} -{% if doc.set("table_print_templates", {"other_charges": doc.table_print_templates.get("other_charges")}) %}{% endif %} +{% if doc.items -%} +{% for d in doc.items %} +{% if d.get("print_templates") -%} +{% if "description" in d.get("print_templates") and d.get("print_templates").pop("description") %}{% endif %} +{% if "item_code" in d.get("hide_in_print_layout", []) and d.get("hide_in_print_layout").remove("item_code") %}{% endif %} +{% if "item_name" in d.get("hide_in_print_layout", []) and d.get("hide_in_print_layout").remove("item_name") %}{% endif %} +{% if "image" in d.get("hide_in_print_layout", []) and d.get("hide_in_print_layout").remove("image") %}{% endif %} {% endif %} +{% endfor %} +{%- endif %} {% include "templates/print_formats/standard.html" %} ``` \ No newline at end of file