Update payment report in PDF with changes related to issue 29847
authorCarlos Aristu <carlos.aristu@openbravo.com>
Thu, 14 May 2015 12:43:04 +0200
changeset 26748 47b88136f675
parent 26747 13d27d8950e6
child 26749 5ea02a80a35c
Update payment report in PDF with changes related to issue 29847
modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReportPDF.jrxml
--- a/modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReportPDF.jrxml	Wed May 13 13:57:50 2015 +0200
+++ b/modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReportPDF.jrxml	Thu May 14 12:43:04 2015 +0200
@@ -62,6 +62,9 @@
 	<parameter name="PAYDATETO_SHOW" class="java.lang.String"/>
 	<parameter name="EXPECTEDDATEFROM_SHOW" class="java.lang.String"/>
 	<parameter name="EXPECTEDDATETO_SHOW" class="java.lang.String"/>
+	<parameter name="NUMBERFORMAT" class="java.text.DecimalFormat">
+		<defaultValueExpression><![CDATA[new DecimalFormat()]]></defaultValueExpression>
+	</parameter>
 	<queryString>
 		<![CDATA[SELECT 'hello' AS BP_GROUP, 'hello' AS BPARTNER, 'hello' AS PROJECT, 'hello' AS PAYMENT, 'hello' AS SALES_PERSON, 1234 AS INVOICE_NUMBER, to_Date('01/01/2010') AS INVOICE_DATE,
        to_Date('01/03/2010') AS DUE_DATE, 1234 AS PLANNED_DSO, 1234 AS CURRENT_DSO, 1234 AS OVERDUE, 1234 AS DAYS_OVERDUE, 1234 AS AMOUNT,
@@ -358,18 +361,18 @@
 					<text><![CDATA[Balance:]]></text>
 				</staticText>
 				<textField isBlankWhenNull="true">
-					<reportElement key="textField-19" style="Detail_Header" x="459" y="0" width="33" height="20" uuid="28260af8-a78c-49cc-ab0e-4b741f40e878"/>
+					<reportElement key="textField-19" style="Detail_Header" x="479" y="0" width="37" height="20" uuid="28260af8-a78c-49cc-ab0e-4b741f40e878"/>
 					<textElement textAlignment="Justified">
 						<font fontName="DejaVu Sans" size="10"/>
 					</textElement>
 					<textFieldExpression><![CDATA[$F{BASE_CURRENCY}]]></textFieldExpression>
 				</textField>
 				<textField evaluationTime="Group" evaluationGroup="GroupingCriteria" isBlankWhenNull="true">
-					<reportElement key="textField-19" style="Detail_Header" x="407" y="0" width="52" height="20" uuid="14c1d732-a235-48a4-a8a9-175591e9036f"/>
+					<reportElement key="textField-19" style="Detail_Header" x="407" y="0" width="72" height="20" uuid="14c1d732-a235-48a4-a8a9-175591e9036f"/>
 					<textElement textAlignment="Right">
 						<font fontName="DejaVu Sans" size="10"/>
 					</textElement>
-					<textFieldExpression><![CDATA[($V{SUMBALANCE}!=null)?$V{SUMBALANCE}.toString():new String(" ")]]></textFieldExpression>
+					<textFieldExpression><![CDATA[($V{SUMBALANCE}!=null)?$P{NUMBERFORMAT}.format($V{SUMBALANCE}).toString():new String(" ")]]></textFieldExpression>
 				</textField>
 			</band>
 		</groupHeader>
@@ -570,7 +573,7 @@
 					<textElement textAlignment="Right">
 						<font fontName="DejaVu Sans" size="10"/>
 					</textElement>
-					<textFieldExpression><![CDATA[($V{SUMSUBTOTALSTATUS}!=null)?$V{SUMSUBTOTALSTATUS}.toString():new String(" ")]]></textFieldExpression>
+					<textFieldExpression><![CDATA[($V{SUMSUBTOTALSTATUS}!=null)?$P{NUMBERFORMAT}.format($V{SUMSUBTOTALSTATUS}).toString():new String(" ")]]></textFieldExpression>
 				</textField>
 			</band>
 		</groupFooter>
@@ -816,7 +819,7 @@
 				<textElement textAlignment="Right">
 					<font fontName="DejaVu Sans" size="8"/>
 				</textElement>
-				<textFieldExpression><![CDATA[($F{BASE_AMOUNT}== null ? " " : $F{BASE_AMOUNT}.toString())]]></textFieldExpression>
+				<textFieldExpression><![CDATA[($F{BASE_AMOUNT}== null ? " " : $P{NUMBERFORMAT}.format($F{BASE_AMOUNT}).toString())]]></textFieldExpression>
 			</textField>
 			<textField isBlankWhenNull="false">
 				<reportElement key="textField-14" style="Report_Footer" x="730" y="0" width="50" height="25" uuid="8ead23fc-5822-400a-a0d4-f3195995b556"/>
@@ -831,7 +834,7 @@
 				<textElement textAlignment="Right">
 					<font fontName="DejaVu Sans" size="8"/>
 				</textElement>
-				<textFieldExpression><![CDATA[$F{TRANS_AMOUNT}.toString() + " "]]></textFieldExpression>
+				<textFieldExpression><![CDATA[$P{NUMBERFORMAT}.format($F{TRANS_AMOUNT}).toString() + " "]]></textFieldExpression>
 			</textField>
 			<textField isBlankWhenNull="false">
 				<reportElement key="textField-16" style="Report_Footer" x="593" y="0" width="60" height="25" uuid="2d3d9724-a086-4616-a115-c81b3c23d427"/>