modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_reports/OutstandingDeposit.jrxml
changeset 10769 8f4f11533d54
child 10772 802557f42def
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_reports/OutstandingDeposit.jrxml	Fri Feb 18 10:58:31 2011 +0100
@@ -0,0 +1,232 @@
+<?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="OutstandingDeposit"
+		 columnCount="1"
+		 printOrder="Vertical"
+		 orientation="Portrait"
+		 pageWidth="535"
+		 pageHeight="802"
+		 columnWidth="535"
+		 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="finReconID" isForPrompting="false" class="java.lang.String">
+		<defaultValueExpression ><![CDATA["FF8081812871C0C30128720A2FD50011"]]></defaultValueExpression>
+	</parameter>
+	<queryString><![CDATA[SELECT RECON.FIN_RECONCILIATION_ID,RECON.DATETO, BP.NAME AS BPARTNER, TO_CHAR(PMT.DOCUMENTNO) AS REF2, 
+COALESCE(sum(TRX.DEPOSITAMT), 0) AS DEPOSITAMT 
+FROM FIN_RECONCILIATION RECON, FIN_FINACC_TRANSACTION TRX,
+FIN_PAYMENT PMT INNER JOIN C_BPARTNER BP ON BP.C_BPARTNER_ID = PMT.C_BPARTNER_ID 
+WHERE TRX.FIN_RECONCILIATION_ID IS NULL 
+AND PMT.FIN_PAYMENT_ID = TRX.FIN_PAYMENT_ID 
+AND TRX.DEPOSITAMT > 0
+AND TRX.STATEMENTDATE <= RECON.DATETO 
+AND RECON.FIN_RECONCILIATION_ID = $P{finReconID}
+GROUP BY RECON.FIN_RECONCILIATION_ID,RECON.DATETO, BP.NAME,PMT.DOCUMENTNO
+UNION
+SELECT RECON.FIN_RECONCILIATION_ID,RECON.DATETO, GL.NAME AS BPARTNER, '' AS REF2, 
+COALESCE(sum(TRX.DEPOSITAMT), 0) AS DEPOSITAMT 
+FROM FIN_RECONCILIATION RECON, FIN_FINACC_TRANSACTION TRX,
+C_GLITEM GL
+WHERE TRX.FIN_RECONCILIATION_ID IS NULL 
+AND GL.C_GLITEM_ID = TRX.C_GLITEM_ID
+AND TRX.DEPOSITAMT > 0
+AND TRX.STATEMENTDATE <= RECON.DATETO 
+AND RECON.FIN_RECONCILIATION_ID = $P{finReconID}
+GROUP BY RECON.FIN_RECONCILIATION_ID,RECON.DATETO, GL.NAME
+UNION
+SELECT RECON.FIN_RECONCILIATION_ID,RECON.DATETO, TRX.DESCRIPTION AS BPARTNER, '' AS REF2, 
+COALESCE(sum(TRX.DEPOSITAMT), 0) AS DEPOSITAMT 
+FROM FIN_RECONCILIATION RECON, FIN_FINACC_TRANSACTION TRX
+WHERE TRX.FIN_RECONCILIATION_ID IS NULL 
+AND TRX.C_GLITEM_ID IS NULL AND FIN_PAYMENT_ID IS NULL
+AND TRX.STATEMENTDATE <= RECON.DATETO
+AND TRX.DEPOSITAMT > 0
+AND RECON.FIN_RECONCILIATION_ID = $P{finReconID}
+GROUP BY RECON.FIN_RECONCILIATION_ID,RECON.DATETO, TRX.DESCRIPTION]]></queryString>
+
+	<field name="FIN_RECONCILIATION_ID" class="java.lang.String"/>
+	<field name="DATETO" class="java.util.Date"/>
+	<field name="BPARTNER" class="java.lang.String"/>
+	<field name="REF2" class="java.lang.String"/>
+	<field name="DEPOSITAMT" class="java.math.BigDecimal"/>
+
+	<variable name="TOTALDEPAMT" class="java.math.BigDecimal" resetType="Report" calculation="Sum">
+		<variableExpression><![CDATA[$F{DEPOSITAMT}]]></variableExpression>
+	</variable>
+
+		<group  name="Total" >
+			<groupExpression><![CDATA[$F{FIN_RECONCILIATION_ID}]]></groupExpression>
+			<groupHeader>
+			<band height="0"  isSplitAllowed="true" >
+			</band>
+			</groupHeader>
+			<groupFooter>
+			<band height="28"  isSplitAllowed="true" >
+				<line direction="BottomUp">
+					<reportElement
+						x="4"
+						y="2"
+						width="520"
+						height="0"
+						forecolor="#000000"
+						key="line"/>
+					<graphicElement stretchType="NoStretch">
+					<pen lineWidth="0.25" lineStyle="Solid"/>
+</graphicElement>
+				</line>
+				<textField isStretchWithOverflow="true" pattern="###0.00" isBlankWhenNull="true" evaluationTime="Auto" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="437"
+						y="6"
+						width="84"
+						height="15"
+						key="textField-1"/>
+					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+					<bottomPen lineWidth="0.0" lineColor="#000000"/>
+					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+</box>
+					<textElement textAlignment="Right">
+						<font/>
+					</textElement>
+				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$V{TOTALDEPAMT}]]></textFieldExpression>
+				</textField>
+				<staticText>
+					<reportElement
+						x="47"
+						y="6"
+						width="169"
+						height="14"
+						key="staticText-1"/>
+					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+					<bottomPen lineWidth="0.0" lineColor="#000000"/>
+					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+</box>
+					<textElement>
+						<font isBold="true"/>
+					</textElement>
+				<text><![CDATA[Total Outstanding Deposits]]></text>
+				</staticText>
+			</band>
+			</groupFooter>
+		</group>
+		<background>
+			<band height="0"  isSplitAllowed="true" >
+			</band>
+		</background>
+		<title>
+			<band height="0"  isSplitAllowed="true" >
+			</band>
+		</title>
+		<pageHeader>
+			<band height="0"  isSplitAllowed="true" >
+			</band>
+		</pageHeader>
+		<columnHeader>
+			<band height="0"  isSplitAllowed="true" >
+			</band>
+		</columnHeader>
+		<detail>
+			<band height="22"  isSplitAllowed="true" >
+				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="5"
+						y="4"
+						width="80"
+						height="16"
+						forecolor="#000000"
+						key="textField"/>
+					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+					<bottomPen lineWidth="0.0" lineColor="#000000"/>
+					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+</box>
+					<textElement textAlignment="Left" verticalAlignment="Top">
+						<font size="10" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
+					</textElement>
+				<textFieldExpression   class="java.util.Date"><![CDATA[$F{DATETO}]]></textFieldExpression>
+				</textField>
+				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="87"
+						y="4"
+						width="213"
+						height="16"
+						forecolor="#000000"
+						key="textField"/>
+					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+					<bottomPen lineWidth="0.0" lineColor="#000000"/>
+					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+</box>
+					<textElement verticalAlignment="Top">
+						<font size="10" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
+					</textElement>
+				<textFieldExpression   class="java.lang.String"><![CDATA[$F{BPARTNER}]]></textFieldExpression>
+				</textField>
+				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="306"
+						y="4"
+						width="124"
+						height="16"
+						forecolor="#000000"
+						key="textField"/>
+					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+					<bottomPen lineWidth="0.0" lineColor="#000000"/>
+					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+</box>
+					<textElement textAlignment="Center" verticalAlignment="Top">
+						<font size="10" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
+					</textElement>
+				<textFieldExpression   class="java.lang.String"><![CDATA[$F{REF2}]]></textFieldExpression>
+				</textField>
+				<textField isStretchWithOverflow="false" pattern="###0.00" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
+					<reportElement
+						x="437"
+						y="4"
+						width="84"
+						height="16"
+						forecolor="#000000"
+						key="textField"/>
+					<box>					<topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+					<leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+					<bottomPen lineWidth="0.0" lineColor="#000000"/>
+					<rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/>
+</box>
+					<textElement textAlignment="Right" verticalAlignment="Top">
+						<font size="10" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" isStrikeThrough="false" />
+					</textElement>
+				<textFieldExpression   class="java.math.BigDecimal"><![CDATA[$F{DEPOSITAMT}]]></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>