View Categories

Print Token/Sequence number in receipt & KOT

1 min read

Use this script when you need to print a sequence number for each receipt/kot generated from different counter/PDA


Maintenance > Resources
For sequence number on receipt:
1. Enable ticket.close event in Ticket.Buttons resource
2. Create a new resource event.close and copy paste the below code

Integer i=0;
if(ticket.getGlobalValue()!=null)
{
i = ticket.parseInt(ticket.getGlobalValue());
}
i = i+1;
ticket.setGlobalValue(i.toString());

3. Copy-paste the below code inside Printer.Ticket to print the sequence number

<line><text>$ticket.getGlobalValue()</text></line>

4. Restart the software for this script to take effect

For sequence number on KOT:
1. Copy paste the below code in the resource Script.SendOrder

if(ticket.getProperty("Sequence")==null)
{
Integer i=0;
if(ticket.getGlobalValue()!=null)
{
i = ticket.parseInt(ticket.getGlobalValue());
}
i = i+1;
ticket.setGlobalValue(i.toString());
ticket.setProperty("Sequence",i.toString());
}
(Remove the line ticket.setGlobalValue(i.toString()); if the numbers are printed in odd series, e.g., 1, 3, 5 etc)

2. Copy-paste the below code inside Printer.KOT1 to print the sequence number in KOT

<line><text>$ticket.getProperty("Sequence")</text></line>

(If this didn't work try the below script)

<text align="left" length="15" bold="true">${ticket.printProperty("KotNumber")}</text>

3. Restart the software for this script to take effect

For printing token number in closed bills and KOT, variable $token can be used.

0 Comments

Leave a Reply

Arrow-up