{%- set std_fields = ("item_code", "item_name", "description", "qty", "rate", "amount", "stock_uom", "uom") -%} {%- set customised_print_preview = frappe.utils.cint(frappe.db.get_value("Features Setup", None, "customised_print_preview")) -%} {% if doc.in_format_data("image") and doc.get("image") and not doc.is_print_hide("image")-%}
{%- endif %}
{% if doc.in_format_data("item_code") and not doc.is_print_hide("item_code") -%}
{{ doc.item_code }}
{%- endif %} {% if (doc.in_format_data("item_name") and not doc.is_print_hide("item_name") and (not doc.in_format_data("item_code") or doc.is_print_hide("item_code") or doc.item_code != doc.item_name)) -%}
{{ doc.get_formatted("item_name") }}
{%- endif %} {% if (doc.in_format_data("description") and doc.description and ( ( (not doc.in_format_data("item_code") or doc.is_print_hide("item_code")) and (not doc.in_format_data("item_name") or doc.is_print_hide("item_name")) ) or not (doc.item_code == doc.item_name == doc.description) )) -%}

{{ doc.get_formatted("description") }}

{%- endif %} {% if (customised_print_preview == 1) -%} {%- for field in doc.hide_in_print_layout -%} {%- if (field not in std_fields) and (doc.get(field) not in (None, "", 0)) -%}
{{ doc.meta.get_label(field) }}: {{ doc.get_formatted(field) }}
{%- endif -%} {%- endfor -%} {%- endif %}