Fixed bug [ 1965345 ] The sumatory on in th Invoice Taxes Report is wrong.
authorEduardo Argal <eduardo.argal@openbravo.com>
Tue, 03 Jun 2008 09:26:21 +0000
changeset 1103 e7244ff427e5
parent 1102 d24a59b98fbb
child 1104 d742b8349bfe
Fixed bug [ 1965345 ] The sumatory on in th Invoice Taxes Report is wrong.
Reviewwed all the .jrxml to remove float fields...
src/org/openbravo/erpCommon/ad_reports/ReportProjectProfitabilityJR.jrxml
src/org/openbravo/erpCommon/ad_reports/ReportWorkRequirementJR.jrxml
--- a/src/org/openbravo/erpCommon/ad_reports/ReportProjectProfitabilityJR.jrxml	Tue Jun 03 09:20:02 2008 +0000
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportProjectProfitabilityJR.jrxml	Tue Jun 03 09:26:21 2008 +0000
@@ -951,8 +951,8 @@
 						<font fontName="Bitstream Vera Sans" size="8"/>
 					</textElement>
 				<textFieldExpression   class="java.lang.String"><![CDATA[$V{PlanTotalRevenue}.intValue()==0?
-	$P{NUMBERFORMAT}.format(new Float(0.0)):
-	$P{NUMBERFORMAT}.format(new Float($V{PlanGrossMarginNet}.floatValue()/ $V{PlanTotalRevenue}.floatValue()*100))]]></textFieldExpression>
+	$P{NUMBERFORMAT}.format(new BigDecimal("0.00")):
+	$P{NUMBERFORMAT}.format($V{PlanGrossMarginNet}.divide($V{PlanTotalRevenue},4).multiply(new BigDecimal("100.00")))]]></textFieldExpression>
 				</textField>
 				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
 					<reportElement
@@ -1064,7 +1064,9 @@
 					<textElement textAlignment="Right">
 						<font fontName="Bitstream Vera Sans" size="8"/>
 					</textElement>
-				<textFieldExpression   class="java.lang.String"><![CDATA[($V{RealTotalRevenue}.intValue()==0)?$P{NUMBERFORMAT}.format(new Float(0.0)):$P{NUMBERFORMAT}.format(new Float($V{RealGrossMarginNet}.floatValue()/ $V{RealTotalRevenue}.floatValue()*100))]]></textFieldExpression>
+				<textFieldExpression   class="java.lang.String"><![CDATA[($V{RealTotalRevenue}.intValue()==0)?
+$P{NUMBERFORMAT}.format(new BigDecimal("0.00")):
+$P{NUMBERFORMAT}.format($V{RealGrossMarginNet}.divide($V{RealTotalRevenue},4).multiply(new BigDecimal("100.00")))]]></textFieldExpression>
 				</textField>
 				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
 					<reportElement
@@ -1243,8 +1245,8 @@
 						<font fontName="Bitstream Vera Sans" size="8"/>
 					</textElement>
 				<textFieldExpression   class="java.lang.String"><![CDATA[($V{PLANREVENUETOTAL}.intValue()==0)?
-   $P{NUMBERFORMAT}.format(new Float(0.0)):
-   $P{NUMBERFORMAT}.format(new Float($V{PLANSERNETMARGINTOTAL}.floatValue() / $V{PLANREVENUETOTAL}.floatValue()*100.0))]]></textFieldExpression>
+   $P{NUMBERFORMAT}.format(new BigDecimal("0.00")):
+   $P{NUMBERFORMAT}.format($V{PLANSERNETMARGINTOTAL}.divide($V{PLANREVENUETOTAL},4).multiply(new BigDecimal("100.00")))]]></textFieldExpression>
 				</textField>
 				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
 					<reportElement
@@ -1284,8 +1286,8 @@
 						<font fontName="Bitstream Vera Sans" size="8"/>
 					</textElement>
 				<textFieldExpression   class="java.lang.String"><![CDATA[($V{PLANREINVOINCINGTOTAL}.intValue()==0)?
-   $P{NUMBERFORMAT}.format(new Float(0.0)):
-   $P{NUMBERFORMAT}.format(new Float($V{PLANSERNETREINVOINCINGTOTAL}.floatValue() / $V{PLANREINVOINCINGTOTAL}.floatValue()*100.0))]]></textFieldExpression>
+   $P{NUMBERFORMAT}.format(new BigDecimal("0.00")):
+   $P{NUMBERFORMAT}.format($V{PLANSERNETREINVOINCINGTOTAL}.divide($V{PLANREINVOINCINGTOTAL},4).multiply(new BigDecimal("100.00")))]]></textFieldExpression>
 				</textField>
 				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
 					<reportElement
@@ -1332,8 +1334,8 @@
 						<font fontName="Bitstream Vera Sans" size="8"/>
 					</textElement>
 				<textFieldExpression   class="java.lang.String"><![CDATA[($V{PLANTOTALREVENUETOTAL}.intValue()==0)?
-  $P{NUMBERFORMAT}.format(new Float(0.0)):
-  $P{NUMBERFORMAT}.format(new Float($V{PLANCROSSMARGINNETTOAL}.floatValue()/ $V{PLANTOTALREVENUETOTAL}.floatValue()*100))]]></textFieldExpression>
+  $P{NUMBERFORMAT}.format(new BigDecimal("0.00")):
+  $P{NUMBERFORMAT}.format($V{PLANCROSSMARGINNETTOAL}.divide($V{PLANTOTALREVENUETOTAL},4).multiply(new BigDecimal("100.00")))]]></textFieldExpression>
 				</textField>
 				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
 					<reportElement
@@ -1376,8 +1378,8 @@
 						<font fontName="Bitstream Vera Sans" size="8"/>
 					</textElement>
 				<textFieldExpression   class="java.lang.String"><![CDATA[($V{REALREVENUETOTAL}.intValue()==0)?
-  $P{NUMBERFORMAT}.format(new Float(0.0)):
-  $P{NUMBERFORMAT}.format(new Float($V{REALSERNETMARGINTOTAL}.floatValue() / $V{REALREVENUETOTAL}.floatValue() *100.0))]]></textFieldExpression>
+  $P{NUMBERFORMAT}.format(new BigDecimal("0.00")):
+  $P{NUMBERFORMAT}.format($V{REALSERNETMARGINTOTAL}.divide($V{REALREVENUETOTAL},4).multiply(new BigDecimal("100.00")))]]></textFieldExpression>
 				</textField>
 				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
 					<reportElement
@@ -1420,8 +1422,8 @@
 						<font fontName="Bitstream Vera Sans" size="8"/>
 					</textElement>
 				<textFieldExpression   class="java.lang.String"><![CDATA[($V{REALREINVOINCINGTOTAL}.intValue()==0)?
-   $P{NUMBERFORMAT}.format(new Float(0.0)):
-   $P{NUMBERFORMAT}.format(new Float($V{REALSERNETREINVOINCINGTOTAL}.floatValue() / $V{REALREINVOINCINGTOTAL}.floatValue() * 100.0))]]></textFieldExpression>
+   $P{NUMBERFORMAT}.format(new BigDecimal("0.00")):
+   $P{NUMBERFORMAT}.format($V{REALSERNETREINVOINCINGTOTAL}.divide($V{REALREINVOINCINGTOTAL},4).multiply(new BigDecimal("100.00")))]]></textFieldExpression>
 				</textField>
 				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
 					<reportElement
@@ -1450,8 +1452,8 @@
 						<font fontName="Bitstream Vera Sans" size="8"/>
 					</textElement>
 				<textFieldExpression   class="java.lang.String"><![CDATA[($V{REALTOTALREVENUETOTAL}.intValue()==0)?
-  	$P{NUMBERFORMAT}.format(new Float(0.0)):
-	$P{NUMBERFORMAT}.format(new Float($V{REALGROSSMARGINNETTOTAL}.floatValue()/ $V{REALTOTALREVENUETOTAL}.floatValue()*100))]]></textFieldExpression>
+  	$P{NUMBERFORMAT}.format(new BigDecimal(0.0)):
+	$P{NUMBERFORMAT}.format($V{REALGROSSMARGINNETTOTAL}.divide($V{REALTOTALREVENUETOTAL},4).multiply(new BigDecimal("100.00")))]]></textFieldExpression>
 				</textField>
 				<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None"  hyperlinkTarget="Self" >
 					<reportElement
--- a/src/org/openbravo/erpCommon/ad_reports/ReportWorkRequirementJR.jrxml	Tue Jun 03 09:20:02 2008 +0000
+++ b/src/org/openbravo/erpCommon/ad_reports/ReportWorkRequirementJR.jrxml	Tue Jun 03 09:26:21 2008 +0000
@@ -182,7 +182,7 @@
 	>
 
 		<conditionalStyle>
-			<conditionExpression><![CDATA[new Boolean($F{NEEDED}.floatValue()>$F{STOCK}.add($F{INPROCESS}).floatValue())]]></conditionExpression>
+			<conditionExpression><![CDATA[new Boolean($F{NEEDED}.compareTo($F{STOCK}.add($F{INPROCESS}))>1)]]></conditionExpression>
 			<style 
 				isDefault="false"
 				forecolor="#FF0000"