<?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" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="AllSectionsNoDetail" columnWidth="782" 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.0"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="155"/>
	<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_branch_code, eb.bank_name,
	eb.bank_branch_name, eb.banked, eb.bank_account,
	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_branch_code,
	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)
AND (vw_employee_month.pay_group_id = '$P!{paygroupid}')
$P!{organd})

UNION

(SELECT vw_employee_banking.entity_id, vw_employee_banking.employee_id, vw_employee_banking.entity_name,
	vw_employee_banking.bank_branch_code,
	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)
AND (vw_employee_banking.pay_group_id = '$P!{paygroupid}')
$P!{organd})) as eb


ORDER BY 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_branch_code" class="java.lang.String"/>
	<field name="bank_name" class="java.lang.String"/>
	<field name="bank_branch_name" class="java.lang.String"/>
	<field name="banked" class="java.lang.Double"/>
	<field name="bank_account" class="java.lang.String"/>
	<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.lang.Double" calculation="Sum">
		<variableExpression><![CDATA[$F{banked}]]></variableExpression>
	</variable>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band height="269" splitType="Stretch">
			<textField pattern="MMMMM dd, yyyy" isBlankWhenNull="false">
				<reportElement key="textField-2" x="46" y="113" width="209" height="16" 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>
			<image scaleImage="RetainShape">
				<reportElement key="image-1" x="7" y="7" width="775" 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>
			<staticText>
				<reportElement key="element-92" x="7" y="113" width="37" height="16" 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="false" pdfFontName="Helvetica"/>
				</textElement>
				<text><![CDATA[Date :]]></text>
			</staticText>
			<textField isBlankWhenNull="false">
				<reportElement key="textField-4" x="7" y="135" width="770" height="130" uuid="ed11ffb2-33a4-4b1b-84c2-b1af681898d3"/>
				<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 markup="html">
					<font fontName="Times New Roman"/>
				</textElement>
				<textFieldExpression><![CDATA["Ref: HR/BK/" + $F{period_id} +
"<br>" + $F{bank_address} +

"<br><br>Dear Sir/Madam," +

"<br><br><b>RE: <u>Payroll Payments for " + $F{period_month}.trim() + ", " + $F{period_year} + "</u></b>" +

"<br><br>" + $F{bank_heading}]]></textFieldExpression>
			</textField>
		</band>
	</title>
	<pageHeader>
		<band splitType="Stretch"/>
	</pageHeader>
	<columnHeader>
		<band height="17" splitType="Stretch">
			<staticText>
				<reportElement key="element-90" x="1" y="1" width="69" 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="70" y="1" width="184" 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="305" y="1" width="133" height="16" forecolor="#000000" uuid="20f35f1a-56cf-48f5-a60b-2c6fe4b3245e"/>
				<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[Bank]]></text>
			</staticText>
			<staticText>
				<reportElement key="element-90" x="438" y="1" width="125" 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="717" y="1" 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="563" y="1" width="154" 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>
			<staticText>
				<reportElement key="element-90" x="255" y="1" width="50" height="16" forecolor="#000000" uuid="edbfe22c-6d79-4313-be4d-c210098fc00f"/>
				<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[Code]]></text>
			</staticText>
		</band>
	</columnHeader>
	<detail>
		<band height="15" splitType="Stretch">
			<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
				<reportElement key="textField" x="1" y="0" width="69" 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="70" y="0" width="184" 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="305" y="0" width="133" 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.25" lineStyle="Solid" lineColor="#000000"/>
				</box>
				<textElement>
					<font fontName="Times New Roman" size="10"/>
				</textElement>
				<textFieldExpression><![CDATA[$F{bank_name}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
				<reportElement key="textField" x="438" y="0" width="125" 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;-#,##0" isBlankWhenNull="true">
				<reportElement key="textField" x="717" 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{banked}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
				<reportElement key="textField" x="563" y="0" width="154" 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>
			<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
				<reportElement key="textField" x="254" y="0" width="51" height="15" uuid="a938847b-cc6a-4d5f-b548-e2645c65893a"/>
				<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{bank_branch_code}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<columnFooter>
		<band splitType="Stretch"/>
	</columnFooter>
	<pageFooter>
		<band splitType="Stretch"/>
	</pageFooter>
	<summary>
		<band height="116" splitType="Stretch">
			<textField isStretchWithOverflow="true" pattern="#,##0;-#,##0" isBlankWhenNull="true">
				<reportElement key="textField-1" x="717" y="0" width="65" height="16" uuid="3d7dbfb9-632b-4a04-b01b-7f8456f4bd50"/>
				<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 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="70" y="0" width="184" height="16" forecolor="#000000" uuid="b239a11d-aec0-433a-82dc-80d454079218"/>
				<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[Total]]></text>
			</staticText>
			<staticText>
				<reportElement key="staticText-2" x="7" y="28" width="239" height="83" uuid="1d9ac04c-e7e6-4621-a997-b78eae691534"/>
				<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 textAlignment="Left" markup="html">
					<font fontName="Times New Roman" size="10" isBold="false" pdfFontName="Helvetica"/>
				</textElement>
				<text><![CDATA[Yours truly,

<br><br><u><b>HR and OD Manager</b></u>]]></text>
			</staticText>
		</band>
	</summary>
</jasperReport>
