brotherton-erpnext/erpnext/templates/print_formats/includes/item_table_description.html

48 lines
1.6 KiB
HTML
Raw Normal View History

2016-02-16 10:00:17 +00:00
{%- set compact = doc.flags.compact_item_print -%}
{%- set compact_fields = doc.flags.compact_item_fields -%}
2016-02-09 08:46:41 +00:00
2015-05-14 06:56:27 +00:00
{% if doc.in_format_data("image") and doc.get("image") and not doc.is_print_hide("image")-%}
<div class="pull-left" style="width: 20%; margin-right: 10px;">
<div class="square-image" style="background-image: url('{{ doc.image }}')">
</div>
</div>
{%- endif %}
2016-02-16 10:00:17 +00:00
<div>
2016-02-16 10:00:17 +00:00
{% if doc.in_format_data("item_code") and not doc.is_print_hide("item_code") -%}
<div class="primary">
{% if compact %}<strong>{% endif %}
2016-02-17 13:45:45 +00:00
{{ _(doc.item_code) }}
2016-02-16 10:00:17 +00:00
{% 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 11:02:30 +00:00
or doc.item_code != doc.item_name)) -%}
2016-03-03 05:18:45 +00:00
<div class="primary">{{ doc.get_formatted("item_name", translated=True) }}</div>
2016-02-16 10:00:17 +00:00
{%- endif %}
{% if (doc.in_format_data("description") and doc.description and
(
2015-06-01 11:42:43 +00:00
(
(not doc.in_format_data("item_code") or doc.is_print_hide("item_code")) and
2015-06-01 11:42:43 +00:00
(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-03-03 05:18:45 +00:00
<p>{{ doc.get_formatted("description", translated=True) }}</p>
2016-02-16 10:00:17 +00:00
{%- endif %}
{% if compact -%}
{%- for fieldname in doc.flags.show_in_description -%}
{% if doc.get(fieldname) and doc.in_format_data(fieldname) -%}
2016-02-16 10:00:17 +00:00
<p>
2016-02-17 13:45:45 +00:00
<strong>{{ _(doc.meta.get_label(fieldname)) }}:</strong>
2016-03-03 05:18:45 +00:00
{{ doc.get_formatted(fieldname, translated=True) }}
2016-02-16 10:00:17 +00:00
</p>
{% endif %}
{%- endfor -%}
2016-02-09 08:46:41 +00:00
{%- endif %}
</div>