Unicenta oPOS A4 Template -
Decided to make my own template which supports a4 printing, if ifs any good copy and paste :)
<?xml version="1.0" encoding="UTF-8"?>
<!--
uniCenta oPOS - Touch friendly Point Of Sale
Copyright (c) 2009-2012 uniCenta.
http://sourceforge.net/projects/unicentaopos
This file is part of uniCenta oPOS.
uniCenta oPOS is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
uniCenta oPOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
-->
<output>
<display>
<line>
<text align="left" length="10">Total</text>
<text align="right" length="10">${ticket.printTotal()}</text>
</line>
<line>
<text align="center" length="20">Thank you for your custom</text>
</line>
</display>
<ticket>
<image>Printer.Ticket.Logo</image>
<line></line>
<line>
<text align="center" length="106"></text>
</line>
<line>
<text align="center" length="106"></text>
</line>
<line>
<text align="center" length="106"></text>
</line>
<line>
<text align="center" length="106"></text>
</line>
<line>
<text align="center" length="106"></text>
</line>
<line>
<text align="center" length="106"></text>
</line>
<line></line>
#if (${ticket.ticketType} == 0)
<line>
<text align="left" length="15">Receipt:</text>
<text>${ticket.printId()}</text>
</line>
#end
#if (${ticket.ticketType} == 1)
<line>
<text align="left" length="15">Refund:</text>
<text>${ticket.printId()}</text>
</line>
#end
<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().printName()}</text>
</line>
<line>
<text align="left" length="15">Account #:</text>
<text>${ticket.getCustomer().printTaxid()}</text>
</line>
<line>
<text align="left" length="15">Current Debt:</text>
<text>${ticket.getCustomer().printCurDebt()}</text>
</line>
#end
#if (${tickettext.place} != ${place})
<line>
<text align="left" length="15">Table:</text>
<text>${place}</text>
</line>
#end
<line>
<text align="left" length="15">Served by:</text>
<text>${ticket.printUser()}</text>
</line>
<line></line>
<line>
<text align ="left" length="30">Item</text>
<text align ="right" length="68">Price</text>
<text align ="right" length="7">Qty</text>
<text align ="right" length="10">Value</text>
</line>
<line>
<text>-------------------------------------------------------------------------------------------------------------------</text>
</line>
#foreach ($ticketline in $ticket.getLines())
<line>
#if ($ticketline.isProductCom())
<text align ="left" length="17">*${ticketline.printName()}</text>
#else
<text align ="left" length="17">${ticketline.printName()}</text>
#end
<text align ="right" length="78">${ticketline.printPriceTax()}</text>
<text align ="right" length="7">x${ticketline.printMultiply()}</text>
<text align ="right" length="10">${ticketline.printValue()}</text>
</line>
#if ($ticketline.productAttSetInstId)
<line>
<text align ="left" length="42">${ticketline.productAttSetInstDesc}</text>
</line>
#end
#end
<line>
<text>-------------------------------------------------------------------------------------------------------------------</text>
</line>
<line></line>
<line></line>
<line>
<text>Items count: </text>
<text align ="left" length="14">${ticket.printArticlesCount()}</text>
</line>
<line></line>
<line size="1">
<text align ="left" length="16" bold="true">Total</text>
<text align ="right" length="26" bold="true">${ticket.printTotal()}</text>
</line>
#foreach ($paymentline in $ticket.payments)
#if ($paymentline.name == "cash")
<line>
<text bold="true">Cash</text>
</line>
<line>
<text align="left" length="22">Tendered:</text>
<text align ="right" length="20">${paymentline.printPaid()}</text>
</line>
<line>
<text align="left" length="22">Change:</text>
<text align ="right" length="20">${paymentline.printChange()}</text>
</line>
#end
#if ($paymentline.name == "cashrefund")
<line>
<text bold="true">Refund</text>
</line>
<line>
<text align ="right" length="42">${paymentline.printTotal()}</text>
</line>
#end
#if ($paymentline.name == "magcard")
<line>
<text bold="true">Card</text>
</line>
<line>
<text align ="right" length="42">${paymentline.printTotal()}</text>
</line>
<line>
<text align ="left" length="22">Card Number:</text>
<text>${paymentline.printCardNumber()}</text>
</line>
<line>
<text align ="left" length="22">Expiration Date:</text>
<text>${paymentline.printExpirationDate()}</text>
</line>
<line>
<text align ="left" length="22">Operation:</text>
<text>${paymentline.printTransactionID()}</text>
</line>
<line>
<text align ="left" length="22">Authorisation:</text>
<text>${paymentline.printAuthorization()}</text>
</line>
#end
#if ($paymentline.name == "magcardrefund")
<line>
<text bold="true">Card Refund</text>
</line>
<line>
<text align ="right" length="42">${paymentline.printTotal()}</text>
</line>
#end
#if ($paymentline.name == "cheque")
<line></line>
<line>
<text bold="true">Cheque</text>
</line>
<line>
<text align ="right" length="42">${paymentline.printTotal()}</text>
</line>
#end
#if ($paymentline.name == "chequerefund")
<line></line>
<line>
<text bold="true">Cheque Refund</text>
</line>
<line>
<text align ="right" length="42">${paymentline.printTotal()}</text>
</line>
#end
#if ($paymentline.name == "paperin")
<line></line>
<line>
<text bold="true">Note</text>
</line>
<line>
<text align ="right" length="42">${paymentline.printTotal()}</text>
</line>
#end
#if ($paymentline.name == "paperout")
<line></line>
<line>
<text bold="true">Note Refund</text>
</line>
<line>
<text align ="right" length="42">${paymentline.printTotal()}</text>
</line>
#end
#if ($paymentline.name == "free")
<line></line>
<line>
<text bold="true">Free</text>
</line>
<line>
<text align ="right" length="42">${paymentline.printTotal()}</text>
</line>
#end
#if ($paymentline.name == "debt")
<line></line>
<line>
<text bold="true">On Account</text>
</line>
<line>
<text align ="right" length="42">${paymentline.printTotal()}</text>
</line>
#end
#end
<line></line>
<line>
<text align ="left" bold="true" length="16">Nett of Tax:</text>
<text align ="right" length="26">${ticket.printSubTotal()}</text>
</line>
<line>
<text align ="left" length="16">Taxes:</text>
<text align ="right" length="26">${ticket.printTax()}</text>
</line>
#foreach ($taxinfo in $taxes)
#set( $taxline = $ticket.getTaxLine($taxinfo))
<line>
<text align ="left" length="18">${taxline.getTaxInfo()}</text>
<text align ="right" length="12">${taxline.printSubTotal()}</text>
<text align ="right" length="12">${taxline.printTax()}</text>
</line>
#end
<line></line>
<line>
<text align="center" length="42">Thank you for your custom</text>
</line>
<line>
<text align="center" length="42">VAT No : </text>
</line>
</ticket>
#foreach ($paymentline in $ticket.payments)
#if ($paymentline.name == "cash")
<opendrawer/>
#end
#if ($paymentline.name == "cashrefund")
<opendrawer/>
#end
#end
</output>
<?xml version="1.0" encoding="UTF-8"?>
<!--
uniCenta oPOS - Touch friendly Point Of Sale
Copyright (c) 2009-2012 uniCenta.
http://sourceforge.net/projects/unicentaopos
This file is part of uniCenta oPOS.
uniCenta oPOS is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
uniCenta oPOS is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
-->
<output>
<display>
<line>
<text align="left" length="10">Total</text>
<text align="right" length="10">${ticket.printTotal()}</text>
</line>
<line>
<text align="center" length="20">Thank you for your custom</text>
</line>
</display>
<ticket>
<image>Printer.Ticket.Logo</image>
<line></line>
<line>
<text align="center" length="106"></text>
</line>
<line>
<text align="center" length="106"></text>
</line>
<line>
<text align="center" length="106"></text>
</line>
<line>
<text align="center" length="106"></text>
</line>
<line>
<text align="center" length="106"></text>
</line>
<line>
<text align="center" length="106"></text>
</line>
<line></line>
#if (${ticket.ticketType} == 0)
<line>
<text align="left" length="15">Receipt:</text>
<text>${ticket.printId()}</text>
</line>
#end
#if (${ticket.ticketType} == 1)
<line>
<text align="left" length="15">Refund:</text>
<text>${ticket.printId()}</text>
</line>
#end
<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().printName()}</text>
</line>
<line>
<text align="left" length="15">Account #:</text>
<text>${ticket.getCustomer().printTaxid()}</text>
</line>
<line>
<text align="left" length="15">Current Debt:</text>
<text>${ticket.getCustomer().printCurDebt()}</text>
</line>
#end
#if (${tickettext.place} != ${place})
<line>
<text align="left" length="15">Table:</text>
<text>${place}</text>
</line>
#end
<line>
<text align="left" length="15">Served by:</text>
<text>${ticket.printUser()}</text>
</line>
<line></line>
<line>
<text align ="left" length="30">Item</text>
<text align ="right" length="68">Price</text>
<text align ="right" length="7">Qty</text>
<text align ="right" length="10">Value</text>
</line>
<line>
<text>-------------------------------------------------------------------------------------------------------------------</text>
</line>
#foreach ($ticketline in $ticket.getLines())
<line>
#if ($ticketline.isProductCom())
<text align ="left" length="17">*${ticketline.printName()}</text>
#else
<text align ="left" length="17">${ticketline.printName()}</text>
#end
<text align ="right" length="78">${ticketline.printPriceTax()}</text>
<text align ="right" length="7">x${ticketline.printMultiply()}</text>
<text align ="right" length="10">${ticketline.printValue()}</text>
</line>
#if ($ticketline.productAttSetInstId)
<line>
<text align ="left" length="42">${ticketline.productAttSetInstDesc}</text>
</line>
#end
#end
<line>
<text>-------------------------------------------------------------------------------------------------------------------</text>
</line>
<line></line>
<line></line>
<line>
<text>Items count: </text>
<text align ="left" length="14">${ticket.printArticlesCount()}</text>
</line>
<line></line>
<line size="1">
<text align ="left" length="16" bold="true">Total</text>
<text align ="right" length="26" bold="true">${ticket.printTotal()}</text>
</line>
#foreach ($paymentline in $ticket.payments)
#if ($paymentline.name == "cash")
<line>
<text bold="true">Cash</text>
</line>
<line>
<text align="left" length="22">Tendered:</text>
<text align ="right" length="20">${paymentline.printPaid()}</text>
</line>
<line>
<text align="left" length="22">Change:</text>
<text align ="right" length="20">${paymentline.printChange()}</text>
</line>
#end
#if ($paymentline.name == "cashrefund")
<line>
<text bold="true">Refund</text>
</line>
<line>
<text align ="right" length="42">${paymentline.printTotal()}</text>
</line>
#end
#if ($paymentline.name == "magcard")
<line>
<text bold="true">Card</text>
</line>
<line>
<text align ="right" length="42">${paymentline.printTotal()}</text>
</line>
<line>
<text align ="left" length="22">Card Number:</text>
<text>${paymentline.printCardNumber()}</text>
</line>
<line>
<text align ="left" length="22">Expiration Date:</text>
<text>${paymentline.printExpirationDate()}</text>
</line>
<line>
<text align ="left" length="22">Operation:</text>
<text>${paymentline.printTransactionID()}</text>
</line>
<line>
<text align ="left" length="22">Authorisation:</text>
<text>${paymentline.printAuthorization()}</text>
</line>
#end
#if ($paymentline.name == "magcardrefund")
<line>
<text bold="true">Card Refund</text>
</line>
<line>
<text align ="right" length="42">${paymentline.printTotal()}</text>
</line>
#end
#if ($paymentline.name == "cheque")
<line></line>
<line>
<text bold="true">Cheque</text>
</line>
<line>
<text align ="right" length="42">${paymentline.printTotal()}</text>
</line>
#end
#if ($paymentline.name == "chequerefund")
<line></line>
<line>
<text bold="true">Cheque Refund</text>
</line>
<line>
<text align ="right" length="42">${paymentline.printTotal()}</text>
</line>
#end
#if ($paymentline.name == "paperin")
<line></line>
<line>
<text bold="true">Note</text>
</line>
<line>
<text align ="right" length="42">${paymentline.printTotal()}</text>
</line>
#end
#if ($paymentline.name == "paperout")
<line></line>
<line>
<text bold="true">Note Refund</text>
</line>
<line>
<text align ="right" length="42">${paymentline.printTotal()}</text>
</line>
#end
#if ($paymentline.name == "free")
<line></line>
<line>
<text bold="true">Free</text>
</line>
<line>
<text align ="right" length="42">${paymentline.printTotal()}</text>
</line>
#end
#if ($paymentline.name == "debt")
<line></line>
<line>
<text bold="true">On Account</text>
</line>
<line>
<text align ="right" length="42">${paymentline.printTotal()}</text>
</line>
#end
#end
<line></line>
<line>
<text align ="left" bold="true" length="16">Nett of Tax:</text>
<text align ="right" length="26">${ticket.printSubTotal()}</text>
</line>
<line>
<text align ="left" length="16">Taxes:</text>
<text align ="right" length="26">${ticket.printTax()}</text>
</line>
#foreach ($taxinfo in $taxes)
#set( $taxline = $ticket.getTaxLine($taxinfo))
<line>
<text align ="left" length="18">${taxline.getTaxInfo()}</text>
<text align ="right" length="12">${taxline.printSubTotal()}</text>
<text align ="right" length="12">${taxline.printTax()}</text>
</line>
#end
<line></line>
<line>
<text align="center" length="42">Thank you for your custom</text>
</line>
<line>
<text align="center" length="42">VAT No : </text>
</line>
</ticket>
#foreach ($paymentline in $ticket.payments)
#if ($paymentline.name == "cash")
<opendrawer/>
#end
#if ($paymentline.name == "cashrefund")
<opendrawer/>
#end
#end
</output>
THANKS
ReplyDeleteHi. I am playing around with Unicenta on a mac.
ReplyDelete1. I have created a new item in the resources section call Printer.TicketA4. I cannot paste into it. (is the file available externally)
2. Once I have the file created where do I reference the new layout?
Cheer
Steve Warby
Hi, Clasic12
DeleteYou need rename de original template ticket to Printer.Ticket_ori; and then you can create a new resource named Printer.Ticket with the new code from here (this blog).
a hug!!!