Use currency symbol instead of euro symbol in report orderCostsPerResource
FEA: ItEr76S25CurrencyManagement
This commit is contained in:
parent
75f86d3050
commit
cb8feeea58
4 changed files with 27 additions and 11 deletions
|
|
@ -7,6 +7,7 @@
|
|||
<parameter name="logo" class="java.lang.String"/>
|
||||
<parameter name="criteria" class="java.lang.String"/>
|
||||
<parameter name="labels" class="java.lang.String"/>
|
||||
<parameter name="currencySymbol" class="java.lang.String"/>
|
||||
<field name="workerName" class="java.lang.String"/>
|
||||
<field name="date" class="java.util.Date"/>
|
||||
<field name="numHours" class="java.math.BigDecimal"/>
|
||||
|
|
@ -88,12 +89,12 @@
|
|||
</textElement>
|
||||
<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{sumTotalHours}]]></textFieldExpression>
|
||||
</textField>
|
||||
<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>
|
||||
</band>
|
||||
</groupFooter>
|
||||
|
|
@ -135,10 +136,10 @@
|
|||
<textElement textAlignment="Right" verticalAlignment="Middle"/>
|
||||
<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{sumHoursPerTask}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="###0.00 €;-###0.00 €" isBlankWhenNull="true">
|
||||
<textField isBlankWhenNull="true">
|
||||
<reportElement x="422" y="2" width="119" height="20"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Middle"/>
|
||||
<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{sumCostsPerTask}]]></textFieldExpression>
|
||||
<textFieldExpression class="java.lang.String"><![CDATA[$V{sumCostsPerTask}.setScale(2) + " " + $P{currencySymbol}]]></textFieldExpression>
|
||||
</textField>
|
||||
</band>
|
||||
</groupFooter>
|
||||
|
|
@ -228,10 +229,10 @@
|
|||
</groupHeader>
|
||||
<groupFooter>
|
||||
<band height="28">
|
||||
<textField pattern="###0.00 €;-###0.00 €" isBlankWhenNull="true">
|
||||
<textField isBlankWhenNull="true">
|
||||
<reportElement x="422" y="2" width="119" height="20"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Middle"/>
|
||||
<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{sumCosts}]]></textFieldExpression>
|
||||
<textFieldExpression class="java.lang.String"><![CDATA[$V{sumCosts}.setScale(2) + " " + $P{currencySymbol}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField>
|
||||
<reportElement x="71" y="2" width="258" height="20"/>
|
||||
|
|
@ -264,20 +265,20 @@
|
|||
</groupHeader>
|
||||
<groupFooter>
|
||||
<band height="15">
|
||||
<textField pattern="###0.00 €;-###0.00 €" isBlankWhenNull="true">
|
||||
<textField isBlankWhenNull="true">
|
||||
<reportElement x="423" y="0" width="119" height="14"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Middle"/>
|
||||
<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{sumCostsPerWorkerandCost}]]></textFieldExpression>
|
||||
<textFieldExpression class="java.lang.String"><![CDATA[$V{sumCostsPerWorkerandCost}.setScale(2) + " " + $P{currencySymbol}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="###0.00 h">
|
||||
<reportElement x="330" y="0" width="93" height="14"/>
|
||||
<textElement textAlignment="Right" verticalAlignment="Middle"/>
|
||||
<textFieldExpression class="java.math.BigDecimal"><![CDATA[$V{sumHoursPerWorkerandCost}]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField pattern="###0.00 €/h;-###0.00 €/h" isBlankWhenNull="true">
|
||||
<textField isBlankWhenNull="true">
|
||||
<reportElement x="252" y="0" width="78" height="14"/>
|
||||
<textElement textAlignment="Right"/>
|
||||
<textFieldExpression class="java.math.BigDecimal"><![CDATA[$F{costPerHour}]]></textFieldExpression>
|
||||
<textFieldExpression class="java.lang.String"><![CDATA[$F{costPerHour}.setScale(2) + " " + $P{currencySymbol} + "/h"]]></textFieldExpression>
|
||||
</textField>
|
||||
<textField isBlankWhenNull="true">
|
||||
<reportElement x="110" y="0" width="141" height="14"/>
|
||||
|
|
|
|||
|
|
@ -68,4 +68,6 @@ public interface IOrderCostsPerResourceModel {
|
|||
String getSelectedCriteria();
|
||||
|
||||
String getSelectedLabel();
|
||||
|
||||
String getCurrencySymbol();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,6 +88,8 @@ public class OrderCostsPerResourceController extends LibrePlanReportController {
|
|||
result.put("endingDate", getEndingDate());
|
||||
result.put("criteria", getParameterCriterions());
|
||||
result.put("labels", getParameterLabels());
|
||||
result.put("currencySymbol",
|
||||
orderCostsPerResourceModel.getCurrencySymbol());
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Copyright (C) 2009-2010 Fundación para o Fomento da Calidade Industrial e
|
||||
* Desenvolvemento Tecnolóxico de Galicia
|
||||
* Copyright (C) 2010-2011 Igalia, S.L.
|
||||
* Copyright (C) 2010-2012 Igalia, S.L.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
|
|
@ -36,6 +36,7 @@ import net.sf.jasperreports.engine.JRDataSource;
|
|||
import net.sf.jasperreports.engine.JREmptyDataSource;
|
||||
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
|
||||
|
||||
import org.libreplan.business.common.daos.IConfigurationDAO;
|
||||
import org.libreplan.business.costcategories.entities.TypeOfWorkHours;
|
||||
import org.libreplan.business.labels.daos.ILabelDAO;
|
||||
import org.libreplan.business.labels.entities.Label;
|
||||
|
|
@ -61,6 +62,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
/**
|
||||
* @author Lorenzo Tilve Álvaro <ltilve@igalia.com>
|
||||
* @author Susana Montes Pedreira <smontes@wirelessgalicia.com>
|
||||
* @author Manuel Rego Casasnovas <rego@igalia.com>
|
||||
*/
|
||||
@Service
|
||||
@Scope(BeanDefinition.SCOPE_PROTOTYPE)
|
||||
|
|
@ -78,6 +80,9 @@ public class OrderCostsPerResourceModel implements IOrderCostsPerResourceModel {
|
|||
@Autowired
|
||||
private ICriterionTypeDAO criterionTypeDAO;
|
||||
|
||||
@Autowired
|
||||
private IConfigurationDAO configurationDAO;
|
||||
|
||||
private List<Order> selectedOrders = new ArrayList<Order>();
|
||||
|
||||
private List<Label> selectedLabels = new ArrayList<Label>();
|
||||
|
|
@ -410,4 +415,10 @@ public class OrderCostsPerResourceModel implements IOrderCostsPerResourceModel {
|
|||
return selectedCriteria;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public String getCurrencySymbol() {
|
||||
return configurationDAO.getConfiguration().getCurrencySymbol();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue