<?xml version="1.0" encoding="UTF-8"?>
<!-- 
    uniCenta oPOS - Touch friendly Point Of Sale
    Copyright (c) 2009-2018 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>
    <ticket>
        <image>Printer.Ticket.Logo</image>
        <line></line>
        <line></line>
        <line size="1">
            <text align ="center" length="42" bold="true">Partial Cash Report</text>
        </line>
        <line></line>
        <line>
            <text bold="true">Sales report</text>
        </line>
        <line>
            <text align ="left" length="12">Name</text>
            <text align ="right" length="14">Price+Tax</text>
            <text align ="right" length="1"></text>
            <text align ="right" length="5">Unit</text>
            <text align ="right" length="10">Total</text>
        </line>
        <line>
            <text>------------------------------------------</text>
        </line>
        #foreach ($line in $payments.getProductSalesLines())
        <line>
            <text align ="left" length="12">${line.printProductName()}</text>
            <text align ="right" length="10">${line.printProductPriceTax()}</text>
            <text align ="right" length="5">${line.printTaxRate()}</text>
            <text align ="right" length="5">${line.printProductUnits()}</text>
            <text align ="right" length="10">${line.printProductSubValue()}</text>
        </line>
        #end
        <line>
            <text>------------------------------------------</text>
        </line>
        <line>
            <text align ="left" length="32">Ticket rows:</text>
            <text align ="right" length="10">${payments.printProductSalesRows()}</text>
        </line>
        <line></line>
        <line size="1">
            <text align ="left" length="22" bold="true">Total</text>
            <text align ="right" length="10" bold="true">${payments.printProductSalesTotalUnits()}</text>
            <text align ="right" length="10" bold="true">${payments.printProductSalesTotal()}</text>
        </line>
        <line></line>
        <line>
            <text bold="true">Payments Report</text>
        </line>
        <line>
            <text align ="right" length="42">Total</text>
        </line>
        <line>
            <text>------------------------------------------</text>
        </line> 
        #foreach ($line in $payments.getPaymentLines())
        <line>
            <text align ="left" length="32">${line.printType()}</text>
            <text align ="right" length="10">${line.printValue()}</text>
        </line> 
        #end
        <line>
            <text>------------------------------------------</text>
        </line> 
        <line>
            <text align ="left" length="32">Payments:</text>
            <text align ="right" length="10">${payments.printPayments()}</text>
        </line>
        <line></line>
        <line size="1">
            <text align ="left" length="32" bold="true">Total</text>
            <text align ="right" length="10" bold="true">${payments.printPaymentsTotal()}</text>
        </line>
        <line></line>
        <line>
            <text bold="true">Taxes Report</text>
        </line>
        <line>
            <text align ="right" length="42">Total</text>
        </line>
        <line>
            <text>------------------------------------------</text>
        </line>
        #foreach ($line in $payments.getSaleLines())
        <line>
            <text align ="left" length="32">${line.printTaxName()}</text>
            <text align ="right" length="10">${line.printTaxes()}</text>
        </line> 
        #end        
        <line>
            <text>------------------------------------------</text>
        </line>
<!-- JG 9 Nov 12 for Categories -->
        <line></line>
        <line>
            <text bold="true">Product Category Sales</text>
        </line>
        <line>
            <text align ="left" length="22">Name</text>
            <text align ="right" length="10">Qty</text>
            <text align ="right" length="10">Total</text>
        </line>
        <line>
            <text>------------------------------------------</text>
        </line>
        #foreach ($line in $payments.getCategorySalesLines())
        <line>
            <text align ="left" length="22">${line.printCategoryName()}</text>
            <text align ="right" length="10">${line.printCategoryUnits()}</text>
            <text align ="right" length="10">${line.printCategorySum()}</text>
        </line>
        #end
        <line>
            <text>------------------------------------------</text>
        </line>
        <line>
            <text align ="left" length="22">Ticket Lines:</text>
            <text align ="right" length="10">${payments.printCategorySalesRows()}</text>
        </line>
        <line></line>
        <line size="1">
            <text align ="left" length="22" bold="true">Total</text>
            <text align ="right" length="10" bold="true">${payments.printCategorySalesTotalUnits()}</text>
            <text align ="right" length="10" bold="true">${payments.printCategorySalesTotal()}</text>
        </line>
        <line>
            <text>------------------------------------------</text>
        </line>
        <line></line>
<!-- end -->
        <line>
            <text align ="left" length="32">Receipts:</text>
            <text align ="right" length="10">${payments.printSales()}</text>
        </line>
        <line></line>
        <line size="1">
            <text align ="left" length="32" bold="true">Subtotal</text>
            <text align ="right" length="10" bold="true">${payments.printSalesBase()}</text>
        </line>
        <line size="1">
            <text align ="left" length="32" bold="true">Taxes</text>
            <text align ="right" length="10" bold="true">${payments.printSalesTaxes()}</text>
        </line>
        <line size="1">
            <text align ="left" length="32" bold="true">Total</text>
            <text align ="right" length="10" bold="true">${payments.printSalesTotal()}</text>
        </line>        
        <line></line>
        <line>
            <text length="18">Machine:</text>
            <text>${payments.printHost()}</text>
        </line>    
        <line>
            <text length="18">Sequence:</text>
            <text>${payments.printSequence()}</text>
        </line> 
        <line>
            <text length="18">Start Date:</text>
            <text>${payments.printDateStart()}</text>
        </line>  
        <line>
            <text length="18">End Date:</text>
            <text>${payments.printDateEnd()}</text>
        </line>  
    </ticket>
</output>
