Printer Template Formatting Tags

You can use 0.00 format for rounding to two decimal places. Or you can use 0.## for optional decimals.

If you print tax with [=F(TN('{TICKET TOTAL}')*0.2,'#')] change it to[=F(TN('{TICKET TOTAL}')*0.2,'0.00')]

Thanks Emre - Only recently started using so had a lot to learn :slight_smile: just want to say that this is the best piece of software that I have come across in years of working in IT. WELL DONE!! and thank you and the rest of the team for all of your hardwork.

Many Thanks

Rob

print qr code from microsoft word

Is there a format function for {TIME}?

It appears that {TIME} follows the System Short Time format, which I have set as HH:mm. Is there a chance I could override this using formatting so I could include seconds as such: HH:mm:ss, since System Short Time format does not support seconds?

EDIT: I’ve managed to get the time from the following - not sure if this will work in a Template, but I’m using it in a Ticket Tag anyway…

[=Helper.GetUniqueString().substr(8,2)].[=Helper.GetUniqueString().substr(10,2)].[=Helper.GetUniqueString().substr(12,3)]

Gives time as HH.mm.xxx, like 13.20.450

2 Likes

Hello,

I cannot figure out how to get the font several sizes larger for the kitchen. Here is a copy of my kitchen order template. Also, I cannot figure out where to add my business name and info to my customer receipt.

[LAYOUT]
<T>Ticket
<L00>Date:{TICKET DATE}
<L00>Time:{TIME}
<L00>Table:{ENTITY NAME:Table}
<L00>Ticket No:{TICKET NO}
<F>-
{ORDERS}

[ORDERS]
<L00>- {QUANTITY} {NAME}
{ORDER TAGS}

[ORDERS:Void]
<J00>- {QUANTITY} {NAME}|**Void**
{ORDER TAGS}

[ORDER TAGS]
-- Format for order tags
<L00>     * {ORDER TAG NAME}

Thanks for any help.
Paula Brown

Look at the original post:

<L10> sets font height to 1 and font width to 0.
<EB> Enable Bold
<DB> Disable Bold

Your company information can be written in anywhere you want it to appear in the Template:

<F>*
<L00>*        HAPPY HOUR 3-5pm Mon-Fri        *
<F>*
<L00>My company Information (address, phone)

In my Template, this information comes after the Payments Section, which makes it print at the very bottom of the Ticket. My Template also supplies the information at the very top of the Ticket via a Graphic stored in Printer Memory, and is called by the <XCT> command.

[LAYOUT]
-- General layout
<XCT>29,40,76,6,0,48,69,32,32,1,1
<J00> | 
<EB>
<T>Restaurant Name
<DB>
<J00>{TICKET DATE} {TICKET TIME}|Server: {USER NAME}  #{TICKET NO}
{ENTITIES}
<EB>
[<L00>NOTE: {NOTE}]
<DB>
<F>-
{ORDERS}
<F>=
<EB>
{DISCOUNTS}
[<J00>Total FREE:|{ORDER STATE TOTAL:Gift}]
<J00>Subtotal:|[=F(TN('{TICKET TOTAL}')-TN('{TAX TOTAL}'))]
<DB>
{TAXES}
<J00>Tax Total:|{TAX TOTAL}
{SERVICES}
<EB>
<J10>TOTAL:|($[=F(TN('{TICKET TOTAL}')/20)]) {TICKET TOTAL}
<DB>
<F>-
{PAYMENTS}
[<L00>CC Info: {TICKET TAG:CCtype} ({TICKET TAG:CCdigits})]
[<J00>CHANGE:|[=F(TN('{CHANGE TOTAL}'))]]
[<F>=
<J00>{TICKET TAG:GCN}|Balance: [=F(TN('{TICKET TAG:GCB}'))]]
<F>*
<L00>*        HAPPY HOUR 3-5pm Mon-Fri        *
<F>*
<L00>My company Information (address, phone)

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

[PAYMENTS]
<J00>{PAYMENT NAME}: | {TENDERED}

[ORDERS]
-- Default format for orders
<J00>{QUANTITY} {NAME}|{PRICE} {TOTAL AMOUNT}
{ORDER TAGS}

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

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

[ORDER TAGS]
-- Format for order tags
<J00>  {ORDER TAG QUANTITY} {ORDER TAG NAME}| {ORDER TAG PRICE}

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

[ENTITIES:Customer]
-- Customer entity format
<J00>Cust: {ENTITY NAME}|Bal: {ENTITY BALANCE}

[TAXES]
<J00>Tax {TAX NAME} ({TAX RATE}%):| {TAX AMOUNT}

[SERVICES]
<J00>{CALCULATION NAME} ([=F(TN('{CALCULATION AMOUNT}'))]):| {CALCULATION TOTAL}
3 Likes

How do I use multiple tags? For example center, bold and title. I tried <Cxy,T,EB>

is it possible to add print preview button to payment screen ?

Here is 1 method of doing this using Notepad (which will not preserve Print Driver Formatting); there are probably other ways to achieve this, such as cloning your Windows Printer and setting it to Print To File (which could theoretically preserve Print Driver Formatting), or if your Printer Driver has a Print Preview option, you could use that.


Create a Printer using Demo Printer Type, and a Print Job to use this Printer.

Create an Automation Command to invoke the Print Job:

Action to Fire Print Job:

Action to Open Notepad with preview document:

Rule to handle Automation Command and fire Actions:

1 Like

its not working for me

my XCT tag is working for its order in receipt rest it shows in small size how can i change that

and one more thing is there a command for this: “print all the tag but not discount tag”

i think i found the error it should be “J” not “J00”

no its still giving the same error have a look

could it be possible because of order tag

ps i am using thermal printer

I don’t understand what it is you’re trying to achieve, nor what the perceived issue is.

What are those different XCT commands supposed to do?

Also, please review initial post in this tutorial - it states:

<EB> enable bold
<DB> disable bold
<Jxy> x=font height, y=font width

well i want all the products font size increase and order tag to be regular size
i am using XCT command to increase the font size

Use <J10> for order lines and <J00> for order tag lines.

1 Like

ok thanks @emre this is what i required

can i set margin for the whole ticket like line indention?

my roll i thinks moves when ticket start printing causing it to missing first few characters on each line

There is no provision in SambaPOS for margins. Try setting printer margins in the Windows Printer Driver and/or Printing Preferences.

Or you can add white-space to the beginning of lines after the opening tags, for example:

<J00>  Total:{TICKET TOTAL}
     ^^ 2 spaces

Alternatively, you might be able to use CSS in an HTML Printer Type, for example:

<div style="padding-left:5px">Total:{TICKET TOTAL}</div>

My Printer Utility allows for setting margins:

1 Like

Hi,
Have formatted ticket printer no problem but am trying to add a label printer to go with kitchen printer to print labels for take away orders.
Have got the printer working to print orders via windows or text printer option but on either formatting doesnt seem to work.
If there a different formatting code to be used for windows printer template?
Justified seems to work, but center < C22 > or < EB > etc dont??

Also to print individual labels per order line i have enabled seperate prints by quantity however cant see how to set so only new orders / no voids are printed on labels.
I have tried moving all template parts to be part of the order fine format as below;

{ORDERS}

[ORDERS]
– Normal Order Format
< J00 > {TICKET DATE}-{TIME}|#{TICKET NO}
< L00 >Customer:{ENTITY NAME:Customers}
< EB >
{NAME}
< DB >
{ORDER TAGS}

[ORDERS:Gift]
– Gift Order Format
< J00 >{TICKET DATE}-{TIME}|#{TICKET NO}
< L00 >Customer:{ENTITY NAME:Customers}
< EB >
{NAME}|GIFT
< DB >
{ORDER TAGS}

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

[ORDER TAGS]
– Format for order tags

  • {ORDER TAG NAME}

But just prints blank label for void.

Have also tried removing the [ORDERS:Void] part and also setting [ORDERS] to [ORDERS:Submitted] but no luck.