Alignment of receipt

The price of alignment are not equal

Here is my template…Please help~

[LAYOUT]
<ec>
<J10>                        PRACTICUS IT SOLUTIONS SDN BHD
<J00>                                 (1068358-T)
<J00>                          NO.19-01, JALAN PERMAS 9/1, 
<J00>                            BANDAR BARU PERMAS JAYA, 
<J00>                              81750 MASAI JOHOR.
<J00>                                   GST ID:
<J00>                                BUSINESS HOURS
<J00>                        SUN - THU: 1000 HRS - 2200 HRS
<J00>                        FRI - SAT: 1000 HRS - 2300 HRS
<J00>
<J10>                                  TAX INVOICE
<J00>Cashier:{USER NAME}
<J00>Receipt No: {TICKET NO}
<J00>Sold to:                                Date: {DATE} Time: {TIME}
{ENTITIES}                             QTY    U.PRICE       TOTAL(RM)TAX   
<F>-
{ORDERS}
<F>-
{DISCOUNTS}
<J00>Taxable - SR |{ORDER STATE TOTAL:GST @ 6% Applied}
<J00>GST @ 6% Total :| {TAX TOTAL}
<F>-
{SERVICES}
<J10>Total:                           |{TICKET TOTAL}
{PAYMENTS}
<j00>Paid:|{TENDERED TOTAL}
<j00>Change:|{CHANGE TOTAL}

<DB>
<L>
<J00>
<ec>
<J00>                                   Thank you
<J00>                               Please Come Again
<J00>                         Goods Sold Are Not Returnable!
<el>


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

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

[ORDERS]
<J00:2>  {NAME}                   
{ORDER TAGS}
<J00>  {ITEM TAG:English}|{QUANTITY}     |{PRICE}            |{TOTAL AMOUNT}| - {ITEM TAG:GST}R

[ORDERS:Gift]
-- Format for gifted orders
<J00:2>  {NAME}
{ORDER TAGS}
<J00>  {ITEM TAG:English}|{QUANTITY}                        |(GIFT)
[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}

Take the spaces out of your template, for example here:

<J00>  {ITEM TAG:English}|{QUANTITY}     |{PRICE}            |{TOTAL AMOUNT}| - {ITEM TAG:GST}R

The <Jxx> tag justifies output into columns. Since your {TOTAL AMOUNT} varies in width from 1 line to the next, you cannot expect the {PRICE} column to align properly when you are padding it with spaces.

Your other option for total control would be to use <Lxx> and use substr() functions to pad your output to fixed lengths.

THX bro…i make it :smile: