<?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 RECEIPTS.DATENEW, TICKETS.TICKETID, PAYMENTS.PAYMENT, PAYMENTS.TOTAL, ACCOUNTHEADS.NAME, PAYMENTS.NOTES
FROM PAYMENTS
JOIN RECEIPTS ON PAYMENTS.RECEIPT = RECEIPTS.ID
LEFT JOIN TICKETS ON TICKETS.ID=RECEIPTS.ID
JOIN ACCOUNTHEADS ON ACCOUNTHEADS.ID = RECEIPTS.ACCOUNTHEAD
WHERE RECEIPTS.DATENEW >= $startDate AND RECEIPTS.DATENEW <= $endDate
ORDER BY RECEIPTS.DATENEW
]]></sql>
<ticket>
<image>Printer.Ticket.Logo</image>
<line></line>
<line size="1">
<text align ="center" length="48" bold="true">Payments</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="20">Date</text>
<text align ="left" length="10">Receipt</text>
<text align ="left" length="8">Type</text>
<text align ="right" length="10">Total</text>
</line>
<line>
<text>------------------------------------------------</text>
</line>
#foreach ($line in $posreport.getResult())
<line>
<text align ="left" length="20">${line.printDate(0)}</text>
<text align ="left" length="10">${line.printValue(1)}</text>
<text align ="left" length="8">${line.printValue(2)}</text>
<text align ="right" length="10">${line.printCurrency(3)}</text>
</line>
#if(!$line.printValue(5).equals(""))
<line>
<text>${line.printValue(4)} - ${line.printValue(5)}</text>
</line>
#end
#end
<line>
<text>------------------------------------------------</text>
</line>
<line>
<text align ="left" length="20">Total</text>
<text align ="left" length="10"></text>
<text align ="left" length="8"></text>
<text align ="right" bold="true" length="10">$posreport.printTotal(3)</text>
</line>
</ticket>
</output>
Leave a Reply