<?xml version="1.0" encoding="UTF-8"?>
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="banking_3" pageWidth="595" pageHeight="842" whenNoDataType="BlankPage" columnWidth="535" leftMargin="30" rightMargin="30" topMargin="20" bottomMargin="20" uuid="db697c3e-fc91-4682-a78e-ba6431c9f64d">
	<property name="ireport.scriptlethandling" value="0"/>
	<property name="ireport.encoding" value="UTF-8"/>
	<property name="ireport.zoom" value="1.5"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<import value="net.sf.jasperreports.engine.*"/>
	<import value="java.util.*"/>
	<import value="net.sf.jasperreports.engine.data.*"/>
	<parameter name="reportpath" class="java.lang.String" isForPrompting="false">
		<defaultValueExpression><![CDATA["./"]]></defaultValueExpression>
	</parameter>
	<parameter name="filterid" class="java.lang.String" isForPrompting="false">
		<defaultValueExpression><![CDATA["0"]]></defaultValueExpression>
	</parameter>
	<parameter name="paygroupid" class="java.lang.String">
		<defaultValueExpression><![CDATA["0"]]></defaultValueExpression>
	</parameter>
	<parameter name="organd" class="java.lang.String">
		<defaultValueExpression><![CDATA[""]]></defaultValueExpression>
	</parameter>
	<queryString>
		<![CDATA[SELECT eb.entity_id, eb.employee_id, eb.entity_name,
	eb.bank_name, eb.bank_branch_name, eb.bank_account,
	round(eb.banked::numeric, 1) as bank_amount,
	eb.period_id, eb.period_year, eb.period_month, eb.bank_address,
	COALESCE(eb.bank_header, '') as bank_heading

FROM
((SELECT vw_employee_month.entity_id, vw_employee_month.employee_id,
	vw_employee_month.entity_name,
	vw_employee_month.bank_name,
	vw_employee_month.bank_branch_name, vw_employee_month.banked,
	vw_employee_month.bank_account,
	vw_employee_month.period_id, vw_employee_month.period_year,
	vw_employee_month.period_month,
	vw_employee_month.bank_Header,
	vw_employee_month.bank_address

FROM vw_employee_month

WHERE (vw_employee_month.period_id = '$P!{filterid}')
AND (vw_employee_month.banked > 0)
$P!{organd})

UNION

(SELECT vw_employee_banking.entity_id, vw_employee_banking.employee_id,
	vw_employee_banking.entity_name,
	vw_employee_banking.bank_name,
	vw_employee_banking.bank_branch_name,
	vw_employee_banking.base_amount,
	vw_employee_banking.bank_account,
	vw_employee_banking.period_id,
	vw_employee_banking.period_year, vw_employee_banking.period_month,
	vw_employee_banking.bank_header,
	vw_employee_banking.bank_address

FROM vw_employee_banking

WHERE (vw_employee_banking.period_id = '$P!{filterid}')
AND (vw_employee_banking.base_amount > 0)
$P!{organd})) as eb


ORDER BY eb.bank_name, eb.employee_id;]]>
	</queryString>
	<field name="entity_id" class="java.lang.Integer"/>
	<field name="employee_id" class="java.lang.String"/>
	<field name="entity_name" class="java.lang.String"/>
	<field name="bank_name" class="java.lang.String"/>
	<field name="bank_branch_name" class="java.lang.String"/>
	<field name="bank_account" class="java.lang.String"/>
	<field name="bank_amount" class="java.math.BigDecimal"/>
	<field name="period_id" class="java.lang.Integer"/>
	<field name="period_year" class="java.lang.String"/>
	<field name="period_month" class="java.lang.String"/>
	<field name="bank_address" class="java.lang.String"/>
	<field name="bank_heading" class="java.lang.String"/>
	<variable name="sumbanked" class="java.math.BigDecimal" resetType="Group" resetGroup="bank_name" calculation="Sum">
		<variableExpression><![CDATA[$F{bank_amount}]]></variableExpression>
	</variable>
	<group name="bank_name">
		<groupExpression><![CDATA[$F{bank_name}]]></groupExpression>
		<groupHeader>
			<band height="171">
				<staticText>
					<reportElement key="element-90" x="1" y="155" width="71" height="16" forecolor="#000000" uuid="78b620c0-b926-452c-85fb-5f987cdbd2b9"/>
					<box leftPadding="2" rightPadding="2">
						<topPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/>
						<leftPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/>
						<bottomPen lineWidth="0.0" lineColor="#000000"/>
						<rightPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/>
					</box>
					<textElement>
						<font fontName="Times New Roman" size="10" isBold="true" pdfFontName="Helvetica-Bold"/>
					</textElement>
					<text><![CDATA[ID]]></text>
				</staticText>
				<staticText>
					<reportElement key="element-90" x="72" y="155" width="171" height="16" forecolor="#000000" uuid="b0e37a7d-8ed7-428b-be1b-ebc4b4f79fbb"/>
					<box leftPadding="2" rightPadding="2">
						<topPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/>
						<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
						<bottomPen lineWidth="0.0" lineColor="#000000"/>
						<rightPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/>
					</box>
					<textElement>
						<font fontName="Times New Roman" size="10" isBold="true" pdfFontName="Helvetica-Bold"/>
					</textElement>
					<text><![CDATA[Employee Name]]></text>
				</staticText>
				<staticText>
					<reportElement key="element-90" x="0" y="123" width="80" height="15" forecolor="#000000" uuid="20f35f1a-56cf-48f5-a60b-2c6fe4b3245e"/>
					<box leftPadding="2" rightPadding="2">
						<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
						<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
						<bottomPen lineWidth="0.0" lineColor="#000000"/>
						<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					</box>
					<textElement>
						<font fontName="Times New Roman" size="10" isBold="true" pdfFontName="Helvetica-Bold"/>
					</textElement>
					<text><![CDATA[Bank :]]></text>
				</staticText>
				<staticText>
					<reportElement key="element-90" x="243" y="155" width="123" height="16" forecolor="#000000" uuid="fe197130-fd0e-49f4-8723-394619fca666"/>
					<box leftPadding="2" rightPadding="2">
						<topPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/>
						<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
						<bottomPen lineWidth="0.0" lineColor="#000000"/>
						<rightPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/>
					</box>
					<textElement>
						<font fontName="Times New Roman" size="10" isBold="true" pdfFontName="Helvetica-Bold"/>
					</textElement>
					<text><![CDATA[Branch]]></text>
				</staticText>
				<staticText>
					<reportElement key="element-90" x="467" y="155" width="65" height="16" forecolor="#000000" uuid="de6b4bb3-6045-41fe-9084-855edc0b5f44"/>
					<box leftPadding="2" rightPadding="2">
						<topPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/>
						<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
						<bottomPen lineWidth="0.0" lineColor="#000000"/>
						<rightPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/>
					</box>
					<textElement textAlignment="Right">
						<font fontName="Times New Roman" size="10" isBold="true" pdfFontName="Helvetica-Bold"/>
					</textElement>
					<text><![CDATA[Amount]]></text>
				</staticText>
				<staticText>
					<reportElement key="element-90" x="366" y="155" width="101" height="16" forecolor="#000000" uuid="a92e5c6e-d27b-4422-88b2-0f5794515d80"/>
					<box leftPadding="2" rightPadding="2">
						<topPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/>
						<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
						<bottomPen lineWidth="0.0" lineColor="#000000"/>
						<rightPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/>
					</box>
					<textElement>
						<font fontName="Times New Roman" size="10" isBold="true" pdfFontName="Helvetica-Bold"/>
					</textElement>
					<text><![CDATA[Account Number]]></text>
				</staticText>
				<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
					<reportElement key="textField" x="80" y="123" width="257" height="15" uuid="df03b957-0c68-4c1c-8deb-ff3acea0dd59"/>
					<box leftPadding="2" rightPadding="2">
						<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
						<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
						<bottomPen lineWidth="0.0" lineColor="#000000"/>
						<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					</box>
					<textElement>
						<font fontName="Times New Roman" size="10"/>
					</textElement>
					<textFieldExpression><![CDATA[$F{bank_name}]]></textFieldExpression>
				</textField>
				<image scaleImage="RetainShape">
					<reportElement key="image-1" x="0" y="3" width="535" height="102" uuid="2520b014-4d59-45fc-ab07-1ac5cfa393e2"/>
					<box>
						<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
						<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
						<bottomPen lineWidth="0.0" lineColor="#000000"/>
						<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					</box>
					<imageExpression><![CDATA[$P{reportpath}  + "logo.jpg"]]></imageExpression>
				</image>
				<textField pattern="MMMMM dd, yyyy" isBlankWhenNull="false">
					<reportElement key="textField-2" x="80" y="108" width="257" height="15" uuid="c7991a27-c320-41d7-84b5-3208595a66d0"/>
					<box>
						<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
						<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
						<bottomPen lineWidth="0.0" lineColor="#000000"/>
						<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					</box>
					<textElement>
						<font fontName="Times New Roman" size="10"/>
					</textElement>
					<textFieldExpression><![CDATA[new Date()]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement key="element-92" x="0" y="108" width="80" height="15" forecolor="#000000" uuid="3a3b0a5f-620c-4bd3-9310-d30435087509"/>
					<box leftPadding="2" rightPadding="2">
						<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
						<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
						<bottomPen lineWidth="0.0" lineColor="#000000"/>
						<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					</box>
					<textElement>
						<font fontName="Times New Roman" size="10" isBold="true" pdfFontName="Helvetica"/>
					</textElement>
					<text><![CDATA[Date :]]></text>
				</staticText>
				<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
					<reportElement key="textField" x="80" y="139" width="79" height="15" uuid="9a1e5403-c312-41c2-8146-6717ef5f5ae1"/>
					<box leftPadding="2" rightPadding="2">
						<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
						<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
						<bottomPen lineWidth="0.0" lineColor="#000000"/>
						<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					</box>
					<textElement>
						<font fontName="Times New Roman" size="10"/>
					</textElement>
					<textFieldExpression><![CDATA[$F{period_year}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement key="element-90" x="0" y="139" width="80" height="15" forecolor="#000000" uuid="9f1f1b57-b5a4-416e-a820-d4174ba37056"/>
					<box leftPadding="2" rightPadding="2">
						<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
						<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
						<bottomPen lineWidth="0.0" lineColor="#000000"/>
						<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					</box>
					<textElement>
						<font fontName="Times New Roman" size="10" isBold="true" pdfFontName="Helvetica-Bold"/>
					</textElement>
					<text><![CDATA[Month :]]></text>
				</staticText>
				<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
					<reportElement key="textField" x="159" y="139" width="178" height="15" uuid="e1a12419-f1b8-4c9b-94cc-7cc6bad369c4"/>
					<box leftPadding="2" rightPadding="2">
						<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
						<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
						<bottomPen lineWidth="0.0" lineColor="#000000"/>
						<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					</box>
					<textElement>
						<font fontName="Times New Roman" size="10"/>
					</textElement>
					<textFieldExpression><![CDATA[$F{period_month}]]></textFieldExpression>
				</textField>
			</band>
		</groupHeader>
		<groupFooter>
			<band height="79">
				<textField isStretchWithOverflow="true" pattern="#,##0.00;-#,##0.00" isBlankWhenNull="true">
					<reportElement key="textField-1" x="467" y="0" width="65" height="16" uuid="3d7dbfb9-632b-4a04-b01b-7f8456f4bd50"/>
					<box leftPadding="2" rightPadding="2">
						<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
						<leftPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/>
						<bottomPen lineWidth="0.25" lineColor="#000000"/>
						<rightPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/>
					</box>
					<textElement textAlignment="Right">
						<font fontName="Times New Roman" size="10" isBold="true" pdfFontName="Helvetica-Bold"/>
					</textElement>
					<textFieldExpression><![CDATA[$V{sumbanked}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement key="element-91" x="72" y="0" width="171" height="16" forecolor="#000000" uuid="b239a11d-aec0-433a-82dc-80d454079218"/>
					<box leftPadding="2" rightPadding="2">
						<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
						<leftPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/>
						<bottomPen lineWidth="0.25" lineColor="#000000"/>
						<rightPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/>
					</box>
					<textElement>
						<font fontName="Times New Roman" size="10" isBold="true" pdfFontName="Helvetica-Bold"/>
					</textElement>
					<text><![CDATA[Total]]></text>
				</staticText>
				<staticText>
					<reportElement key="element-91" x="1" y="29" width="93" height="16" forecolor="#000000" uuid="0ee29c7a-6285-4bb3-81e9-19c7cd8ed131"/>
					<box leftPadding="2" rightPadding="2">
						<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
						<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
						<bottomPen lineWidth="0.0" lineColor="#000000"/>
						<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					</box>
					<textElement>
						<font fontName="Times New Roman" size="10" isBold="true" pdfFontName="Helvetica-Bold"/>
					</textElement>
					<text><![CDATA[Signature]]></text>
				</staticText>
				<staticText>
					<reportElement key="element-91" x="1" y="56" width="93" height="16" forecolor="#000000" uuid="bc5845ed-c41f-4fba-a032-f01318111ae9"/>
					<box leftPadding="2" rightPadding="2">
						<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
						<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
						<bottomPen lineWidth="0.0" lineColor="#000000"/>
						<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					</box>
					<textElement>
						<font fontName="Times New Roman" size="10" isBold="true" pdfFontName="Helvetica-Bold"/>
					</textElement>
					<text><![CDATA[Date]]></text>
				</staticText>
				<staticText>
					<reportElement key="element-91" x="273" y="29" width="93" height="16" forecolor="#000000" uuid="6d160e44-1182-41ec-b094-b8794a0b10d5"/>
					<box leftPadding="2" rightPadding="2">
						<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
						<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
						<bottomPen lineWidth="0.0" lineColor="#000000"/>
						<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					</box>
					<textElement>
						<font fontName="Times New Roman" size="10" isBold="true" pdfFontName="Helvetica-Bold"/>
					</textElement>
					<text><![CDATA[Signature]]></text>
				</staticText>
				<line>
					<reportElement x="105" y="44" width="150" height="1" uuid="eed2c7b3-ebaf-4343-9524-f00400c200dc"/>
				</line>
				<line>
					<reportElement x="377" y="43" width="150" height="1" uuid="ee8a3596-9067-40fd-abdb-cb7fe34a38a9"/>
				</line>
				<line>
					<reportElement x="105" y="71" width="150" height="1" uuid="ebeaa718-d3c5-4dcd-aa2e-be9dace59e93"/>
				</line>
				<break>
					<reportElement x="0" y="74" width="100" height="1" uuid="8820d6e1-c55a-4974-8b28-d7794fb205de"/>
				</break>
			</band>
		</groupFooter>
	</group>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band splitType="Stretch"/>
	</title>
	<pageHeader>
		<band splitType="Stretch"/>
	</pageHeader>
	<columnHeader>
		<band height="6" splitType="Stretch"/>
	</columnHeader>
	<detail>
		<band height="15" splitType="Stretch">
			<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
				<reportElement key="textField" x="1" y="0" width="71" height="15" uuid="21ba6819-b4a8-42c9-bd7c-065924756434"/>
				<box leftPadding="2" rightPadding="2">
					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/>
				</box>
				<textElement>
					<font fontName="Times New Roman" size="10"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{employee_id}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
				<reportElement key="textField" x="72" y="0" width="171" height="15" uuid="d29f6024-9450-474d-8963-2d3b846de47e"/>
				<box leftPadding="2" rightPadding="2">
					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/>
				</box>
				<textElement>
					<font fontName="Times New Roman" size="10"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{entity_name}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
				<reportElement key="textField" x="243" y="0" width="123" height="15" uuid="6583f7ec-db46-451f-9f72-66e1e26dde97"/>
				<box leftPadding="2" rightPadding="2">
					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/>
				</box>
				<textElement>
					<font fontName="Times New Roman" size="10"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{bank_branch_name}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="#,##0.00;-#,##0.00" isBlankWhenNull="true">
				<reportElement key="textField" x="467" y="0" width="65" height="15" uuid="1b68a623-7da5-4a47-8264-c036076999d0"/>
				<box leftPadding="2" rightPadding="2">
					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/>
				</box>
				<textElement textAlignment="Right">
					<font fontName="Times New Roman" size="10"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{bank_amount}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
				<reportElement key="textField" x="366" y="0" width="101" height="15" uuid="aa6438c1-3d70-4f16-bc08-83156e172453"/>
				<box leftPadding="2" rightPadding="2">
					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
					<bottomPen lineWidth="0.0" lineColor="#000000"/>
					<rightPen lineWidth="0.25" lineStyle="Solid" lineColor="#000000"/>
				</box>
				<textElement>
					<font fontName="Times New Roman" size="10"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{bank_account}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<columnFooter>
		<band splitType="Stretch"/>
	</columnFooter>
	<pageFooter>
		<band splitType="Stretch"/>
	</pageFooter>
	<summary>
		<band splitType="Stretch"/>
	</summary>
</jasperReport>
