<?xml version="1.0" encoding="UTF-8"  ?>
<!-- Created with iReport - A designer for JasperReports -->
<!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">
<jasperReport
		 name="bill"

		 language="groovy"		 columnCount="1"
		 printOrder="Vertical"
		 orientation="Portrait"
		 pageWidth="303"
		 pageHeight="792"
		 columnWidth="267"
		 columnSpacing="0"
		 leftMargin="18"
		 rightMargin="18"
		 topMargin="18"
		 bottomMargin="18"
		 whenNoDataType="AllSectionsNoDetail"
		 isTitleNewPage="false"
		 isSummaryNewPage="false"
		 isIgnorePagination="true">
	<property name="ireport.scriptlethandling" value="0" />
	<property name="ireport.encoding" value="UTF-8" />
	<import value="java.util.*" />
	<import value="net.sf.jasperreports.engine.*" />
	<import value="net.sf.jasperreports.engine.data.*" />

	<parameter name="PARENTLGUFORMALNAME" isForPrompting="false" class="java.lang.String"/>
	<parameter name="LGUFORMALNAME" isForPrompting="false" class="java.lang.String"/>
	<parameter name="PRINTEDBY" isForPrompting="false" class="java.lang.String"/>
	<parameter name="PRINTDATE" isForPrompting="false" class="java.util.Date"/>
	<parameter name="TREASURERNAME" isForPrompting="false" class="java.lang.String"/>
	<parameter name="TREASURERTITLE" isForPrompting="false" class="java.lang.String"/>
	<parameter name="Items" isForPrompting="false" class="java.lang.Object"/>

	<field name="txncode" class="java.lang.String"/>
	<field name="txndate" class="java.util.Date"/>
	<field name="expirydate" class="java.util.Date"/>
	<field name="amount" class="java.lang.Number"/>
	<field name="paidby" class="java.lang.String"/>
	<field name="paidbyaddress" class="java.lang.String"/>
	<field name="particulars" class="java.lang.String"/>
	<field name="items" class="java.lang.Object"/>
	<field name="state" class="java.lang.String"/>
	<field name="receiptid" class="java.lang.String"/>
	<field name="receiptno" class="java.lang.String"/>
	<field name="receiptdate" class="java.util.Date"/>
	<field name="receipttype" class="java.lang.String"/>


		<group  name="payment" >
			<groupExpression><![CDATA[]]></groupExpression>
			<groupHeader>
			<band height="0"  isSplitAllowed="true" >
			</band>
			</groupHeader>
			<groupFooter>
			<band height="45"  isSplitAllowed="true" >
				<printWhenExpression><![CDATA[($F{receiptid} ? true : false)]]></printWhenExpression>
				<staticText>
					<reportElement
						x="0"
						y="0"
						width="73"
						height="14"
						key="staticText-52"/>
					<box leftPadding="5"></box>
					<textElement textAlignment="Left" verticalAlignment="Middle">
						<font size="9"/>
					</textElement>
				<text><![CDATA[Receipt No.]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="74"
						y="0"
						width="5"
						height="14"
						key="staticText-53"/>
					<box></box>
					<textElement textAlignment="Center" verticalAlignment="Middle">
						<font size="9"/>
					</textElement>
				<text><![CDATA[:]]></text>
				</staticText>
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="79"
						y="0"
						width="112"
						height="14"
						key="textField-15"/>
					<box leftPadding="4"></box>
					<textElement textAlignment="Left" verticalAlignment="Middle">
						<font pdfFontName="Helvetica" size="9" isBold="false"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{receiptno}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement
						x="0"
						y="13"
						width="73"
						height="14"
						key="staticText-54"/>
					<box leftPadding="5"></box>
					<textElement textAlignment="Left" verticalAlignment="Middle">
						<font size="9"/>
					</textElement>
				<text><![CDATA[Receipt Date]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="74"
						y="13"
						width="5"
						height="14"
						key="staticText-55"/>
					<box></box>
					<textElement textAlignment="Center" verticalAlignment="Middle">
						<font size="9"/>
					</textElement>
				<text><![CDATA[:]]></text>
				</staticText>
				<textField isStretchWithOverflow="false" pattern="yyyy-MM-dd" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="79"
						y="13"
						width="112"
						height="14"
						key="textField-16"/>
					<box leftPadding="4"></box>
					<textElement textAlignment="Left" verticalAlignment="Middle">
						<font pdfFontName="Helvetica" size="9" isBold="false"/>
					</textElement>
				<textFieldExpression   class="java.util.Date"><![CDATA[$F{receiptdate}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement
						x="0"
						y="26"
						width="73"
						height="14"
						key="staticText-56"/>
					<box leftPadding="5"></box>
					<textElement textAlignment="Left" verticalAlignment="Middle">
						<font size="9"/>
					</textElement>
				<text><![CDATA[Receipt Type]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="74"
						y="26"
						width="5"
						height="14"
						key="staticText-57"/>
					<box></box>
					<textElement textAlignment="Center" verticalAlignment="Middle">
						<font size="9"/>
					</textElement>
				<text><![CDATA[:]]></text>
				</staticText>
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="79"
						y="26"
						width="112"
						height="14"
						key="textField-17"/>
					<box leftPadding="4"></box>
					<textElement textAlignment="Left" verticalAlignment="Middle">
						<font pdfFontName="Helvetica" size="9" isBold="false"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{receipttype}]]></textFieldExpression>
				</textField>
			</band>
			</groupFooter>
		</group>
		<group  name="paystat" >
			<groupExpression><![CDATA[]]></groupExpression>
			<groupHeader>
			<band height="0"  isSplitAllowed="true" >
			</band>
			</groupHeader>
			<groupFooter>
			<band height="21"  isSplitAllowed="true" >
				<staticText>
					<reportElement
						x="0"
						y="5"
						width="73"
						height="14"
						key="staticText-50"/>
					<box leftPadding="5"></box>
					<textElement textAlignment="Left" verticalAlignment="Middle">
						<font size="9"/>
					</textElement>
				<text><![CDATA[Payment Status]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="74"
						y="5"
						width="5"
						height="14"
						key="staticText-51"/>
					<box></box>
					<textElement textAlignment="Center" verticalAlignment="Middle">
						<font size="9"/>
					</textElement>
				<text><![CDATA[:]]></text>
				</staticText>
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="79"
						y="5"
						width="187"
						height="14"
						key="textField-14"/>
					<box leftPadding="4"></box>
					<textElement textAlignment="Left" verticalAlignment="Middle">
						<font pdfFontName="Helvetica-Bold" size="10" isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[($F{state} == 'OPEN' ? 'UNPAID' : ($F{state}.toString().matches('PAID|CLOSED|CANCELLED') ? $F{state} : 'UNPAID'))]]></textFieldExpression>
				</textField>
			</band>
			</groupFooter>
		</group>
		<background>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</background>
		<title>
			<band height="164"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						mode="Transparent"
						x="0"
						y="46"
						width="266"
						height="23"
						forecolor="#000000"
						backcolor="#FFFFFF"
						key="textField-5"/>
					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
					<textElement textAlignment="Center" verticalAlignment="Middle" rotation="None" lineSpacing="Single">
						<font fontName="SansSerif" pdfFontName="Helvetica-Bold" size="16" isBold="true" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="Cp1252" isStrikeThrough="false" />
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA["ORDER OF PAYMENT"]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						mode="Transparent"
						x="0"
						y="14"
						width="266"
						height="14"
						forecolor="#000000"
						backcolor="#FFFFFF"
						key="textField-6"/>
					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
					<textElement textAlignment="Center" verticalAlignment="Middle" rotation="None" lineSpacing="Single">
						<font fontName="SansSerif" pdfFontName="Helvetica" size="9" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="Cp1252" isStrikeThrough="false" />
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[($P{PARENTLGUFORMALNAME}? $P{PARENTLGUFORMALNAME}: $P{LGUFORMALNAME})]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						mode="Transparent"
						x="0"
						y="28"
						width="266"
						height="14"
						forecolor="#000000"
						backcolor="#FFFFFF"
						key="textField-7"/>
					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
					<textElement textAlignment="Center" verticalAlignment="Middle" rotation="None" lineSpacing="Single">
						<font fontName="SansSerif" pdfFontName="Helvetica" size="9" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="Cp1252" isStrikeThrough="false" />
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[($P{PARENTLGUFORMALNAME}? $P{LGUFORMALNAME}: "")]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement
						mode="Transparent"
						x="0"
						y="0"
						width="266"
						height="14"
						forecolor="#000000"
						backcolor="#FFFFFF"
						key="staticText-40"/>
					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
					<textElement textAlignment="Center" verticalAlignment="Middle" rotation="None" lineSpacing="Single">
						<font fontName="SansSerif" pdfFontName="Helvetica" size="9" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="Cp1252" isStrikeThrough="false" />
					</textElement>
				<text><![CDATA[REPUBLIC OF THE PHILIPPINES]]></text>
				</staticText>
				<image  scaleImage="RetainShape" vAlign="Top" hAlign="Left" onErrorType="Blank" isUsingCache="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						mode="Opaque"
						x="1"
						y="0"
						width="59"
						height="42"
						forecolor="#000000"
						backcolor="#FFFFFF"
						key="image-1"/>
					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
					<graphicElement stretchType="NoStretch" fill="Solid" >
					<pen lineWidth="0.0" lineStyle="Solid"/>
</graphicElement>
					<imageExpression class="java.lang.String"><![CDATA["classpath://images/lgu-logo.png"]]></imageExpression>
				</image>
				<staticText>
					<reportElement
						x="132"
						y="88"
						width="41"
						height="16"
						key="staticText-41"/>
					<box></box>
					<textElement textAlignment="Right" verticalAlignment="Middle">
						<font size="8"/>
					</textElement>
				<text><![CDATA[Control No.]]></text>
				</staticText>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="171"
						y="88"
						width="94"
						height="16"
						key="textField-8"/>
					<box></box>
					<textElement textAlignment="Center" verticalAlignment="Middle">
						<font pdfFontName="Helvetica-Bold" size="10" isBold="true"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{txncode}]]></textFieldExpression>
				</textField>
				<image  scaleImage="FillFrame" vAlign="Top" hAlign="Center" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						mode="Opaque"
						x="171"
						y="71"
						width="94"
						height="16"
						forecolor="#000000"
						backcolor="#FFFFFF"
						key="barcode-1"/>
					<box></box>
					<graphicElement stretchType="NoStretch" fill="Solid" />
					<imageExpression class="java.awt.Image"><![CDATA[it.businesslogic.ireport.barcode.BcImage.getBarcodeImage(5,$F{txncode},false,false,null,0,0)]]></imageExpression>
				</image>
				<staticText>
					<reportElement
						x="0"
						y="100"
						width="47"
						height="16"
						key="staticText-42"/>
					<box></box>
					<textElement textAlignment="Left" verticalAlignment="Middle">
						<font size="8"/>
					</textElement>
				<text><![CDATA[Trxn Date]]></text>
				</staticText>
				<textField isStretchWithOverflow="false" pattern="yyyy-MM-dd HH:mm:ss" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="46"
						y="100"
						width="112"
						height="16"
						key="textField-9"/>
					<box leftPadding="4"></box>
					<textElement textAlignment="Left" verticalAlignment="Middle">
						<font pdfFontName="Helvetica" size="9" isBold="false"/>
					</textElement>
				<textFieldExpression   class="java.util.Date"><![CDATA[$F{txndate}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement
						x="0"
						y="115"
						width="47"
						height="16"
						key="staticText-43"/>
					<box></box>
					<textElement textAlignment="Left" verticalAlignment="Middle">
						<font size="8"/>
					</textElement>
				<text><![CDATA[Payer]]></text>
				</staticText>
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="46"
						y="115"
						width="219"
						height="16"
						key="textField-10"/>
					<box leftPadding="4"></box>
					<textElement textAlignment="Left" verticalAlignment="Middle">
						<font pdfFontName="Helvetica" size="8" isBold="false"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{paidby}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement
						x="0"
						y="130"
						width="48"
						height="16"
						key="staticText-44"/>
					<box></box>
					<textElement textAlignment="Left" verticalAlignment="Middle">
						<font size="8"/>
					</textElement>
				<text><![CDATA[Address ]]></text>
				</staticText>
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="46"
						y="130"
						width="219"
						height="16"
						key="textField-11"/>
					<box leftPadding="4"></box>
					<textElement textAlignment="Left" verticalAlignment="Middle">
						<font pdfFontName="Helvetica" size="8" isBold="false"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{paidbyaddress}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement
						x="0"
						y="145"
						width="43"
						height="16"
						key="staticText-45"/>
					<box></box>
					<textElement textAlignment="Left" verticalAlignment="Middle">
						<font size="8"/>
					</textElement>
				<text><![CDATA[Particulars]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="41"
						y="145"
						width="5"
						height="16"
						key="staticText-46"/>
					<box></box>
					<textElement textAlignment="Center" verticalAlignment="Middle">
						<font size="9"/>
					</textElement>
				<text><![CDATA[:]]></text>
				</staticText>
				<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="46"
						y="145"
						width="219"
						height="16"
						key="textField-12"/>
					<box leftPadding="4"></box>
					<textElement textAlignment="Left" verticalAlignment="Middle">
						<font pdfFontName="Helvetica" size="8" isBold="false"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{particulars}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement
						x="41"
						y="130"
						width="5"
						height="16"
						key="staticText-47"/>
					<box></box>
					<textElement textAlignment="Center" verticalAlignment="Middle">
						<font size="9"/>
					</textElement>
				<text><![CDATA[:]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="41"
						y="115"
						width="5"
						height="16"
						key="staticText-48"/>
					<box></box>
					<textElement textAlignment="Center" verticalAlignment="Middle">
						<font size="9"/>
					</textElement>
				<text><![CDATA[:]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="41"
						y="100"
						width="5"
						height="16"
						key="staticText-49"/>
					<box></box>
					<textElement textAlignment="Center" verticalAlignment="Middle">
						<font size="9"/>
					</textElement>
				<text><![CDATA[:]]></text>
				</staticText>
			</band>
		</title>
		<pageHeader>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</pageHeader>
		<columnHeader>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</columnHeader>
		<detail>
			<band height="12"  isSplitAllowed="true" >
				<subreport  isUsingCache="true">
					<reportElement
						x="0"
						y="0"
						width="265"
						height="12"
						key="subreport-1"/>
					<dataSourceExpression><![CDATA[$F{items}]]></dataSourceExpression>
					<subreportExpression  class="net.sf.jasperreports.engine.JasperReport"><![CDATA[$P{Items}]]></subreportExpression>
				</subreport>
			</band>
		</detail>
		<columnFooter>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</columnFooter>
		<pageFooter>
			<band height="24"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						mode="Transparent"
						x="0"
						y="3"
						width="266"
						height="14"
						forecolor="#000000"
						backcolor="#FFFFFF"
						key="textField-4"/>
					<box leftPadding="4">					<topPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
					<textElement textAlignment="Left" verticalAlignment="Middle" rotation="None" lineSpacing="Single">
						<font fontName="SansSerif" pdfFontName="Helvetica" size="7" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="Cp1252" isStrikeThrough="false" />
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA["GENERATED BY: ETRACS v255"]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						mode="Transparent"
						x="0"
						y="14"
						width="266"
						height="10"
						forecolor="#000000"
						backcolor="#FFFFFF"
						key="textField-13"/>
					<box leftPadding="4">					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
</box>
					<textElement textAlignment="Left" verticalAlignment="Middle" rotation="None" lineSpacing="Single">
						<font fontName="SansSerif" pdfFontName="Helvetica" size="7" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="Cp1252" isStrikeThrough="false" />
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA["PRINT DATE: "+ (new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format($P{PRINTDATE})) +"          PRINTED BY: "+ $P{PRINTEDBY}]]></textFieldExpression>
				</textField>
			</band>
		</pageFooter>
		<summary>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</summary>
</jasperReport>
