POS V8 Printing Customer Name

Hello! Is it possible to print customer name in POS apart from the offline_pos_name? If yes, what tag should i use to display it?

Based on the standard POS Print Format, Customer Name is fetched from standard Sales Invoice field i.e. customer_name.

@umair
This is for POS invoice. What i’m using as a template is the Point of Sale print format which is for the offline POS mode.

I tried {{ doc.customer_name }} and it does not work.

Had any success with the customer name?

I tried {{ customer_name }} maintaining the format with the other fields but when I tried to print it gave me a format template error in developer console, Is there a reference for JS print format?

I am sharing my code incase anyone spots an error.

<style>
	.print-format table, .print-format tr,
	.print-format td, .print-format div, .print-format p {
		font-family: Monospace;
		line-height: 200%;
		vertical-align: middle;
	}
	@media screen {
		.print-format {
			width: 4in;
			padding: 0.25in;
			min-height: 8in;
		}
	}
</style>

<p class="text-center">
	<b>{{ __("Company Name String") }}</b><br>
	<small>{{ __("Address String") }}</small><br>
	{{ __("Mobile: +AA XXXXX YYYYY") }}<br>
	{{ __("GSTN: XXXXXXXXXXXXXXXXX") }}<br>
	{{ __("FSSAI: YYYYYYYYYYYYYYYY") }}<br>
</p>
<br>
<p>
  <b>{{ __("Receipt No") }}:</b> {{ name }}<br>
	<b>{{ __("Customer") }}:</b> {{ customer_name }}<br>
	<b>{{ __("Date") }}:</b> {{ dateutil.global_date_format(posting_date) }}<br>
</p>
<table class="table table-condensed cart no-border">
	<thead>
		<tr>
			<th width="50%">{{ __("Item") }}</b></th>
			<th width="25%" class="text-right">{{ __("Qty") }}</th>
			<th width="25%" class="text-right">{{ __("Amount") }}</th>
		</tr>
	</thead>
	<tbody>
		{% for item in items %}
		<tr>
			<td>{{ item.item_name }}</td>
			<td class="text-right">{{ format_number(item.qty, null,precision("difference")) }}</td>
			<td class="text-right">{{ format_currency(item.amount, currency) }}</td>
		</tr>
		{% endfor %}
	</tbody>
</table>
<table class="table table-condensed no-border">
	<tbody>
		<tr>
			<td class="text-right" style="width: 75%">
				<b>{{ __("Total") }}</b>
			</td>
			<td class="text-right">
				{{ format_currency(grand_total, currency) }}
			</td>
		</tr>
	</tbody>
</table>
<hr>
<p class="text-center"><small>{ __("*All prices are inclusive of GST") }}</small></p>

I am still experimenting, if i get it working, I will share my results