<?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="report47_uang_muka_pembelian"
		 columnCount="1"
		 printOrder="Vertical"
		 orientation="Portrait"
		 pageWidth="940"
		 pageHeight="1275"
		 columnWidth="930"
		 columnSpacing="0"
		 leftMargin="5"
		 rightMargin="5"
		 topMargin="5"
		 bottomMargin="5"
		 whenNoDataType="NoPages"
		 isTitleNewPage="false"
		 isSummaryNewPage="false">
	<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="date_from" isForPrompting="true" class="java.util.Date"/>
	<parameter name="date_end" isForPrompting="true" class="java.util.Date"/>
	<parameter name="supplier_code" isForPrompting="true" class="java.lang.String"/>
	<parameter name="username" isForPrompting="true" class="java.lang.String"/>
	<queryString><![CDATA[call spfreport47_uang_muka_pembelian($P{supplier_code},$P{date_from},$P{date_end})]]></queryString>

	<field name="fttype" class="java.lang.String"/>
	<field name="ftcompany_name" class="java.lang.String"/>
	<field name="ftsupplier_code" class="java.lang.String"/>
	<field name="ftsupplier_name" class="java.lang.String"/>
	<field name="fdtrans_date" class="java.sql.Date"/>
	<field name="fttrans_no" class="java.lang.String"/>
	<field name="ftreference_no" class="java.lang.String"/>
	<field name="ftpayment_method" class="java.lang.String"/>
	<field name="ftgiro_no" class="java.lang.String"/>
	<field name="ftcurrency_code" class="java.lang.String"/>
	<field name="fcrate" class="java.lang.String"/>
	<field name="fcamount" class="java.lang.String"/>
	<field name="fccredit" class="java.math.BigDecimal"/>
	<field name="fcdebit" class="java.math.BigDecimal"/>
	<field name="fcsaldo" class="java.lang.Double"/>
	<field name="ftremarks" class="java.lang.String"/>

	<sortField name="ftsupplier_code" />
	<sortField name="fttype" />
	<sortField name="fdtrans_date" />

	<variable name="urut" class="java.lang.Integer" resetType="Group" resetGroup="g_ftsupplier_code" calculation="Count">
		<variableExpression><![CDATA[new java.lang.Integer(0) ]]></variableExpression>
		<initialValueExpression><![CDATA[new java.lang.Integer(1) ]]></initialValueExpression>
	</variable>
	<variable name="saldo" class="java.lang.Double" resetType="Group" resetGroup="g_ftsupplier_code" calculation="Sum">
		<variableExpression><![CDATA[$F{fcsaldo}]]></variableExpression>
	</variable>
	<variable name="vtotal_debet" class="java.math.BigDecimal" resetType="Group" resetGroup="g_ftsupplier_code" calculation="Sum">
		<variableExpression><![CDATA[$F{fcdebit}]]></variableExpression>
	</variable>
	<variable name="vtotal_credit" class="java.math.BigDecimal" resetType="Group" resetGroup="g_ftsupplier_code" calculation="Sum">
		<variableExpression><![CDATA[$F{fccredit}]]></variableExpression>
	</variable>

		<group  name="g_ftsupplier_code" >
			<groupExpression><![CDATA[$F{ftsupplier_code}]]></groupExpression>
			<groupHeader>
			<band height="20"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="0"
						y="0"
						width="350"
						height="20"
						key="textField"/>
					<box>					<bottomPen lineWidth="0.5" lineStyle="Solid"/>
</box>
					<textElement verticalAlignment="Middle">
						<font fontName="Arial" size="11"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{ftsupplier_name}]]></textFieldExpression>
				</textField>
			</band>
			</groupHeader>
			<groupFooter>
			<band height="30"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="0"
						y="0"
						width="705"
						height="30"
						key="textField"/>
					<box>					<topPen lineWidth="0.5" lineStyle="Solid"/>
</box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="11"/>
					</textElement>
				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$V{vtotal_debet}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="705"
						y="0"
						width="110"
						height="30"
						key="textField-10"/>
					<box>					<topPen lineWidth="0.5" lineStyle="Solid"/>
</box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="11"/>
					</textElement>
				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$V{vtotal_credit}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="true" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="815"
						y="0"
						width="110"
						height="30"
						key="textField-11"
						stretchType="RelativeToBandHeight"
						isPrintWhenDetailOverflows="true"/>
					<box>					<topPen lineWidth="0.5" lineStyle="Solid"/>
</box>
					<textElement>
						<font fontName="Arial" size="11"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[]]></textFieldExpression>
				</textField>
			</band>
			</groupFooter>
		</group>
		<background>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</background>
		<title>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</title>
		<pageHeader>
			<band height="76"  isSplitAllowed="true" >
				<staticText>
					<reportElement
						x="0"
						y="18"
						width="925"
						height="20"
						key="staticText-1"/>
					<box></box>
					<textElement textAlignment="Center" verticalAlignment="Middle">
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="12" isBold="true"/>
					</textElement>
				<text><![CDATA[UANG MUKA PEMBELIAN]]></text>
				</staticText>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="0"
						y="0"
						width="705"
						height="18"
						key="textField"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="11"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{ftcompany_name}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement
						x="0"
						y="38"
						width="110"
						height="18"
						key="staticText-3"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="11"/>
					</textElement>
				<text><![CDATA[Periode transaksi : ]]></text>
				</staticText>
				<textField isStretchWithOverflow="false" pattern="dd-MMM-yyyy" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="110"
						y="38"
						width="90"
						height="18"
						key="textField-1"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="11"/>
					</textElement>
				<textFieldExpression   class="java.util.Date"><![CDATA[$P{date_from}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="dd-MMM-yyyy" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="200"
						y="38"
						width="90"
						height="18"
						key="textField-2"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="11"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[" s/d " + new SimpleDateFormat("dd-MMM-yyyy").format($P{date_end})]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement
						x="0"
						y="56"
						width="30"
						height="20"
						key="staticText-5"/>
					<box>					<pen lineWidth="0.5" lineStyle="Solid"/>
					<topPen lineWidth="0.5" lineStyle="Solid"/>
					<leftPen lineWidth="0.0" lineStyle="Solid"/>
					<bottomPen lineWidth="0.5" lineStyle="Solid"/>
					<rightPen lineWidth="0.0" lineStyle="Solid"/>
</box>
					<textElement verticalAlignment="Middle">
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="11" isBold="true"/>
					</textElement>
				<text><![CDATA[No.]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="30"
						y="56"
						width="80"
						height="20"
						key="staticText-6"/>
					<box>					<pen lineWidth="0.5" lineStyle="Solid"/>
					<topPen lineWidth="0.5" lineStyle="Solid"/>
					<leftPen lineWidth="0.0" lineStyle="Solid"/>
					<bottomPen lineWidth="0.5" lineStyle="Solid"/>
					<rightPen lineWidth="0.0" lineStyle="Solid"/>
</box>
					<textElement textAlignment="Center" verticalAlignment="Middle">
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="11" isBold="true"/>
					</textElement>
				<text><![CDATA[Tanggal]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="110"
						y="56"
						width="90"
						height="20"
						key="staticText-8"/>
					<box>					<pen lineWidth="0.5" lineStyle="Solid"/>
					<topPen lineWidth="0.5" lineStyle="Solid"/>
					<leftPen lineWidth="0.0" lineStyle="Solid"/>
					<bottomPen lineWidth="0.5" lineStyle="Solid"/>
					<rightPen lineWidth="0.0" lineStyle="Solid"/>
</box>
					<textElement verticalAlignment="Middle">
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="11" isBold="true"/>
					</textElement>
				<text><![CDATA[No Uang Muka]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="200"
						y="56"
						width="90"
						height="20"
						key="staticText-10"/>
					<box>					<pen lineWidth="0.5" lineStyle="Solid"/>
					<topPen lineWidth="0.5" lineStyle="Solid"/>
					<leftPen lineWidth="0.0" lineStyle="Solid"/>
					<bottomPen lineWidth="0.5" lineStyle="Solid"/>
					<rightPen lineWidth="0.0" lineStyle="Solid"/>
</box>
					<textElement verticalAlignment="Middle">
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="11" isBold="true"/>
					</textElement>
				<text><![CDATA[No Transaksi]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="505"
						y="56"
						width="90"
						height="20"
						key="staticText-11"/>
					<box>					<pen lineWidth="0.5" lineStyle="Solid"/>
					<topPen lineWidth="0.5" lineStyle="Solid"/>
					<leftPen lineWidth="0.0" lineStyle="Solid"/>
					<bottomPen lineWidth="0.5" lineStyle="Solid"/>
					<rightPen lineWidth="0.0" lineStyle="Solid"/>
</box>
					<textElement textAlignment="Left" verticalAlignment="Middle">
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="11" isBold="true"/>
					</textElement>
				<text><![CDATA[No Reff]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="405"
						y="56"
						width="100"
						height="20"
						key="staticText-12"/>
					<box>					<pen lineWidth="0.5" lineStyle="Solid"/>
					<topPen lineWidth="0.5" lineStyle="Solid"/>
					<leftPen lineWidth="0.0" lineStyle="Solid"/>
					<bottomPen lineWidth="0.5" lineStyle="Solid"/>
					<rightPen lineWidth="0.0" lineStyle="Solid"/>
</box>
					<textElement verticalAlignment="Middle">
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="11" isBold="true"/>
					</textElement>
				<text><![CDATA[Metode]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="595"
						y="56"
						width="110"
						height="20"
						key="staticText-13"/>
					<box>					<pen lineWidth="0.5" lineStyle="Solid"/>
					<topPen lineWidth="0.5" lineStyle="Solid"/>
					<leftPen lineWidth="0.0" lineStyle="Solid"/>
					<bottomPen lineWidth="0.5" lineStyle="Solid"/>
					<rightPen lineWidth="0.0" lineStyle="Solid"/>
</box>
					<textElement textAlignment="Right" verticalAlignment="Middle">
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="11" isBold="true"/>
					</textElement>
				<text><![CDATA[Debet]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="705"
						y="56"
						width="110"
						height="20"
						key="staticText-14"/>
					<box>					<pen lineWidth="0.5" lineStyle="Solid"/>
					<topPen lineWidth="0.5" lineStyle="Solid"/>
					<leftPen lineWidth="0.0" lineStyle="Solid"/>
					<bottomPen lineWidth="0.5" lineStyle="Solid"/>
					<rightPen lineWidth="0.0" lineStyle="Solid"/>
</box>
					<textElement textAlignment="Right" verticalAlignment="Middle">
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="11" isBold="true"/>
					</textElement>
				<text><![CDATA[Kredit]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="815"
						y="56"
						width="110"
						height="20"
						key="staticText-15"/>
					<box>					<pen lineWidth="0.5" lineStyle="Solid"/>
					<topPen lineWidth="0.5" lineStyle="Solid"/>
					<leftPen lineWidth="0.0" lineStyle="Solid"/>
					<bottomPen lineWidth="0.5" lineStyle="Solid"/>
					<rightPen lineWidth="0.0" lineStyle="Solid"/>
</box>
					<textElement textAlignment="Right" verticalAlignment="Middle">
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="11" isBold="true"/>
					</textElement>
				<text><![CDATA[Saldo]]></text>
				</staticText>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="705"
						y="0"
						width="110"
						height="18"
						key="textField-3"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="11"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA["Page " + $V{PAGE_NUMBER} + " of "]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Report" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="815"
						y="0"
						width="110"
						height="18"
						key="textField-4"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="11"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[" " + $V{PAGE_NUMBER} + ""]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement
						x="290"
						y="56"
						width="115"
						height="20"
						key="staticText-16"/>
					<box>					<pen lineWidth="0.5" lineStyle="Solid"/>
					<topPen lineWidth="0.5" lineStyle="Solid"/>
					<leftPen lineWidth="0.0" lineStyle="Solid"/>
					<bottomPen lineWidth="0.5" lineStyle="Solid"/>
					<rightPen lineWidth="0.0" lineStyle="Solid"/>
</box>
					<textElement verticalAlignment="Middle">
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="11" isBold="true"/>
					</textElement>
				<text><![CDATA[Keterangan]]></text>
				</staticText>
			</band>
		</pageHeader>
		<columnHeader>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</columnHeader>
		<detail>
			<band height="20"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="0"
						y="0"
						width="30"
						height="20"
						key="textField"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="11"/>
					</textElement>
				<textFieldExpression   class="java.lang.Integer"><![CDATA[$V{urut}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="dd-MMM-yy" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="30"
						y="0"
						width="80"
						height="20"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Center">
						<font fontName="Arial" size="11"/>
					</textElement>
				<textFieldExpression   class="java.util.Date"><![CDATA[$F{fdtrans_date}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="110"
						y="0"
						width="90"
						height="20"
						key="textField"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="11"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{fttrans_no}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="595"
						y="0"
						width="110"
						height="20"
						key="textField">
							<printWhenExpression><![CDATA[($F{ftremarks}).equals("SALDO AWAL") ? Boolean.FALSE : Boolean.TRUE]]></printWhenExpression>
						</reportElement>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="11"/>
					</textElement>
				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$F{fcdebit}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="true" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="200"
						y="0"
						width="90"
						height="20"
						key="textField"
						stretchType="RelativeToBandHeight"
						isPrintWhenDetailOverflows="true"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="11"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{ftreference_no}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="405"
						y="0"
						width="100"
						height="20"
						key="textField"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="11"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{ftpayment_method}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="705"
						y="0"
						width="110"
						height="20"
						key="textField">
							<printWhenExpression><![CDATA[($F{ftremarks}).equals("SALDO AWAL") ? Boolean.FALSE : Boolean.TRUE]]></printWhenExpression>
						</reportElement>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="11"/>
					</textElement>
				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$F{fccredit}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="815"
						y="0"
						width="110"
						height="20"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="11"/>
					</textElement>
				<textFieldExpression   class="java.lang.Double"><![CDATA[$V{saldo}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="505"
						y="0"
						width="90"
						height="20"
						key="textField-9"/>
					<box></box>
					<textElement textAlignment="Left">
						<font fontName="Arial" size="11"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{ftgiro_no}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="290"
						y="0"
						width="115"
						height="20"
						key="textField-12"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="11"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{ftremarks}]]></textFieldExpression>
				</textField>
			</band>
		</detail>
		<columnFooter>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</columnFooter>
		<pageFooter>
			<band height="18"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="705"
						y="0"
						width="110"
						height="18"
						key="textField-7"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="11" isItalic="true"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$P{username}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="EEE, d MMM yyyy HH:mm:ss" isBlankWhenNull="false" evaluationTime="Report" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="815"
						y="0"
						width="110"
						height="18"
						key="textField-8"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" pdfFontName="Helvetica-Oblique" size="11" isItalic="true"/>
					</textElement>
				<textFieldExpression   class="java.util.Date"><![CDATA[new java.util.Date()]]></textFieldExpression>
				</textField>
			</band>
		</pageFooter>
		<summary>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</summary>
</jasperReport>
