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

    <!-- default: cash (0);
    alternativ: debit (1), credit (2) -->
    #set ($payedby = "0")
    #foreach ($paymentline in $ticket.payments)
               #if ($paymentline.name == "magcard")
            #set ($payedby = "1")
        #end
    #end

<output>
    <ticket>
     +<!-- optional: <ticket printer="2"> -->
        <line>
            <text>{"receipt":[{"customerText": "${ticket.printId()}","payedBy": "${payedby}","items":[
            #set( $anzahl = $ticket.getLines().size() )</text>
            #foreach ($ticketline in $ticket.getLines())
            <text>{ "count": "</text>
            <text>${ticketline.printMultiply()}</text>
            <text>",</text>
            <text>"name": "</text>
            <!-- <text>${velocityCount}  von  ${anzahl}</text> -->
            <text>${ticketline.printName()}</text>
            <text>",</text>
            <text>"gross": "</text>
            <text>${ticketline.getPriceTax()}</text>
            <text>", </text>
            <text>"tax": "</text>
            #set ($steuersatz = 100 * $ticketline.getTaxInfo().getRate())
            <text>${steuersatz}</text>
            <text>" }</text>
            #if( $velocityCount < $anzahl )
            <text>,</text>
            #end
        #end
        <text>]}]}</text>
        </line>
        <cut/>
</ticket>
</output>



Created: 09/04/2017
Visits: 110
Online: 0