Price not aligned in bill (Thai language)

Hi, I’m kinda interested in buying this program and willing to transfer my old POS to this one, however I tried to customize due to my desire but I can’t solve this problem.

When it comes to Thai language menu, the price will not be in the same line (I used sambapos4 and sambapos5 still same)

[LAYOUT]
-- General layout
<div style="font-size:12px;font-family:'Tahoma'">
<J00>{ENTITIES}
<J00>Date:{TICKET DATE} | Time:{TIME}
<L00>Ticket No:{TICKET NO}
<F>-
</div>{ORDERS}
<EB>
<J00>Sub-Total:|[=FF('{PLAIN TOTAL}','#')]
{DISCOUNTS}
[<J10>Total Gift:|{ORDER STATE TOTAL:Gift}]
{SERVICES}
<J00>Total:|[=FF('{TICKET TOTAL}','#')]
{PAYMENTS}
<DB>
<F>-
<C10>T H A N K   Y O U

[DISCOUNTS]
<J00>{CALCULATION NAME} {CALCULATION AMOUNT}%|[=FF('{CALCULATION TOTAL}','#')]

[SERVICES]
<J00>{CALCULATION NAME}|{CALCULATION TOTAL}

[PAYMENTS]
<J00>{PAYMENT NAME}|{PAYMENT AMOUNT}

[ORDERS]
-- Default format for orders ตัวนี้ถ้าใส่ total amount จะเป็นราคารวม
-- extra ไปแล้ว แต่ถ้าไม่อยากรวมให้ใส่ price
-- มีการใส่ item tag เพื่อใส่ภาษาไทย
<J00>{QUANTITY} {ITEM TAG:Thai}|[=FF('{TOTAL AMOUNT}','#')]
<J00>   - {NAME}
{ORDER TAGS}

[ORDERS:Gift]
-- Format for gifted orders
<J00>- {QUANTITY} {NAME}|**GIFT**
{ORDER TAGS}

[ORDERS:Void]
-- Nothing will print for void lines

[ORDER TAGS]
-- Format for order tags
<J00>     +{ORDER TAG NAME} [=FF('{ORDER TAG PRICE}','#')]บ.

[ORDER TAGS:General Modifiers]
-- Leave empty to disable printing

[ENTITIES:Table]
-- Table entity format
<L00>Table: {ENTITY NAME}

[ENTITIES:Customer]
-- Customer entity format
<J00>Customer: {ENTITY NAME} | {ENTITY DATA:Phone}

Captggure

I use html printer, the problem is same as

but I haven’t seen any solution yet

To properly layout using Thai language (or any Asian language for that matter) you will need to use HTML or Document Printer template format.

1 Like

Hi markjw thanks for your message, anw I already use HTML printer format, anything wrong with my code please kindly advise. Thanks a lot.

Might have set html printer type but you have only got html formatting on the top part with a div setting the font.
Your orders section has no html. You need to use dovs or table etc to align ans format the layout.

2 Likes

I suggest you to create a new printer template, then click “Load” button and select “Ticket Template (HTML)”, it will create an HTML ticket template you can then edit to your requirements.

1 Like

OMG it works like a charm! anyway I tried copying this format to sambaPOS4, but it didn’t work, so is it code for sambaPOS5 only?

Thank you in advance

Cont remeber if vr had html printer type, check printer settings for printer type.

Yes.

SambaPOS V4 did have HTML printer, however support was a lot more limited to what is now available in V5. The example template likely will not work in V4 as it uses <table> which AFAIK was not supported in V4.

It’s not to say you can’t create a suitable HTML template in V4 - you can - but it will be a lot more complicated.

Here is some I did from a long time ago with V4. I just had a look unfortunately I cannot find the databases anymore so can’t share the template.