Change custom invoice print format element labels

Hello guys,

I am making custom print format template for sales invoices. And when I put new element, on the settings icon I can customize the label and the Align Value. But, when I put Items Columns there is no settings icon so I can customize the labels of the column titles (example Items, Description etc etc )

Is there a way to change the labels of the columns in Items Element (also the label of Items cannot be changed).

Thanks

Print format builder doesn’t allow for changing labels for table headers currently.

An alternate could be to build a print format using Jinja:

https://docs.erpnext.com/docs/user/manual/en/customize-erpnext/print-format#html-print-format

1 Like

Thanks! Are there any available templates online that we can customize?

There’s a standard one in the product itself when you select custom format checkbox in print format:

<h3>{{ doc.select_print_heading or "Invoice" }}</h3>
<div class="row">
	<div class="col-md-3 text-right">Customer Name</div>
	<div class="col-md-9">{{ doc.customer_name }}</div>
</div>
<div class="row">
	<div class="col-md-3 text-right">Date</div>
	<div class="col-md-9">{{ doc.get_formatted("invoice_date") }}</div>
</div>
<table class="table table-bordered">
	<tbody>
		<tr>
			<th>Sr</th>
			<th>Item Name</th>
			<th>Description</th>
			<th class="text-right">Qty</th>
			<th class="text-right">Rate</th>
			<th class="text-right">Amount</th>
		</tr>
		{%- for row in doc.items -%}
		<tr>
			<td style="width: 3%;">{{ row.idx }}</td>
			<td style="width: 20%;">
				{{ row.item_name }}
				{% if row.item_code != row.item_name -%}
				<br>Item Code: {{ row.item_code}}
				{%- endif %}
			</td>
			<td style="width: 37%;">
				<div style="border: 0px;">{{ row.description }}</div></td>
			<td style="width: 10%; text-align: right;">{{ row.qty }} {{ row.uom or row.stock_uom }}</td>
			<td style="width: 15%; text-align: right;">{{
				row.get_formatted("rate", doc) }}</td>
			<td style="width: 15%; text-align: right;">{{
				row.get_formatted("amount", doc) }}</td>
		</tr>
		{%- endfor -%}
	</tbody>
</table>

Also, while you cannot change the table headers only for printing, there is always the option to change the field label via customize form. The only downside would be that the label changes in the document table as well. So it’s a tradeoff.

Perhaps some other members could share alternate methods of achieving this.

Thanks for your answer.

I have one more question regarding the print formats.
The english labels are great and we are using them, but when I chose Macedonian language on the Invoice, Quotation etc the translations are awful. They just don’t make sense.
Is there a way to translate the Macedonian labels of the fields? This would solve all of my problems.

Thanks in advance.

PS. There isn’t Macedonian translation of ERPNext yet and I really don’t know where are this labels translated.

You can add custom translations:

https://docs.erpnext.com/docs/user/manual/en/setting-up/print/custom-translations#2-custom-translation

You can also contribute them:
https://frappeframework.com/docs/user/en/guides/basics/contribute_translations