Print BARCODE Number (10 digit no) in POS

I need help in printing the BARCODE Number in POS Invoice.
I am using Custom Print format in POS Profile and also have updated the Item barcode in the item details.
But I am unable to fetch and display no for each item in print.

Here is the code:

{% for item in items %} {{ item.item_name }} {{ format_number(item.qty, null,precision(“difference”)) }} {{ format_currency(item.rate, currency) }} {{ format_currency(item.amount, currency) }} {{ item.barcode }} {% endfor %}

Please suggest ASAP. It has already consumed lot of time.

You can simply add a read read-only type field in the Sales Invoice Item table, and enter item.barcode in the option of that Custom Field.

https://frappe.github.io/frappe/user/en/guides/app-development/fetch-custom-field-value-from-master-to-all-related-transactions.html

Dear Umair,

I added a custom field in the sales invoice table under Setup-> Customize Form-> Sales Invoice.

Please check below:

Also, Below is my HTML Custom Format code:

{% for item in items %}
		<td>
			<span>{{ item.item_name }}</span>
		</td>
		<td class="text-right">{{ format_number(item.qty, null,precision("difference")) }}
{{ format_currency(item.rate, currency) }} {{ format_currency(item.amount, currency) }} {{ item.barcode }}
</tr>
	{% endfor %}
</tbody>

But still the barcode is appearing as blank:

Please Suggest

Dear Umair,

I added a custom field in the sales invoice table under Setup-> Customize Form-> Sales Invoice.

Please check below:

Also, Below is my HTML Custom Format code:

  {% for item in items %}
{{ item.item_name }}
	{{ format_number(item.qty, null,precision("difference")) }}
            {{ format_currency(item.rate, currency) }}
            {{ format_currency(item.amount, currency) }}
            {{ item.barcode }}
{% endfor %}

But still the barcode is appearing as blank:

Please Suggest

Dear,

Please check the custom print format as below:

If anyone can please reply to my query, would be really helpful…