<?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 PRODUCTS.NAME, PRODUCTS.CODE, SUM(STOCKCURRENT.UNITS) AS UNITS, (PRODUCTS.PRICEBUY*SUM(STOCKCURRENT.UNITS)) AS COST
FROM STOCKCURRENT JOIN PRODUCTS ON STOCKCURRENT.PRODUCT = PRODUCTS.ID GROUP BY PRODUCTS.ID, PRODUCTS.NAME, PRODUCTS.CODE, PRODUCTS.PRICEBUY ORDER BY PRODUCTS.NAME
]]></sql>
<ticket>
<image>Printer.Ticket.Logo</image>
<line></line>
<line size="1">
<text align ="center" length="48" bold="true">Current Inventory</text>
</line>
<line></line>
<line>
<text>Date: $posreport.printDate()</text>
</line>
<line>
</line>
<line>
<text align ="left" length="20">Product</text>
<text align ="right" length="10">Units</text>
<text align ="right" length="18">Value</text>
</line>
<line>
<text>------------------------------------------------</text>
</line>
#foreach ($line in $posreport.getResult())
<line>
<text align ="left" length="20">${line.printValue(0)} (${line.printValue(1)})</text>
<text align ="right" length="10">${line.printValue(2)}</text>
<text align ="right" length="18">${line.printCurrency(3)}</text>
</line>
#end
<line>
<text>------------------------------------------------</text>
</line>
<line>
<text align ="left" length="30">${posreport.printCount()} Products</text>
<text align ="right" bold="true" length="18">$posreport.printTotal(3)</text>
</line>
</ticket>
</output>
Leave a Reply