Skip to content

ItEr76S25CurrencyManagement

Jeroen Baten edited this page Mar 9, 2018 · 1 revision

TWiki> LibrePlan Web>ItEr76S25CurrencyManagement (20 Aug 2012, ManuelRego)EditAttach

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"/>
                                        </textElement>
-                                       <textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{sumTotalCosts}]]></textFieldExpression>
+                                       <textFieldExpression class="java.lang.String"><![CDATA[$V{sumTotalCosts}.setScale(2) + " " + $P{currencySymbol}]]></textFieldExpression>
                                </textField>

-- 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

 

Commits

%RPSHOWGITCOMMITS%

Tasks in this story

Tasks Est Spent To do Risk Reviewer Developer Task Name Start Date Est End Date End Date
Task 2 2 0 Low ManuelRego ManuelRego Add option to choose LibrePlan currency in configuration window      
Task 3 4 0 Low ManuelRego ManuelRego Replace use of euro for the configured currency      

Copyright (c) by the contributing authors. All material on this collaboration platform is the property of the contributing authors.

Clone this wiki locally