<?xml version="1.0" encoding="UTF-8"?>
<!-- 
    uniCenta oPOS - Touch friendly Point Of Sale
    Copyright (c) 2009-2018 uniCenta.
    https://unicenta.com

    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><text align="center" length="42">You can change Printer.Inventory template</text></line>
        <line><text align="center" length="42">in the Resources panel</text></line>
        <line></line>
        <line><text align="center" bold="true" length="42">Inventory Record</text></line>
        <line>
            <text align ="left" bold="true" length="12">Date : </text>
	<text align ="left" length="30">${inventoryrecord.printDate()}</text></line>
        <line><text  align ="left" bold="true" length="12">Reason : </text>
	<text align ="left" length="30">${inventoryrecord.printReason()}</text></line>
        <line><text  align ="left" bold="true" length="12">User : </text>
	<text align ="left" length="30">${inventoryrecord.printUser()}</text></line>
        <line><text  align ="left" bold="true" length="12">Location : </text>
	<text align ="left" length="30">${inventoryrecord.printLocation()}</text></line>
        <line><text  align ="left" bold="true" length="12">Supplier : </text> 
	<text align ="left" length="30">${inventoryrecord.printSupplier()}</text></line>
        <line><text align ="left" bold="true" length="12">Document : </text>
	<text align ="left" length="30">${inventoryrecord.printSupplierDoc()}</text></line>

        <line size="1">
            #if ($inventoryrecord.isInput())
                <text align ="center" bold="true" length="42">In</text>
            #else
                <text align ="center" bold="true" length="42">Out</text>
            #end
        </line>
        <line></line>    
        <line>
            <text align ="left" bold="true" length="17">Item</text>
            <text align ="right" bold="true" length="10">Price</text>
            <text align ="right" bold="true" length="5">Qty</text>
            <text align ="right" bold="true" length="10">Value</text>
        </line>      
        <line>
            <text>------------------------------------------</text>
        </line>   
        #foreach ($inventoryline in $inventoryrecord.getLines())
            <line>
                <text align ="left" length="17">${inventoryline.printName()}</text>
                <text align ="right" length="10">${inventoryline.printPrice()}</text>
                <text align ="right" length="5">x${inventoryline.printMultiply()}</text>
                <text align ="right" length="10">${inventoryline.printSubValue()}</text>
            </line> 
            #if ($inventoryline.productAttSetInstId)
                <line><text align ="left" length="42">${inventoryline.productAttSetInstDesc}</text></line>
            #end
        #end
        <line><text>------------------------------------------</text></line>   
        <line></line>
        <line>
            <text align ="left" bold="true" length="27">Totals :</text>
            <text align ="right" bold="true" length="5">${inventoryrecord.printTotalArticles()}</text>
            <text align ="right" bold="true" length="10">${inventoryrecord.printSubTotal()}</text>
        </line>
        <line></line>            
        <line><text align="center" length="42">Please keep this ticket</text></line>   
    </ticket>
</output>