Serial No. Column Width

Dear…
How can we adjust serial numbers in 2, 3 columns to minimize page length?

@Humming_Bird Hello,
In the custom print format, you can achieve this by using the following syntax:
{{ row.serial_no | replace(“<br”, " ") }}

hy @Krishn can we add syntax here to modify this print format.


@Humming_Bird Yes You can but you have to write this code in HTML:

{%- for row in doc.items -%}
    <tr>
        <td align="center" >{{loop.index}}</td>
        <td align="left" ><b>{{row.item_code}}</b>  </td>
        <td align="center" >{%if row.serial_no%}{{row.serial_no}}{%endif%}</td>
      <td align="center">{{row.qty}}</td>
        <td align="right" {{frappe.utils.fmt_money(row.rate)}}</td>
        <td align="right" >{{frappe.utils.fmt_money(row.amount)}}</td>
    </tr>
{%- endfor -%}
Sr. No. Item Code Serial No. Qty. Rate Amount


Dear @Krishn Now this is showing in this format…how can we get this into column format

@Humming_Bird Could you please share your HTML code?

{%- for row in doc.items -%}

{{loop.index}} {{row.item_code}} {%if row.serial_no%}{{row.serial_no}}{%endif%} {{row.qty}} <td align="right" {{frappe.utils.fmt_money(row.rate)}} {{frappe.utils.fmt_money(row.amount)}} {%- endfor -%}

How can we add coma at the end of each serial no…?

{%- for row in doc.items -%} {%- endfor -%}
{{ loop.index }} {{ row.item_name }} {{ row.serial_no | default('') }}{% if not loop.last %},{% endif %}

@Humming_Bird Your code works perfectly.

Thanks Dear