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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
1.6 KiB
HTML
Raw Normal View History

{%- set compact = print_settings.compact_item_print -%}
{%- set compact_fields = parent_doc.flags.compact_item_fields -%}
{%- set display_columns = visible_columns|map(attribute="fieldname")| list -%}
{%- set columns = parent_doc.flags.format_columns(display_columns, compact_fields) -%}
2016-02-09 08:46:41 +00:00
{% if doc.in_format_data("image") and doc.get("image") and "image" in display_columns -%}
2016-10-19 06:37:23 +00:00
<div class="pull-left" style="max-width: 40%; margin-right: 10px;">
2016-10-03 11:45:42 +00:00
<img class="print-item-image" src="{{ doc.image }}" alt="">
</div>
{%- endif %}
2016-02-16 10:00:17 +00:00
<div>
{% if doc.in_format_data("item_code") and "item_code" in display_columns -%}
2020-11-10 11:53:24 +00:00
{% if compact %}
<div class="primary compact-item">
{{ _(doc.item_code) }}
2016-02-16 10:00:17 +00:00
</div>
2020-11-10 11:53:24 +00:00
{% endif %}
2016-02-16 10:00:17 +00:00
{%- endif %}
{%- if doc.in_format_data("item_name") and "item_name" in display_columns and
not (doc.in_format_data("item_code") and 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 columns -%}
{% 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>