Print Format to show Change Amount and Tendered Amount

Hi

I am trying to show the change amount for a ticket but unable to do so.

Below is the code. Please advise. Thanks!

[LAYOUT]
-- General layout
<T>Meet & Melt
<L00>Date:{TICKET DATE}
<L00>Time:{TIME}
{ENTITIES}
<L00>Ticket No:{TICKET NO}
<F>-
{ORDERS}
<F>=
<EB>
{DISCOUNTS}
[<J10>Total Gift:|{ORDER STATE TOTAL:Gift}]
{SERVICES}
<J10>Total:|{TICKET TOTAL}
[PAYMENTS]

<J00>Bill Amount|{TICKET TOTAL}
<J00>Paid Amount ({PAYMENT NAME})|{TENDERED}
<J00>Balance Amount|{CHANGE TOTAL}
<DB>
<F>=
<C10>T H A N K   Y O U

[DISCOUNTS]
<J00>{CALCULATION NAME} %{CALCULATION AMOUNT}|{CALCULATION TOTAL}

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

[ORDERS]
-- Default format for orders
<J00>- {QUANTITY} {NAME}|{TOTAL PRICE}
{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} | {ORDER TAG PRICE}

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

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

{CHANGE TOTAL} cannot be used in the [PAYMENTS] Section. It can only be used in the [LAYOUT] Section.

Certain {TAGS} are only valid within certain [SECTIONS]

2 Likes

You have to add {PAYMENTS} before [PAYMENTS] too.

1 Like

Does the order of section affect the printing? For example, [LAYOUT] should always be on top?

Yes. Your general layout goes at top which includes the placeholders for the sections {PAYMENTS} , {ORDERS} etc

Below that you should then define these section template parts under there own [square bracket part]
Ie [PAYMENTS] and [ORDERS]

You use these smaller sections for where there is repeatable content like orders and payments.
You can also specify specific conditions for a section part template within the square bracket header… Take a look at the VOID and GIFT orders section on default template.

1 Like

Lovely explanation … Thanks @JTRTech … Just about to get the hang of SAMBAPOS … Hehe