From 0c252444644b1a667aa6ec32f9a619e56d509fa6 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Tue, 12 Mar 2013 11:53:56 -0500 Subject: [PATCH] IDEMPIERE-727 Implement Print Table Format - Print Function Symbols --- .../src/org/compiere/print/DataEngine.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/print/DataEngine.java b/org.adempiere.base/src/org/compiere/print/DataEngine.java index 6c665db523..dde8d15da2 100644 --- a/org.adempiere.base/src/org/compiere/print/DataEngine.java +++ b/org.adempiere.base/src/org/compiere/print/DataEngine.java @@ -854,7 +854,8 @@ public class DataEngine String valueString = value.toString(); if (value instanceof Timestamp) 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(), valueString, DisplayType.String, false, pdc.isPageBreak(), pdc.getFormatPattern())); } @@ -1053,7 +1054,8 @@ public class DataEngine String valueString = value.toString(); if (value instanceof Timestamp) 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(), 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())); }