<?xml version="1.0" encoding="UTF-8"?>

<!-- 
   Chromis POS - The New Face of Open Source POS 
   Copyright (c) (c) 2015-2016Chromis , previous uniCenta & Openbravo POS works   

   This file is part of chromis oPOS

   Chromis POS 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.

   Chromis POS 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 Chromis POS.  If not, see <http://www.gnu.org/licenses/>.
-->


<output>
  <ticket>
    <image>Printer.Ticket.Logo</image>
    #String ${str}
        <line></line>
        <line></line>
        <line size="1">
            <text align ="center" bold="true" length="42">Kassenabschlussbericht</text>
        </line>
		<line></line>
        <line>
            <text length="18">Terminal:</text>
            <text>${payments.printHost()}</text>
            #${str} = ${payments.printHost()}
        </line>
        <line>
            <text length="18">Nummer:</text>
            <text>${payments.printSequence()}</text>
        </line>
        <line>
            <text length="18">Start Datum:</text>
            <text>${payments.printDateStart()}</text>
        </line>
        <line>
            <text length="18">End Datum:</text>
            <text>${payments.printDateEnd()}</text>
        </line>
        <line><text>${str}</text></line>
        <line>
           <text align ="left" bold="true" length="32">Zahlungsbericht</text>
           <text align ="right" bold="true" length="10">Betrag</text>
        </line>
        <line><text>------------------------------------------</text></line>
        #foreach ($line in $payments.getPaymentLines())
        <line>
            <text align ="left" length="32">${line.printType()} ${line.printReason()}</text>
            <text align ="right" length="10">${line.printValue()}</text>
        </line>
        #end
        <line><text>------------------------------------------</text></line>
        <line>
            <text align ="left" length="32" bold="true">Summe Verkauf</text>
            <text align ="right" length="10" bold="true">${payments.printPaymentsTotal()}</text>
        </line>
        <line>
            <text align ="left" length="22">Anzahl Zahlungen:</text>
            <text align ="right" length="10">${payments.printPayments()}</text>
        </line>
        <line></line>
        <line>
            <text align ="left" bold="true" length="32">Steuerauswertung</text>
            <text align ="right" bold="true" length="10">Betrag</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>
        <line>
            <text align ="left" length="32">Quittungen:</text>
            <text align ="right" length="10">${payments.printSales()}</text>
        </line>
        <line></line>
        <line>
            <text align ="left" length="32" bold="true">Summe netto</text>
            <text align ="right" length="10" bold="true">${payments.printSalesBase()}</text>
        </line>
        <line>
            <text align ="left" length="32" bold="true">Mwst</text>
            <text align ="right" length="10" bold="true">${payments.printSalesTaxes()}</text>
        </line>
        <line>
            <text align ="left" length="32" bold="true">Summe</text>
            <text align ="right" length="10" bold="true">${payments.printSalesTotal()}</text>
        </line>
        <line><text>------------------------------------------</text></line>
		<line></line>
		<line>
			<text align ="left" bold="true" length="32">Bargeldabrechnung</text>
			<text align ="right" bold="true" length="10">Betrag</text>
		</line>
        <line><text>------------------------------------------</text></line>
		<line>
			<text align ="left" length="32" bold="true">Anfangsbestand</text>
			<text align ="right" length="10" bold="true">${payments.printMoneyStart()}</text>
		</line>
		<line>
			<text align ="left" length="32" bold="true">Bareinnahmen</text>
			<text align ="right" length="10" bold="true">${payments.printPaymentsCash()}</text>
		</line>
		<line>
			<text align ="left" length="32" bold="true">Endbestand</text>
			<text align ="right" length="10" bold="true">${payments.printMoneyEnd()}</text>
		</line>
		<line></line>
		<line><text align="left" length="32">Zählung</text></line>
		<line>
			<text align="right" length="13">Geld</text>
			<text align="right" length="13">Anzahl</text>
			<text align="right" length="13">Wert</text>
		</line>
        <line><text>------------------------------------------</text></line>
        #foreach ($line in $payments.getCashCountLines())
        <line>
            <text align ="right" length="13">${line.printValue()}</text>
            <text align ="right" length="13">${line.printCount()}</text>
            <text align ="right" length="13">${line.printCountedValue()}</text>
        </line>
        #end
        <line><text>------------------------------------------</text></line>
		<line>
			<text align ="right" length="26"></text>
			<text align ="right" bold="true" length="13">${payments.printMoneyCash()}</text>
		</line>
		<line>
			<text align ="left" bold="true" length="32">Differenz</text>
			<text align ="right" bold="true" length="10">${payments.printMoneyDifference()}</text>
		</line>
        <line></line>
        <line>
            <text length="22">Stündliche Verkäufe:</text>
        </line>
        <line><text>------------------------------------------</text></line>
        #foreach ($line in $hourlysales)
        <line>            
            <text align ="left" length="12">${line.getHourStr()}  </text>
            <text>Verkäufe: ${line.getSales()}</text>
            <text align ="right" length="20"> Wert: ${line.getHourTotal()}</text>
        </line>
        #end
        <line><text>------------------------------------------</text></line>        
    </ticket>
</output>

