This document will guide you on how to set up a KOT4 printer in addition to the existing KOT3 available in Configuration
Procedure #
1. Connect the additional printer to the system using USB or network cable
2. Go to System Menu > Configuration, under configuration setup the additional printer Mode and Port
Press the Save button and click OK.
3. Now go to Administration Menu > Maintenance > Resources
4. Under Resources on the left side list search for Printer.KOT listings, you could see only a maximum of Printer.KOT3 is listed by default.
So in order to add a new KOT4 printer, you should create a new Resource under the name Printer.KOT4
5. To create a new KOT4 resource press the + icon on the top right corner. On the Resource field type Printer.KOT4 and click the Save button.
Now copy-paste the below script onto the scripts page.
<?xml version="1.0" encoding="UTF-8"?> <!-- Posics Saleculator - Billing System. Copyright (C) 2009 Posics This file is part of Posics Saleculator. --> <output> <display> <line> <text align="left" length="10">Order sent to KOT4</text> <text align="right" length="10">${ticket.printTotal()}</text> </line> <line> <text align="center" length="20">Thank you.</text> </line> </display> <ticket printer = "2"> <line size="1"> <text align="center" length="48" bold="true">KOT4</text> </line> #if ($ticket.getProperty("KotNumber")) <line size="1"> <text align="center" length="48" bold="true">${ticket.printProperty("KotNumber")}</text> </line> #end <line></line> <line> <text align="left" length="15">Receipt:</text> <text>${ticket.printId()}</text> </line> <line> <text align="left" length="15">Date:</text> <text>${ticket.printDate()}</text> </line> #if ($ticket.getCustomer()) <line> <text align="left" length="15">Customer:</text> <text>${ticket.getCustomer().getName()}</text> </line> <line> <text align="left" length="15"></text> <text>${ticket.getCustomer().getSearchkey()}</text> </line> #end #if ($place) <line> <text align="left" length="15">Table:</text> <text>${place}</text> </line> #end #if ($ticket.getProperty("ReceiptNote")) <line> <text>${ticket.printProperty("ReceiptNote")}</text> </line> #end <line></line> <line> <text align="left" length="17">Item</text> <text align="right" length="5"></text> </line> <line> <text>------------------------------------------------</text> </line> #foreach ($ticketline in $ticket.getLines()) #if (($ticketline.getProperty("kotnum").equals("KOT4")) && ($ticketline.getProperty("sendstatus").equals("No"))) <line> <text align="left" length="5" bold="true">${ticketline.printMultiply()}x</text> #if ($ticketline.isProductCom()) <text align="left" length="41">--${ticketline.printName()}</text> #else <text align="left" length="43" bold="true">${ticketline.printName()}</text> #end </line> #end <!-- Add the following lines only for 2.30 Attributes --> #if ($ticketline.productAttSetInstId) <line> <text align="left" length="48"> ${ticketline.productAttSetInstDesc}</text> </line> #end <!-- Add the previous lines only for 2.30 Attributes --> #end <line> <text>------------------------------------------------</text> </line> <line> <text align="left" length="15">Waiter:</text> <text>${ticket.printUser()}</text> </line> <line> <text align="left" length="15">Station:</text> #if ($ticket.getProperty("orderfrom")) <text>${ticket.getProperty("orderfrom")}</text> #else <text>${ticket.printHost()}</text> #end </line> </ticket> </output>
Press the Save button again. The new resource will be added to the list.
6. Now create a new Resource under the name Printer.KOT4_Change (Refer Step 5)
7. Copy-paste the below script on the scripts page and press the Save button
<?xml version="1.0" encoding="UTF-8"?> <!-- Posics Saleculator - Billing System. Copyright (C) 2009 Posics This file is part of Posics Saleculator. --> <output> <display> <line> <text align="left" length="10">Change Sent To KOT4</text> <text align="right" length="10">${ticket.printTotal()}</text> </line> <line> <text align="center" length="20">Thank you.</text> </line> </display> <ticket printer = "2"> <line size="1"> <text align="center" length="48" bold="true">KOT4 - Changed Items</text> </line> #if ($ticket.getProperty("KotNumber")) <line size="1"> <text align="center" length="48" bold="true">${ticket.printProperty("KotNumber")}</text> </line> #end <line></line> <line> <text align="left" length="15">Receipt:</text> <text>${ticket.printId()}</text> </line> <line> <text align="left" length="15">Date:</text> <text>${ticket.printDate()}</text> </line> #if ($ticket.getCustomer()) <line> <text align="left" length="15">Customer:</text> <text>${ticket.getCustomer().getName()}</text> </line> <line> <text align="left" length="15"></text> <text>${ticket.getCustomer().getSearchkey()}</text> </line> #end #if ($place) <line> <text align="left" length="15">Table:</text> <text>${place}</text> </line> #end #if ($ticket.getProperty("ReceiptNote")) <line> <text>${ticket.printProperty("ReceiptNote")}</text> </line> #end <line></line> <line> <text align="left" length="17">Item</text> <text align="right" length="5"></text> </line> <line> <text>------------------------------------------------</text> </line> #foreach ($ticketline in $ticket.getLines()) #if (($ticketline.getProperty("kotnum").equals("KOT4") && $ticketline.getProperty("sendstatus").equals("Cancel"))||($ticketline.getProperty("kotnum").equals("KOT3") && $ticketline.getProperty("sendstatus").equals("No"))) <line> #if ($ticketline.getProperty("sendstatus").equals("No")) <text align="left" length="7" bold="true">Add</text> #else <text align="left" length="7" bold="true">${ticketline.getProperty("sendstatus")}</text> #end <text align="left" length="5" bold="true">${ticketline.printMultiply()}x</text> #if ($ticketline.isProductCom()) <text align="left" length="34">--${ticketline.printName()}</text> #else <text align="left" length="36" bold="true">${ticketline.printName()}</text> #end </line> <!-- Add the following lines only for 2.30 Attributes --> #if ($ticketline.productAttSetInstId) <line> <text align="left" length="48"> ${ticketline.productAttSetInstDesc}</text> </line> #end <!-- Add the previous lines only for 2.30 Attributes --> #end #end <line> <text>------------------------------------------------</text> </line> <line> <text align="left" length="15">Waiter:</text> <text>${ticket.printUser()}</text> </line> <line> <text align="left" length="15">Station:</text> #if ($ticket.getProperty("orderfrom")) <text>${ticket.getProperty("orderfrom")}</text> #else <text>${ticket.printHost()}</text> #end </line> </ticket> </output>
8. Now, from the left side list click on the resource Script.SendOrder
9. Select all (CRTL+A) the scripts inside the scripts page under Script.SendOrder and delete everything so that the scripts page is completely empty.
10. Now copy-paste the below new scripts onto this empty scripts page under Script.SendOrder and click the Save button
// Posics Saleculator - Billing System. // Copyright (C) 2009 Posics // // This file is part of Posics Saleculator. // // Print an order ticket to the Kitchen boolean kot1 = false; boolean kot2 = false; boolean kot3 = false; boolean kot4 = false; boolean change_kot1 = false; boolean change_kot2 = false; boolean change_kot3 = false; boolean change_kot4 = false; //set KOT number if (ticket.getProperty("KotNumber") == null){ ticket.setProperty("KotNumber",ticket.getName()); } for(int i= 0; i < ticket.getLinesCount(); i++){ line = ticket.getLine(i); // Set Discount(kotnum=NULL) to N/A so it does not error on next section. if (line.getProperty("kotnum") == null){ line.setProperty("kotnum", "KOT1"); } if (line.getProperty("sendstatus") == null){ line.setProperty("sendstatus", "No"); } if((line.getProperty("kotnum").equals("KOT1")) && (line.getProperty("sendstatus").equals("No"))){ kot1 = true; //There is something to print to KOT1 }else if ((line.getProperty("kotnum").equals("KOT2")) && (line.getProperty("sendstatus").equals("No"))){ kot2 = true; //There is something to print to KOT2 }else if ((line.getProperty("kotnum").equals("KOT3")) && (line.getProperty("sendstatus").equals("No"))){ kot3 = true; //There is something to print to KOT3 }else if ((line.getProperty("kotnum").equals("KOT4")) && (line.getProperty("sendstatus").equals("No"))){ kot4 = true; //There is something to print to KOT4 }else if ((line.getProperty("kotnum").equals("KOT1")) && (line.getProperty("sendstatus").equals("Cancel"))){ change_kot1 = true; //There is something to change for KOT1 }else if ((line.getProperty("kotnum").equals("KOT2")) && (line.getProperty("sendstatus").equals("Cancel"))){ change_kot2 = true; //There is something to change for KOT2 }else if ((line.getProperty("kotnum").equals("KOT3")) && (line.getProperty("sendstatus").equals("Cancel"))){ change_kot3 = true; //There is something to change for KOT3 }else if ((line.getProperty("kotnum").equals("KOT4")) && (line.getProperty("sendstatus").equals("Cancel"))){ change_kot4 = true; //There is something to change for KOT4 } } if ((change_kot1 && kot1) || (change_kot1 && !kot1)) { sales.printTicket("Printer.KOT1_Change"); //Print changed kitchen items to KOT1 printer } if ((change_kot2 && kot2) || (change_kot2 && !kot2)) { sales.printTicket("Printer.KOT2_Change"); //Print changed dessert items to KOT2 printer } if ((change_kot3 && kot3) || (change_kot3 && !kot3)) { sales.printTicket("Printer.KOT3_Change"); //Print changed dessert items to KOT3 printer } if ((change_kot4 && kot4) || (change_kot4 && !kot4)) { sales.printTicket("Printer.KOT4_Change"); //Print changed dessert items to KOT4 printer } if (kot1 && !change_kot1) { sales.printTicket("Printer.KOT1"); //Print KOT1 items to KOT1 printer } if (kot2 && !change_kot2) { sales.printTicket("Printer.KOT2"); //Print KOT2 items to KOT2 printer } if (kot3 && !change_kot3) { sales.printTicket("Printer.KOT3"); //Print KOT3 items to KOT3 printer } if (kot4 && !change_kot4) { sales.printTicket("Printer.KOT4"); //Print KOT3 items to KOT4 printer } if (kot1 || kot2 || kot3 || kot4) { sales.printTicket("Printer.KOTALL"); } else if(change_kot1 || change_kot2 || change_kot3 || change_kot4) { sales.printTicket("Printer.KOTALL_Change"); } //Show a nice message for confirmation //if (kot1 && kot2 && kot3){ //javax.swing.JOptionPane.showMessageDialog(null, "Your order has been sent to KOT1, KOT2 & KOT3."); //} else if (kot1 && !kot2 && !kot3){ //javax.swing.JOptionPane.showMessageDialog(null, "Your order has been sent to the KOT1."); //} else if (!kot1 && kot2 && !kot3){ //javax.swing.JOptionPane.showMessageDialog(null, "Your order has been sent to the KOT2."); //} else if (!kot1 && !kot2 && kot3){ //javax.swing.JOptionPane.showMessageDialog(null, "Your order has been sent to the KOT3."); //} else if (kot1 && kot2 && !kot3){ //javax.swing.JOptionPane.showMessageDialog(null, "Your order has been sent to the KOT1 & KOT2."); //} else if (!kot1 && kot2 && kot3){ //javax.swing.JOptionPane.showMessageDialog(null, "Your order has been sent to the KOT2 & KOT3."); //} else if (kot1 && !kot2 && kot3){ //javax.swing.JOptionPane.showMessageDialog(null, "Your order has been sent to the KOT1 & KOT3."); //} else if (change_kot1 || change_kot2 || change_kot3){ //javax.swing.JOptionPane.showMessageDialog(null, "Your cancelled items have been sent."); //} else { //javax.swing.JOptionPane.showMessageDialog(null, "There is nothing new to send.", "Print Warning", JOptionPane.WARNING_MESSAGE); //} //Set kotnum property of item to Yes so it is not printed again for(int i = ticket.getLinesCount()-1; i>= 0 ; i--){ line = ticket.getLine(i); String a = line.getProperty("sendstatus"); String b = "Cancel"; if(( (line.getProperty("kotnum").equals("KOT1")) || (line.getProperty("kotnum").equals("KOT2")) || (line.getProperty("kotnum").equals("KOT3")) || (line.getProperty("kotnum").equals("KOT4")) ) && (line.getProperty("sendstatus").equals("No"))){ line.setProperty("sendstatus", "Yes"); } //Remove cancelled lines if (a.equals(b)) { ticket.removeLine(i); sales.keepLine(line); } }
11. Once the above steps are completed, you can proceed with setting the properties of the individual products to assign them under KOT4, Click here to learn how to set the product’s properties.
12. Now you can proceed with the billing process and send the products to KOT4
Leave a Reply