OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Compare Revisions

Regard whitespace Rev 141 → Rev 142

/trunk/OpenConcerto/src/org/openconcerto/erp/generationDoc/OOXMLField.java
238,6 → 238,7
String prefix = this.elt.getAttributeValue("prefix");
String suffix = this.elt.getAttributeValue("suffix");
String display = this.elt.getAttributeValue("display");
// FIXME attribut cellSize à mettre sur l'element
String cellSize = this.elt.getAttributeValue("cellSize");
if (prefix != null || suffix != null) {
 
346,8 → 347,19
}
} else if (typeComp.equalsIgnoreCase("cumulPaye")) {
double val = ((Number) result).doubleValue();
double valC = ((Number) this.row.getForeign("ID_CUMULS_PAYE").getObject(field + "_C")).doubleValue();
double valC;
if (this.row.getTable().getFieldsName().contains("ID_CUMULS_PAYE")) {
valC = ((Number) this.row.getForeign("ID_CUMULS_PAYE").getObject(field + "_C")).doubleValue();
} else {
SQLRowAccessor refRow = this.row.getReferentRows(this.row.getTable().getTable("FICHE_PAYE")).iterator().next();
valC = ((Number) refRow.getForeign("ID_CUMULS_PAYE").getObject(field + "_C")).doubleValue();
}
return new Double(val + valC);
} else if (typeComp.equalsIgnoreCase("cumulConges")) {
double val = ((Number) result).doubleValue();
SQLRowAccessor refRow = this.row.getReferentRows(this.row.getTable().getTable("FICHE_PAYE")).iterator().next();
double valC = ((Number) refRow.getObject("CONGES_ACQUIS")).doubleValue();
return new Double(val + valC);
} else if (typeComp.equalsIgnoreCase("globalAcompte")) {
Long prix = (Long) result;
int pourcent = this.row.getInt("POURCENT_ACOMPTE");
645,25 → 657,15
Nombre n1 = new Nombre(entier.intValue(), langue);
Nombre n2 = new Nombre(decimal.intValue(), langue);
 
// result.append(n1.getText() + " euros");
// 2.51 -> deux euros et cinquante et un centimes
result.append(n1.getText() + " " + deviseName.get0().trim());
 
if (decimal.intValue() > 0)
 
{
// result.append(" et " + n2.getText() + " cents");
result.append(" " + n1.getLocal().getSeparateurLabel() + " " + n2.getText() + deviseName.get1());
if (decimal.intValue() > 0) {
result.append(" " + n1.getSeparateurLabel() + " " + n2.getText() + deviseName.get1());
}
if (result != null && result.length() > 0)
 
{
if (result != null && result.length() > 0) {
return result.toString().replaceFirst(String.valueOf(result.charAt(0)), String.valueOf(result.charAt(0)).toUpperCase());
} else
 
{
return result.toString();
}
 
return "";
}
 
private static BigDecimal calcul(Object o1, Object o2, String op) {