{%- if data -%} {%- set visible_columns = get_visible_columns(doc.get(df.fieldname), table_meta, df) -%}
{% for tdf in visible_columns %} {% if (data and not print_settings.compact_item_print) or tdf.fieldname in doc.flags.compact_item_fields %} {% endif %} {% endfor %} {% for d in data %} {% for tdf in visible_columns %} {% if not print_settings.compact_item_print or tdf.fieldname in doc.flags.compact_item_fields %} {% else %}
{{ print_value(tdf, d, doc, visible_columns) }}
{% endif %} {% endif %} {% endfor %} {% endfor %}
{{ _("Sr") }} {{ _(tdf.label) }}
{{ d.idx }} {% if doc.child_print_templates %} {%- set child_templates = doc.child_print_templates.get(df.fieldname) %}
{{ print_value(tdf, d, doc, visible_columns, child_templates) }}
{%- endif -%}