<?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="vw_trxr" language="groovy" pageWidth="595" pageHeight="842" whenNoDataType="BlankPage" columnWidth="535" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
	<property name="ireport.zoom" value="1.0"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="47"/>
	<style name="Title" fontName="Times New Roman" fontSize="50" isBold="true" pdfFontName="Times-Bold"/>
	<style name="SubTitle" forecolor="#736343" fontName="Arial" fontSize="18"/>
	<style name="Column header" forecolor="#666666" fontName="Arial" fontSize="12" isBold="true"/>
	<style name="Detail" fontName="Arial" fontSize="12"/>
	<style name="Row" mode="Transparent">
		<conditionalStyle>
			<conditionExpression><![CDATA[$V{REPORT_COUNT}%2 == 0]]></conditionExpression>
			<style backcolor="#E6DAC3"/>
		</conditionalStyle>
	</style>
	<parameter name="organd" class="java.lang.String"><defaultValueExpression><![CDATA[""]]></defaultValueExpression></parameter>
	<parameter name="orgwhere" class="java.lang.String"><defaultValueExpression><![CDATA[""]]></defaultValueExpression></parameter>
	<parameter name="filterid" class="java.lang.String">
		<defaultValueExpression><![CDATA["1"]]></defaultValueExpression>
	</parameter>
	<parameter name="SUBREPORT_DIR" class="java.lang.String">
		<defaultValueExpression><![CDATA["./"]]></defaultValueExpression>
	</parameter>
	<queryString>
		<![CDATA[SELECT vw_trx.org_logo, vw_trx.org_name, vw_trx.org_pin, vw_trx.org_vat_number, vw_trx.org_invoice_footer, vw_trx.org_premises, vw_trx.org_street, vw_trx.org_post_office_box, vw_trx.org_postal_code, vw_trx.org_town, vw_trx.org_sys_country_name, vw_trx.org_phone_number, vw_trx.org_email, vw_trx.org_website, vw_trx.entity_id, vw_trx.entity_name,
('DC-' || lpad(CAST(vw_trx.entity_id as varchar), 5, '0')) as entity_number,
('P.O. Box ' || COALESCE(vw_trx.post_office_box, '') || ' - ' || COALESCE(vw_trx.postal_code, '')) as postal_address,
(COALESCE(vw_trx.premises, '') || ', ' || COALESCE(vw_trx.street, '')) as street_address,
vw_trx.phone_number, vw_trx.email,
(COALESCE(vw_trx.town, '') || ', ' || COALESCE(vw_trx.sys_country_name, '')) as city_location, ('Attn: ' || vw_trx.attention) as attention,
vw_trx.transaction_type_name, UPPER(vw_trx.transaction_type_name) as doc_name,
vw_trx.transaction_date, vw_trx.document_number,
vw_trx.order_number, vw_trx.payment_terms, vw_trx.currency_symbol, vw_trx.job,
vw_trx.details,
vw_trx.transaction_amount
FROM vw_trx
WHERE (vw_trx.transaction_id = '$P!{filterid}')
$P!{organd}
]]>
	</queryString>
	<field name="org_logo" class="java.lang.String"/>
	<field name="org_name" class="java.lang.String"/>
	<field name="org_pin" class="java.lang.String"/>
	<field name="org_vat_number" class="java.lang.String"/>
	<field name="org_invoice_footer" class="java.lang.String"/>
	<field name="org_premises" class="java.lang.String"/>
	<field name="org_street" class="java.lang.String"/>
	<field name="org_post_office_box" class="java.lang.String"/>
	<field name="org_postal_code" class="java.lang.String"/>
	<field name="org_town" class="java.lang.String"/>
	<field name="org_sys_country_name" class="java.lang.String"/>
	<field name="org_phone_number" class="java.lang.String"/>
	<field name="org_email" class="java.lang.String"/>
	<field name="org_website" class="java.lang.String"/>
	<field name="entity_id" class="java.lang.Integer"/>
	<field name="entity_name" class="java.lang.String"/>
	<field name="entity_number" class="java.lang.String"/>
	<field name="postal_address" class="java.lang.String"/>
	<field name="street_address" class="java.lang.String"/>
	<field name="phone_number" class="java.lang.String"/>
	<field name="email" class="java.lang.String"/>
	<field name="city_location" class="java.lang.String"/>
	<field name="attention" class="java.lang.String"/>
	<field name="transaction_type_name" class="java.lang.String"/>
	<field name="doc_name" class="java.lang.String"/>
	<field name="transaction_date" class="java.sql.Date"/>
	<field name="document_number" class="java.lang.Integer"/>
	<field name="order_number" class="java.lang.String"/>
	<field name="payment_terms" class="java.lang.String"/>
	<field name="currency_symbol" class="java.lang.String"/>
	<field name="job" class="java.lang.String"/>
	<field name="details" class="java.lang.String"/>
	<field name="transaction_amount" class="java.lang.Float"/>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band height="474" splitType="Stretch">
			<image>
				<reportElement x="205" y="14" width="145" height="97"/>
				<imageExpression class="java.lang.String"><![CDATA[$P{SUBREPORT_DIR} + $F{org_logo}]]></imageExpression>
			</image>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement style="Detail" x="153" y="111" width="249" height="15"/>
				<textElement textAlignment="Center">
					<font fontName="Times New Roman" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{org_name}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement style="Detail" x="0" y="126" width="555" height="12"/>
				<textElement textAlignment="Center">
					<font fontName="Times New Roman" size="8" isBold="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{org_premises} + ", " + $F{org_street} + ", P.O. Box " + $F{org_post_office_box}
+ " - " + $F{org_postal_code} + ", " + $F{org_town} + ", " + $F{org_sys_country_name}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement style="Detail" x="0" y="138" width="555" height="12"/>
				<textElement textAlignment="Center">
					<font fontName="Times New Roman" size="8" isBold="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[" Tel: " + $F{org_phone_number} + "  EMail: " + $F{org_email} + "  Website: " + $F{org_website}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement style="Column header" x="1" y="156" width="57" height="15" forecolor="#000000"/>
				<textElement>
					<font fontName="Times New Roman"/>
				</textElement>
				<text><![CDATA[To:]]></text>
			</staticText>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement style="Detail" x="71" y="171" width="152" height="15"/>
				<textElement>
					<font fontName="Times New Roman" size="10"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{entity_number}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement style="Column header" x="14" y="171" width="57" height="15" forecolor="#000000"/>
				<textElement>
					<font fontName="Times New Roman" size="10"/>
				</textElement>
				<text><![CDATA[Client ID:]]></text>
			</staticText>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement style="Detail" x="14" y="186" width="209" height="15"/>
				<textElement>
					<font fontName="Times New Roman" size="10"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{entity_name}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement style="Detail" x="14" y="216" width="209" height="15"/>
				<textElement>
					<font fontName="Times New Roman" size="10"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{postal_address}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement style="Detail" x="14" y="201" width="209" height="15"/>
				<textElement>
					<font fontName="Times New Roman" size="10"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{street_address}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement style="Detail" x="14" y="231" width="209" height="15"/>
				<textElement>
					<font fontName="Times New Roman" size="10"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{city_location}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement style="Detail" x="14" y="246" width="209" height="15"/>
				<textElement>
					<font fontName="Times New Roman" size="10"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{phone_number}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement style="Detail" x="14" y="261" width="209" height="15"/>
				<textElement>
					<font fontName="Times New Roman" size="10"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{email}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" pattern="dd MMM yyyy" isBlankWhenNull="true">
				<reportElement style="Detail" x="432" y="216" width="118" height="15"/>
				<box>
					<bottomPen lineWidth="0.75"/>
				</box>
				<textElement>
					<font fontName="Times New Roman" size="10"/>
				</textElement>
				<textFieldExpression class="java.util.Date"><![CDATA[$F{transaction_date}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement style="Detail" x="432" y="201" width="118" height="15"/>
				<box>
					<bottomPen lineWidth="0.75"/>
				</box>
				<textElement>
					<font fontName="Times New Roman" size="10"/>
				</textElement>
				<textFieldExpression class="java.lang.Integer"><![CDATA[$F{document_number}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement style="Column header" x="14" y="297" width="44" height="15" forecolor="#000000"/>
				<box>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<leftPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement>
					<font fontName="Times New Roman" size="10"/>
				</textElement>
				<text><![CDATA[Job :]]></text>
			</staticText>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement style="Detail" x="58" y="297" width="494" height="15"/>
				<box>
					<topPen lineWidth="0.75" lineStyle="Solid"/>
					<bottomPen lineWidth="0.75" lineStyle="Solid"/>
					<rightPen lineWidth="0.75" lineStyle="Solid"/>
				</box>
				<textElement>
					<font fontName="Times New Roman" size="10"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{job}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement style="Detail" x="329" y="171" width="221" height="15"/>
				<textElement>
					<font fontName="Times New Roman" size="12" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{transaction_type_name}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement style="Detail" x="14" y="276" width="209" height="15"/>
				<textElement>
					<font fontName="Times New Roman" size="10"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{attention}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement style="Column header" x="329" y="216" width="103" height="15" forecolor="#000000"/>
				<box>
					<bottomPen lineWidth="0.75"/>
				</box>
				<textElement>
					<font fontName="Times New Roman" size="10" isBold="false"/>
				</textElement>
				<text><![CDATA[DATE :]]></text>
			</staticText>
			<staticText>
				<reportElement style="Column header" x="329" y="231" width="103" height="15" forecolor="#000000"/>
				<box>
					<bottomPen lineWidth="0.75"/>
				</box>
				<textElement>
					<font fontName="Times New Roman" size="10" isBold="false"/>
				</textElement>
				<text><![CDATA[CURRENCY :]]></text>
			</staticText>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement style="Detail" x="432" y="231" width="118" height="15"/>
				<box>
					<bottomPen lineWidth="0.75"/>
				</box>
				<textElement>
					<font fontName="Times New Roman" size="10"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{currency_symbol}]]></textFieldExpression>
			</textField>
			<textField isStretchWithOverflow="true" isBlankWhenNull="true">
				<reportElement style="Detail" x="329" y="201" width="103" height="15"/>
				<box>
					<bottomPen lineWidth="0.75"/>
				</box>
				<textElement>
					<font fontName="Times New Roman" size="10"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{doc_name} + " #:"]]></textFieldExpression>
			</textField>
			<rectangle radius="10">
				<reportElement x="1" y="363" width="531" height="90"/>
			</rectangle>
			<textField isBlankWhenNull="true">
				<reportElement x="14" y="383" width="495" height="59"/>
				<textElement>
					<font fontName="Times New Roman"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$F{details}]]></textFieldExpression>
			</textField>
			<staticText>
				<reportElement style="Column header" x="14" y="368" width="103" height="15" forecolor="#000000"/>
				<box>
					<pen lineWidth="0.0"/>
					<topPen lineWidth="0.0"/>
					<leftPen lineWidth="0.0"/>
					<bottomPen lineWidth="0.0"/>
					<rightPen lineWidth="0.0"/>
				</box>
				<textElement>
					<font fontName="Times New Roman" size="10" isBold="true"/>
				</textElement>
				<text><![CDATA[Notes :]]></text>
			</staticText>
			<staticText>
				<reportElement style="Column header" x="14" y="329" width="103" height="15" forecolor="#000000"/>
				<box>
					<bottomPen lineWidth="0.75"/>
				</box>
				<textElement>
					<font fontName="Times New Roman" size="12" isBold="true"/>
				</textElement>
				<text><![CDATA[Amount :]]></text>
			</staticText>
			<textField isStretchWithOverflow="true" pattern="#,##0.00;(#,##0.00)" isBlankWhenNull="true">
				<reportElement style="Detail" x="117" y="329" width="118" height="15"/>
				<box>
					<bottomPen lineWidth="0.75"/>
				</box>
				<textElement textAlignment="Right">
					<font fontName="Times New Roman" size="12" isBold="true"/>
				</textElement>
				<textFieldExpression class="java.lang.Float"><![CDATA[$F{transaction_amount}]]></textFieldExpression>
			</textField>
		</band>
	</title>
	<pageHeader>
		<band splitType="Stretch"/>
	</pageHeader>
	<columnHeader>
		<band splitType="Stretch"/>
	</columnHeader>
	<detail>
		<band splitType="Stretch"/>
	</detail>
	<columnFooter>
		<band splitType="Stretch"/>
	</columnFooter>
	<pageFooter>
		<band height="32" splitType="Stretch"/>
	</pageFooter>
	<summary>
		<band splitType="Stretch"/>
	</summary>
</jasperReport>
