Fix rounding problems with BigDecimal in reports
FEA: ItEr76S25CurrencyManagement
This commit is contained in:
parent
fb241900b7
commit
e84cd7380d
2 changed files with 8 additions and 8 deletions
|
|
@ -94,7 +94,7 @@
|
|||
<textElement textAlignment="Right" verticalAlignment="Middle">
|
||||
<font isBold="true"/>
|
||||
</textElement>
|
||||
<textFieldExpression class="java.lang.String"><![CDATA[$V{sumTotalCosts}.setScale(2) + " " + $P{currencySymbol}]]></textFieldExpression>
|
||||
<textFieldExpression class="java.lang.String"><![CDATA[$V{sumTotalCosts}.setScale(2, RoundingMode.HALF_UP) + " " + $P{currencySymbol}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</groupFooter>
|
||||
|
|
@ -139,7 +139,7 @@
|
|||
<textField isBlankWhenNull="true">
|
||||
<reportElement x="422" y="2" width="119" height="20"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Middle"/>
|
||||
<textFieldExpression class="java.lang.String"><![CDATA[$V{sumCostsPerTask}.setScale(2) + " " + $P{currencySymbol}]]></textFieldExpression>
|
||||
<textFieldExpression class="java.lang.String"><![CDATA[$V{sumCostsPerTask}.setScale(2, RoundingMode.HALF_UP) + " " + $P{currencySymbol}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</groupFooter>
|
||||
|
|
@ -232,7 +232,7 @@
|
|||
<textField isBlankWhenNull="true">
|
||||
<reportElement x="422" y="2" width="119" height="20"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Middle"/>
|
||||
<textFieldExpression class="java.lang.String"><![CDATA[$V{sumCosts}.setScale(2) + " " + $P{currencySymbol}]]></textFieldExpression>
|
||||
<textFieldExpression class="java.lang.String"><![CDATA[$V{sumCosts}.setScale(2, RoundingMode.HALF_UP) + " " + $P{currencySymbol}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement x="71" y="2" width="258" height="20"/>
|
||||
|
|
@ -268,7 +268,7 @@
|
|||
<textField isBlankWhenNull="true">
|
||||
<reportElement x="423" y="0" width="119" height="14"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Middle"/>
|
||||
<textFieldExpression class="java.lang.String"><![CDATA[$V{sumCostsPerWorkerandCost}.setScale(2) + " " + $P{currencySymbol}]]></textFieldExpression>
|
||||
<textFieldExpression class="java.lang.String"><![CDATA[$V{sumCostsPerWorkerandCost}.setScale(2, RoundingMode.HALF_UP) + " " + $P{currencySymbol}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="###0.00 h">
|
||||
<reportElement x="330" y="0" width="93" height="14"/>
|
||||
|
|
@ -278,7 +278,7 @@
|
|||
<textField isBlankWhenNull="true">
|
||||
<reportElement x="252" y="0" width="78" height="14"/>
|
||||
<textElement textAlignment="Right"/>
|
||||
<textFieldExpression class="java.lang.String"><![CDATA[$F{costPerHour}.setScale(2) + " " + $P{currencySymbol} + "/h"]]></textFieldExpression>
|
||||
<textFieldExpression class="java.lang.String"><![CDATA[$F{costPerHour}.setScale(2, RoundingMode.HALF_UP) + " " + $P{currencySymbol} + "/h"]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isBlankWhenNull="true">
|
||||
<reportElement x="110" y="0" width="141" height="14"/>
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@
|
|||
<textField isBlankWhenNull="true">
|
||||
<reportElement x="434" y="14" width="72" height="15"/>
|
||||
<textElement textAlignment="Center" verticalAlignment="Middle"/>
|
||||
<textFieldExpression class="java.lang.String"><![CDATA[$V{sumTotalPricePerDay}.setScale(2) + " " + $P{currencySymbol}]]></textFieldExpression>
|
||||
<textFieldExpression class="java.lang.String"><![CDATA[$V{sumTotalPricePerDay}.setScale(2, RoundingMode.HALF_UP) + " " + $P{currencySymbol}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</groupFooter>
|
||||
|
|
@ -292,7 +292,7 @@
|
|||
<rightPen lineWidth="1.0"/>
|
||||
</box>
|
||||
<textElement textAlignment="Center" verticalAlignment="Middle"/>
|
||||
<textFieldExpression class="java.lang.String"><![CDATA[$F{totalPrice}.setScale(2) + " " + $P{currencySymbol}]]></textFieldExpression>
|
||||
<textFieldExpression class="java.lang.String"><![CDATA[$F{totalPrice}.setScale(2, RoundingMode.HALF_UP) + " " + $P{currencySymbol}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isBlankWhenNull="true">
|
||||
<reportElement x="390" y="0" width="65" height="73"/>
|
||||
|
|
@ -304,7 +304,7 @@
|
|||
<rightPen lineWidth="1.0"/>
|
||||
</box>
|
||||
<textElement textAlignment="Center" verticalAlignment="Middle"/>
|
||||
<textFieldExpression class="java.lang.String"><![CDATA[$F{unitPrice}.setScale(2) + " " + $P{currencySymbol}]]></textFieldExpression>
|
||||
<textFieldExpression class="java.lang.String"><![CDATA[$F{unitPrice}.setScale(2, RoundingMode.HALF_UP) + " " + $P{currencySymbol}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isBlankWhenNull="true">
|
||||
<reportElement x="520" y="0" width="60" height="73">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue