IDEMPIERE-727 Implement Print Table Format - Print Function Symbols

This commit is contained in:
Carlos Ruiz 2013-03-12 11:53:56 -05:00
parent 2186311a7c
commit 0c25244464
1 changed files with 7 additions and 4 deletions

View File

@ -854,7 +854,8 @@ public class DataEngine
String valueString = value.toString(); String valueString = value.toString();
if (value instanceof Timestamp) if (value instanceof Timestamp)
valueString = DisplayType.getDateFormat(pdc.getDisplayType(), m_language).format(value); valueString = DisplayType.getDateFormat(pdc.getDisplayType(), m_language).format(value);
valueString += PrintDataFunction.getFunctionSymbol(functions[f]); if (format.getTableFormat().isPrintFunctionSymbols()) // Translate Sum, etc.
valueString += PrintDataFunction.getFunctionSymbol(functions[f]);
pd.addNode(new PrintDataElement(pdc.getColumnName(), pd.addNode(new PrintDataElement(pdc.getColumnName(),
valueString, DisplayType.String, false, pdc.isPageBreak(), pdc.getFormatPattern())); valueString, DisplayType.String, false, pdc.isPageBreak(), pdc.getFormatPattern()));
} }
@ -1053,7 +1054,8 @@ public class DataEngine
String valueString = value.toString(); String valueString = value.toString();
if (value instanceof Timestamp) if (value instanceof Timestamp)
valueString = DisplayType.getDateFormat(pdc.getDisplayType(), m_language).format(value); valueString = DisplayType.getDateFormat(pdc.getDisplayType(), m_language).format(value);
valueString += PrintDataFunction.getFunctionSymbol(functions[f]); if (format.getTableFormat().isPrintFunctionSymbols()) // Translate Sum, etc.
valueString += PrintDataFunction.getFunctionSymbol(functions[f]);
pd.addNode(new PrintDataElement(pdc.getColumnName(), pd.addNode(new PrintDataElement(pdc.getColumnName(),
valueString, DisplayType.String, pdc.getFormatPattern())); valueString, DisplayType.String, pdc.getFormatPattern()));
} }
@ -1086,10 +1088,11 @@ public class DataEngine
pdc = pd.getColumnInfo()[c]; pdc = pd.getColumnInfo()[c];
if (c == 0) // put Function in first Column if (c == 0) // put Function in first Column
{ {
String name = ""; String name;
if (!format.getTableFormat().isPrintFunctionSymbols()) // Translate Sum, etc. if (!format.getTableFormat().isPrintFunctionSymbols()) // Translate Sum, etc.
name = Msg.getMsg(format.getLanguage(), PrintDataFunction.getFunctionName(functions[f])); name = Msg.getMsg(format.getLanguage(), PrintDataFunction.getFunctionName(functions[f]));
name += PrintDataFunction.getFunctionSymbol(functions[f]); // Symbol else
name = PrintDataFunction.getFunctionSymbol(functions[f]); // Symbol
pd.addNode(new PrintDataElement(pdc.getColumnName(), name.trim(), pd.addNode(new PrintDataElement(pdc.getColumnName(), name.trim(),
DisplayType.String, pdc.getFormatPattern())); DisplayType.String, pdc.getFormatPattern()));
} }