create new tag
view all tags


Story summary Currency Managment
Iteration ItEr76Week01To33
FEA ItEr76S25CurrencyManagement
Story Lead  
Next Story  
Passed acceptance test No

Acceptance Criteria

Additional Specification Comments

Implementation Notes

To change the symbol in the report it was need to add a new parameter with the currency symbol and change the way the text fields were formatted:

-                               <textField pattern="###0.00 ;-###0.00 ">
+                               <textField>
                                        <reportElement x="422" y="2" width="119" height="20"/>
                                        <textElement textAlignment="Right" verticalAlignment="Middle">
                                                <font isBold="true"/>
-                                       <textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{sumTotalCosts}]]></textFieldExpression>
+                                       <textFieldExpression class="java.lang.String"><![CDATA[$V{sumTotalCosts}.setScale(2) + " " + $P{currencySymbol}]]></textFieldExpression>

-- ManuelRego - 26 Apr 2012

Euro symbol was justs been used in 2 places at this moment:

  • Task tooltip in the Gantt view of a project
  • Project Costs Per Resource report

Two new methods in Util class has been created:

  • getCurrencySymbol(): Returns the currency symbol from Configuration class.
  • getMoneyFormat(): To be used in Decimalbox to show the currency symbol together with the value inside the input.

It has been reviewed all the places where a number representing money is used and the currency symbol has been added in:

  • Materials Needs At Date report
  • Cost Category
  • Type of Hours
  • Materials
  • WBS (projects and templates): list, Imputed hours tab, General data tab, Details tab, Materials tab
  • Gantt: Task properties tab, Subcontract tab

It was needed to escape some special chars (used in DecimalFormat) from the currency symbol. For example, SFr. needs to be escaped to SFr'.' in order to avoid problems using it as format of the Decimalbox.

In the reports it was needed to set a rounding mode to avoid problems:

$V{sumTotalCosts}.setScale(2, RoundingMode.HALF_UP)

-- ManuelRego - 27 Apr 2012

Delay Causes

Final or Pending Considerations



Tasks in this story

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 20 Aug 2012 - mrego
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback