47 lines
1.5 KiB
HTML
Raw Normal View History

2016-02-16 15:30:17 +05:30
{%- set compact = doc.flags.compact_item_print -%}
{%- set compact_fields = doc.flags.compact_item_fields -%}
2016-02-09 16:46:41 +08:00
2015-05-14 12:26:27 +05:30
{% if doc.in_format_data("image") and doc.get("image") and not doc.is_print_hide("image")-%}
<div class="pull-left" style="max-width: 38.2%; margin-right: 10px;">
2016-02-16 15:30:17 +05:30
<img src="{{ doc.image }}" class="img-responsive">
</div>
{%- endif %}
2016-02-16 15:30:17 +05:30
<div>
2016-02-16 15:30:17 +05:30
{% if doc.in_format_data("item_code") and not doc.is_print_hide("item_code") -%}
<div class="primary">
{% if compact %}<strong>{% endif %}
{{ doc.item_code }}
{% if compact %}</strong>{% endif %}
</div>
{%- 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")
2015-05-26 16:32:30 +05:30
or doc.item_code != doc.item_name)) -%}
2016-02-16 15:30:17 +05:30
<div class="primary">{{ doc.get_formatted("item_name") }}</div>
{%- endif %}
{% if (doc.in_format_data("description") and doc.description and
(
2015-06-01 17:12:43 +05:30
(
(not doc.in_format_data("item_code") or doc.is_print_hide("item_code")) and
2015-06-01 17:12:43 +05:30
(not doc.in_format_data("item_name") or doc.is_print_hide("item_name"))
) or not (doc.item_code == doc.item_name == doc.description)
))
-%}
2016-02-16 15:30:17 +05:30
<p>{{ doc.get_formatted("description") }}</p>
{%- endif %}
{% if compact -%}
{%- for fieldname in doc.flags.show_in_description -%}
{% if doc.get(fieldname) -%}
<p>
<strong>{{ doc.meta.get_label(fieldname) }}:</strong>
{{ doc.get_formatted(fieldname) }}
</p>
{% endif %}
{%- endfor -%}
2016-02-09 16:46:41 +08:00
{%- endif %}
</div>