<?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="cr12_apsub_det_import"
		 columnCount="1"
		 printOrder="Vertical"
		 orientation="Landscape"
		 pageWidth="935"
		 pageHeight="765"
		 columnWidth="935"
		 columnSpacing="0"
		 leftMargin="0"
		 rightMargin="0"
		 topMargin="0"
		 bottomMargin="0"
		 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="trans_no" isForPrompting="true" class="java.lang.String"/>
	<queryString><![CDATA[SELECT 
e.ftcompany_name AS hdr_ftcompany_name, a.ftcvs_no AS hdr_ftcvs_no,  a.fdtrans_date AS hdr_fdtrans_date,  
c.ftsupplier_name AS hdr_ftsupplier_name,  
a.ftremarks AS hdr_ftremarks,   a.fcamount AS hdr_fcamount ,b.fttrans_status_name  AS hdr_fttrans_status_name,
CASE WHEN a.fnstatus<>9 THEN '' ELSE b.fttrans_status_name END AS hdr_ftstatus, 
d.ftacc_no AS det_ftacc_no,e.ftcoa_name AS det_ftcoa_name,
d.fnpayment_method AS hdr_fnpayment_method,
a.fcsub_amount AS hdr_fcsub_amount,
a.fcother_cost AS hdr_fcother_cost,
a.ftjournal_no AS hdr_ftjournal_no,
a.fcinvoice_amount AS hdr_fcinvoice_amount,IFNULL(a.fckurs,0) AS hdr_fckurs,
f.fttrans_status_name AS  hdr_ftpayment_method,
d.ftgiro_no AS  det_ftgiro_no,  
d.fcamount AS det_fcamount,
d.fcother_costIDR AS det_fcother_costIDR,
d.fctotal AS det_fctotal,d.fcamount* a.fckurs AS det_fcamount_x,
IFNULL(a.fcother_costIDR,0) AS fcother_costIDR,
 d.fdgiro_date AS det_fdgiro_date,  d.fdgiro_cliring_date AS det_fdgiro_cliring_date, 
 d.fcother_cost AS det_fcother_cost,   d.fctotal AS det_fcother_cost,
d.fctotal AS det_fctotal,
a.ftcurrency_code AS hdr_ftcurrency_code
FROM txrecap_bank_voucher_hdr a 
INNER JOIN tstransaction_status b ON a.fnstatus=b.fntrans_status_code AND fntrans_group_code=2 
INNER JOIN tlsupplier c ON a.ftsupplier_code=c.ftsupplier_code 
INNER JOIN txrecap_bank_voucher_det1 d ON a.ftcvs_no=d.ftcvs_no 
INNER JOIN (SELECT ftcode AS  ftcoa_code,ftdescription  AS ftcoa_name 
		FROM tlmaster_cast 
		UNION ALL 
		SELECT ftcode AS  ftcoa_code,ftdescription  AS ftcoa_name 
		FROM tlmaster_bank
		) e ON d.ftacc_no=e.ftcoa_code
INNER JOIN tstransaction_status f ON d.fnpayment_method=f.fntrans_status_code AND f.fntrans_group_code = 8 
CROSS JOIN tscompany_info e 
WHERE a.ftcvs_no=$P{trans_no}]]></queryString>

	<field name="hdr_ftcompany_name" class="java.lang.String"/>
	<field name="hdr_ftcvs_no" class="java.lang.String"/>
	<field name="hdr_fdtrans_date" class="java.sql.Date"/>
	<field name="hdr_ftsupplier_name" class="java.lang.String"/>
	<field name="hdr_ftremarks" class="java.lang.String"/>
	<field name="hdr_fcamount" class="java.math.BigDecimal"/>
	<field name="hdr_fttrans_status_name" class="java.lang.String"/>
	<field name="hdr_ftstatus" class="java.lang.String"/>
	<field name="det_ftacc_no" class="java.lang.String"/>
	<field name="det_ftcoa_name" class="java.lang.String"/>
	<field name="hdr_fnpayment_method" class="java.lang.Integer"/>
	<field name="hdr_fcsub_amount" class="java.math.BigDecimal"/>
	<field name="hdr_fcother_cost" class="java.math.BigDecimal"/>
	<field name="hdr_ftjournal_no" class="java.lang.String"/>
	<field name="hdr_fcinvoice_amount" class="java.math.BigDecimal"/>
	<field name="hdr_fckurs" class="java.math.BigDecimal"/>
	<field name="hdr_ftpayment_method" class="java.lang.String"/>
	<field name="det_ftgiro_no" class="java.lang.String"/>
	<field name="det_fcamount" class="java.math.BigDecimal"/>
	<field name="det_fcother_costIDR" class="java.math.BigDecimal"/>
	<field name="det_fctotal" class="java.math.BigDecimal"/>
	<field name="det_fcamount_x" class="java.math.BigDecimal"/>
	<field name="fcother_costIDR" class="java.math.BigDecimal"/>
	<field name="det_fdgiro_date" class="java.sql.Date"/>
	<field name="det_fdgiro_cliring_date" class="java.sql.Date"/>
	<field name="det_fcother_cost" class="java.math.BigDecimal"/>
	<field name="hdr_ftcurrency_code" class="java.lang.String"/>

	<variable name="urut" class="java.lang.Integer" resetType="Group" resetGroup="g_trans_no" calculation="Count">
		<variableExpression><![CDATA[new java.lang.Integer(0)]]></variableExpression>
		<initialValueExpression><![CDATA[new java.lang.Integer(1) ]]></initialValueExpression>
	</variable>

		<group  name="g_trans_no" >
			<groupExpression><![CDATA[$F{hdr_ftcvs_no}]]></groupExpression>
			<groupHeader>
			<band height="0"  isSplitAllowed="true" >
			</band>
			</groupHeader>
			<groupFooter>
			<band height="6"  isSplitAllowed="true" >
				<line direction="TopDown">
					<reportElement
						x="0"
						y="3"
						width="930"
						height="0"
						key="line-3"/>
					<graphicElement stretchType="NoStretch"/>
				</line>
			</band>
			</groupFooter>
		</group>
		<background>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</background>
		<title>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</title>
		<pageHeader>
			<band height="34"  isSplitAllowed="true" >
				<line direction="TopDown">
					<reportElement
						x="0"
						y="5"
						width="930"
						height="0"
						key="line-1"/>
					<graphicElement stretchType="NoStretch"/>
				</line>
				<line direction="TopDown">
					<reportElement
						x="0"
						y="30"
						width="930"
						height="2"
						key="line-2"/>
					<graphicElement stretchType="NoStretch"/>
				</line>
				<staticText>
					<reportElement
						x="2"
						y="8"
						width="24"
						height="20"
						key="staticText-13"/>
					<box></box>
					<textElement textAlignment="Left">
						<font fontName="Arial" size="17" isStrikeThrough="false" />
					</textElement>
				<text><![CDATA[No.]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="33"
						y="8"
						width="197"
						height="20"
						key="staticText-14"/>
					<box></box>
					<textElement textAlignment="Left">
						<font fontName="Arial" size="17" isStrikeThrough="false" />
					</textElement>
				<text><![CDATA[Bank]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="272"
						y="5"
						width="137"
						height="20"
						key="staticText-15"/>
					<box></box>
					<textElement textAlignment="Left">
						<font fontName="Arial" size="17" isStrikeThrough="false" />
					</textElement>
				<text><![CDATA[Payment Method]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="420"
						y="8"
						width="152"
						height="20"
						key="staticText-16"/>
					<box></box>
					<textElement textAlignment="Left">
						<font fontName="Arial" size="17" isStrikeThrough="false" />
					</textElement>
				<text><![CDATA[No. Giro/ Cheque]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="576"
						y="8"
						width="82"
						height="20"
						key="staticText-17"/>
					<box></box>
					<textElement textAlignment="Center">
						<font fontName="Arial" size="17" isStrikeThrough="false" />
					</textElement>
				<text><![CDATA[Tgl. Giro]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="665"
						y="8"
						width="123"
						height="20"
						key="staticText-18"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="17" isStrikeThrough="false" />
					</textElement>
				<text><![CDATA[Biaya IDR]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="801"
						y="8"
						width="130"
						height="20"
						key="staticText-19"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="17" isStrikeThrough="false" />
					</textElement>
				<text><![CDATA[Jumlah]]></text>
				</staticText>
			</band>
		</pageHeader>
		<columnHeader>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</columnHeader>
		<detail>
			<band height="23"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="32"
						y="1"
						width="235"
						height="20"
						key="textField-1"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="17"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{det_ftcoa_name}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="272"
						y="1"
						width="137"
						height="20"
						key="textField-2"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="17"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{hdr_ftpayment_method}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="419"
						y="1"
						width="112"
						height="20"
						key="textField-3"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="17"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{det_ftgiro_no}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="dd-MMM-yyyy" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="559"
						y="1"
						width="113"
						height="20"
						key="textField-4"/>
					<box></box>
					<textElement textAlignment="Center">
						<font fontName="Arial" size="17"/>
					</textElement>
				<textFieldExpression   class="java.util.Date"><![CDATA[$F{det_fdgiro_date}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="677"
						y="1"
						width="111"
						height="20"
						key="textField-5"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="17"/>
					</textElement>
				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$F{det_fcother_costIDR}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="797"
						y="1"
						width="138"
						height="20"
						key="textField-6"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="17"/>
					</textElement>
				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$F{det_fctotal}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="2"
						y="1"
						width="27"
						height="20"
						key="textField-7"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="17"/>
					</textElement>
				<textFieldExpression   class="java.lang.Integer"><![CDATA[$V{urut}]]></textFieldExpression>
				</textField>
			</band>
		</detail>
		<columnFooter>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</columnFooter>
		<pageFooter>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</pageFooter>
		<summary>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</summary>
</jasperReport>
