<?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="report04_kartu_piutang"
		 columnCount="1"
		 printOrder="Vertical"
		 orientation="Portrait"
		 pageWidth="935"
		 pageHeight="1275"
		 columnWidth="935"
		 columnSpacing="0"
		 leftMargin="0"
		 rightMargin="0"
		 topMargin="0"
		 bottomMargin="0"
		 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 spfreport05_kartu_hutang($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="ftpurchase_invoice_no" class="java.lang.String"/>
	<field name="ftstock_in_no" class="java.lang.String"/>
	<field name="ftacc_no" class="java.lang.String"/>
	<field name="ftacc_no_desc" class="java.lang.String"/>
	<field name="fdgiro_date" class="java.sql.Date"/>
	<field name="fcdebit" class="java.math.BigDecimal"/>
	<field name="ftpayment_method" class="java.lang.String"/>
	<field name="ftreff_no" class="java.lang.String"/>
	<field name="fccredit" class="java.math.BigDecimal"/>
	<field name="fcsaldo" class="java.math.BigDecimal"/>
	<field name="ftcurrency_code" class="java.lang.String"/>
	<field name="fcamount_curr" class="java.math.BigDecimal"/>

	<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.math.BigDecimal" 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="25"  isSplitAllowed="true" >
				<staticText>
					<reportElement
						x="2"
						y="4"
						width="64"
						height="17"
						key="staticText-2"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="11"/>
					</textElement>
				<text><![CDATA[Supplier :]]></text>
				</staticText>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="73"
						y="4"
						width="228"
						height="18"
						key="textField"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="11"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{ftsupplier_name}]]></textFieldExpression>
				</textField>
				<line direction="TopDown">
					<reportElement
						x="0"
						y="24"
						width="285"
						height="1"
						key="line-4"/>
					<graphicElement stretchType="NoStretch"/>
				</line>
			</band>
			</groupHeader>
			<groupFooter>
			<band height="25"  isSplitAllowed="true" >
				<line direction="TopDown">
					<reportElement
						x="0"
						y="3"
						width="932"
						height="1"
						key="line-5"/>
					<graphicElement stretchType="NoStretch"/>
				</line>
				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="563"
						y="5"
						width="108"
						height="20"
						key="textField-10"/>
					<box></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="673"
						y="5"
						width="114"
						height="20"
						key="textField-11"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="11"/>
					</textElement>
				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$V{vtotal_credit}]]></textFieldExpression>
				</textField>
			</band>
			</groupFooter>
		</group>
		<background>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</background>
		<title>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</title>
		<pageHeader>
			<band height="74"  isSplitAllowed="true" >
				<staticText>
					<reportElement
						x="292"
						y="4"
						width="291"
						height="21"
						key="staticText-1"/>
					<box></box>
					<textElement textAlignment="Center">
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="12" isBold="true"/>
					</textElement>
				<text><![CDATA[KARTU HUTANG]]></text>
				</staticText>
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="2"
						y="4"
						width="173"
						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="1"
						y="28"
						width="92"
						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="99"
						y="28"
						width="92"
						height="18"
						key="textField-1"/>
					<box></box>
					<textElement>
						<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="216"
						y="28"
						width="100"
						height="18"
						key="textField-2"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="11"/>
					</textElement>
				<textFieldExpression   class="java.util.Date"><![CDATA[$P{date_end}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement
						x="191"
						y="28"
						width="25"
						height="18"
						key="staticText-4"/>
					<box></box>
					<textElement textAlignment="Center">
						<font fontName="Arial" size="11"/>
					</textElement>
				<text><![CDATA[s/d]]></text>
				</staticText>
				<line direction="TopDown">
					<reportElement
						x="0"
						y="46"
						width="930"
						height="1"
						key="line-1"/>
					<graphicElement stretchType="NoStretch"/>
				</line>
				<line direction="TopDown">
					<reportElement
						x="0"
						y="71"
						width="932"
						height="0"
						key="line-2"/>
					<graphicElement stretchType="NoStretch"/>
				</line>
				<staticText>
					<reportElement
						x="2"
						y="51"
						width="24"
						height="16"
						key="staticText-5"/>
					<box></box>
					<textElement>
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="11" isBold="true"/>
					</textElement>
				<text><![CDATA[NO.]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="27"
						y="51"
						width="66"
						height="16"
						key="staticText-6"/>
					<box></box>
					<textElement textAlignment="Center">
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="11" isBold="true"/>
					</textElement>
				<text><![CDATA[Tanggal]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="94"
						y="51"
						width="112"
						height="16"
						key="staticText-8"/>
					<box></box>
					<textElement>
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="11" isBold="true"/>
					</textElement>
				<text><![CDATA[No Transaksi]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="207"
						y="51"
						width="106"
						height="16"
						key="staticText-10"/>
					<box></box>
					<textElement>
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="11" isBold="true"/>
					</textElement>
				<text><![CDATA[Uraian]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="402"
						y="51"
						width="68"
						height="16"
						key="staticText-11"/>
					<box></box>
					<textElement textAlignment="Center">
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="11" isBold="true"/>
					</textElement>
				<text><![CDATA[Tgl. Giro]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="314"
						y="51"
						width="86"
						height="16"
						key="staticText-12"/>
					<box></box>
					<textElement>
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="11" isBold="true"/>
					</textElement>
				<text><![CDATA[Metode Bayar]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="562"
						y="51"
						width="108"
						height="16"
						key="staticText-13"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="11" isBold="true"/>
					</textElement>
				<text><![CDATA[Debet]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="672"
						y="50"
						width="114"
						height="18"
						key="staticText-14"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="11" isBold="true"/>
					</textElement>
				<text><![CDATA[Kredit]]></text>
				</staticText>
				<staticText>
					<reportElement
						x="788"
						y="50"
						width="143"
						height="18"
						key="staticText-15"/>
					<box></box>
					<textElement textAlignment="Right">
						<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="730"
						y="4"
						width="100"
						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="830"
						y="4"
						width="100"
						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="471"
						y="51"
						width="90"
						height="16"
						key="staticText-16"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" pdfFontName="Helvetica-Bold" size="11" isBold="true"/>
					</textElement>
				<text><![CDATA[Amount]]></text>
				</staticText>
			</band>
		</pageHeader>
		<columnHeader>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</columnHeader>
		<detail>
			<band height="22"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="2"
						y="4"
						width="24"
						height="18"
						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="27"
						y="4"
						width="66"
						height="18"
						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="94"
						y="4"
						width="112"
						height="18"
						key="textField"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="11"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{ftpurchase_invoice_no}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="563"
						y="3"
						width="108"
						height="18"
						key="textField">
							<printWhenExpression><![CDATA[($F{ftacc_no_desc}).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="207"
						y="4"
						width="106"
						height="18"
						key="textField"
						stretchType="RelativeToBandHeight"
						isPrintWhenDetailOverflows="true"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="11"/>
					</textElement>
				<textFieldExpression   class="java.lang.String"><![CDATA[$F{ftacc_no_desc}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="314"
						y="4"
						width="86"
						height="18"
						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="dd-MMM-yy" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="402"
						y="4"
						width="68"
						height="18"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Center">
						<font fontName="Arial" size="11"/>
					</textElement>
				<textFieldExpression   class="java.util.Date"><![CDATA[$F{fdgiro_date}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="673"
						y="3"
						width="114"
						height="18"
						key="textField">
							<printWhenExpression><![CDATA[($F{ftacc_no_desc}).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="788"
						y="3"
						width="143"
						height="18"
						key="textField"/>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="11"/>
					</textElement>
				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$V{saldo}]]></textFieldExpression>
				</textField>
				<textField isStretchWithOverflow="false" pattern="#,##0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="471"
						y="3"
						width="62"
						height="18"
						key="textField-9">
							<printWhenExpression><![CDATA[new Boolean($F{fcamount_curr}.doubleValue()>0)]]></printWhenExpression>
						</reportElement>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" size="11"/>
					</textElement>
				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$F{fcamount_curr}]]></textFieldExpression>
				</textField>
				<staticText>
					<reportElement
						x="534"
						y="3"
						width="28"
						height="18"
						key="staticText-17">
							<printWhenExpression><![CDATA[new Boolean($F{fcamount_curr}.doubleValue()>0)]]></printWhenExpression>
						</reportElement>
					<box></box>
					<textElement textAlignment="Right">
						<font fontName="Arial" pdfFontName="Helvetica" size="11" isBold="false"/>
					</textElement>
				<text><![CDATA[USD]]></text>
				</staticText>
			</band>
		</detail>
		<columnFooter>
			<band height="0"  isSplitAllowed="true" >
			</band>
		</columnFooter>
		<pageFooter>
			<band height="28"  isSplitAllowed="true" >
				<textField isStretchWithOverflow="false" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
					<reportElement
						x="638"
						y="6"
						width="100"
						height="18"
						key="textField-7"/>
					<box></box>
					<textElement>
						<font fontName="Arial" size="11"/>
					</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="741"
						y="6"
						width="189"
						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>
