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