<?xml version="1.0" encoding="UTF-8"?>
<!--
Posics Saleculator - Billing System.
Copyright (C) 2009 Posics
This file is part of Posics Saleculator.
-->
<output>
<sql><![CDATA[
SELECT CLOSEDCASH.MONEY AS ID, CLOSEDCASH.HOST, CLOSEDCASH.HOSTSEQUENCE, CLOSEDCASH.DATESTART, CLOSEDCASH.DATEEND, SUM(PAYMENTS.TOTAL) AS TOTAL
FROM CLOSEDCASH LEFT JOIN RECEIPTS ON RECEIPTS.MONEY = CLOSEDCASH.MONEY LEFT JOIN PAYMENTS ON PAYMENTS.RECEIPT = RECEIPTS.ID
WHERE CLOSEDCASH.DATEEND IS NOT NULL AND CLOSEDCASH.DATESTART >= $startDate AND CLOSEDCASH.DATESTART <= $endDate
GROUP BY CLOSEDCASH.MONEY, CLOSEDCASH.HOST, CLOSEDCASH.HOSTSEQUENCE, CLOSEDCASH.DATESTART, CLOSEDCASH.DATEEND ORDER BY CLOSEDCASH.HOSTSEQUENCE DESC
]]></sql>
<ticket>
<image>Printer.Ticket.Logo</image>
<line></line>
<line size="1">
<text align ="center" length="48" bold="true">Cash Closed</text>
</line>
<line></line>
<line>
<text length="12">Start Date:</text>
<text length="36">$startDate</text>
</line>
<line>
<text length="12">End Date:</text>
<text length="36">$endDate</text>
</line>
<line>
</line>
<line>
<text align ="left" length="15">Host</text>
<text align ="left" length="10">Sequence</text>
<text align ="right" length="23">Total</text>
</line>
<line>
<text>------------------------------------------------</text>
</line>
#foreach ($line in $posreport.getResult())
<line>
<text align ="left" length="15">${line.printValue(1)}</text>
<text align ="left" length="10">${line.printValue(2)}</text>
<text align ="right" length="23">${line.printCurrency(5)}</text>
</line>
<line>
<text>${line.printDate(3)} TO ${line.printDate(4)}</text>
</line>
#end
<line>
<text>------------------------------------------------</text>
</line>
<line>
<text align ="left" length="15">Total</text>
<text align ="left" length="10"></text>
<text align ="right" bold="true" length="23">$posreport.printTotal(5)</text>
</line>
</ticket>
</output>
Leave a Reply