<?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="Customer Invoice Detail" pageWidth="600" pageHeight="792" columnWidth="600" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0">
	<property name="com.jasperassistant.designer.GridHeight" value="12"/>
	<property name="com.jasperassistant.designer.GridWidth" value="12"/>
	<property name="com.jasperassistant.designer.HGuides" value="0"/>
	<property name="com.jasperassistant.designer.DataSource" value="genral_ledger"/>
	<property name="com.jasperassistant.designer.SnapToGrid" value="false"/>
	<property name="com.jasperassistant.designer.Units" value="Inches"/>
	<property name="com.jasperassistant.designer.Grid" value="false"/>
	<property name="ireport.zoom" value="1.0"/>
	<property name="ireport.x" value="0"/>
	<property name="ireport.y" value="0"/>
	<reportFont name="Report_Font" isDefault="false" fontName="Courier New" size="9" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Helvetica" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
	<parameter name="as_inv" class="java.lang.String" isForPrompting="false"/>
	<queryString>
		<![CDATA[SELECT DISTINCT
		(CASE WHEN SS.SCHEME_CODE IS NULL THEN ' ' ELSE SS.SCHEME_CODE END) AS SCHEME_CODE,
		(CASE WHEN SS.DESCR IS NULL THEN ' ' ELSE SS.DESCR END) AS SCHEME_DESCR
	FROM
		INVOICE_TRACE IT,
		SORDER_SCHEME SS
	where
	( IT.SORD_NO = SS.TRAN_ID )
	AND ( IT.INVOICE_ID ='$P!{as_inv}')

UNION ALL

SELECT   DISTINCT
		(CASE WHEN SS.SCHEME_CODE IS NULL THEN ' ' ELSE SS.SCHEME_CODE END) AS SCHEME_CODE,
		(CASE WHEN SS.DESCR IS NULL THEN ' ' ELSE SS.DESCR END) AS SCHEME_DESCR
	FROM
		INVOICE_TRACE IT,
		SORDERDET_SCHEME SS
	where
	( IT.SORD_NO = SS.TRAN_ID )
	AND ( IT.INVOICE_ID ='$P!{as_inv}')]]>
	</queryString>
	<field name="SCHEME_CODE" class="java.lang.String"/>
	<field name="SCHEME_DESCR" class="java.lang.String"/>
	<variable name="compute_1" class="java.lang.String" resetType="None">
		<variableExpression><![CDATA[new java.lang.String($F{SCHEME_CODE} + " "+$F{SCHEME_DESCR})]]></variableExpression>
	</variable>
	<detail>
		<band height="14">
			<textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="true">
				<reportElement positionType="Float" x="21" y="0" width="546" height="13">
					<printWhenExpression><![CDATA[new Boolean(true)]]></printWhenExpression>
				</reportElement>
				<textElement textAlignment="Left">
					<font fontName="Courier New" size="8" isUnderline="false"/>
				</textElement>
				<textFieldExpression class="java.lang.String"><![CDATA[$V{compute_1}]]></textFieldExpression>
			</textField>
		</band>
	</detail>
	<pageFooter>
		<band/>
	</pageFooter>
	<summary>
		<band/>
	</summary>
</jasperReport>
