diff --git a/base/src/org/compiere/print/DataEngine.java b/base/src/org/compiere/print/DataEngine.java index d3bbd9b4be..63630f97c5 100644 --- a/base/src/org/compiere/print/DataEngine.java +++ b/base/src/org/compiere/print/DataEngine.java @@ -738,7 +738,7 @@ public class DataEngine pd.addNode(new PrintDataElement(pdc.getColumnName(), m_group.getValue(group_pdc.getColumnName(), pdc.getColumnName(), functions[f]), - PrintDataFunction.getFunctionDisplayType(functions[f]), + PrintDataFunction.getFunctionDisplayType(functions[f], pdc.getDisplayType()), false, pdc.isPageBreak())); } } // for all columns @@ -920,7 +920,7 @@ public class DataEngine pd.addNode(new PrintDataElement(pdc.getColumnName(), m_group.getValue(group_pdc.getColumnName(), pdc.getColumnName(), functions[f]), - PrintDataFunction.getFunctionDisplayType(functions[f]))); + PrintDataFunction.getFunctionDisplayType(functions[f], pdc.getDisplayType()))); } } } // for all functions @@ -954,7 +954,7 @@ public class DataEngine pd.addNode(new PrintDataElement(pdc.getColumnName(), m_group.getValue(PrintDataGroup.TOTAL, pdc.getColumnName(), functions[f]), - PrintDataFunction.getFunctionDisplayType(functions[f]))); + PrintDataFunction.getFunctionDisplayType(functions[f], pdc.getDisplayType()))); } } // for all columns } // for all functions @@ -1011,7 +1011,7 @@ public class DataEngine { pd.addNode(new PrintDataElement(pdc.getColumnName(), m_group.getValue(PrintDataGroup.TOTAL, pdc.getColumnName(), PrintDataFunction.F_SUM), - PrintDataFunction.getFunctionDisplayType(PrintDataFunction.F_SUM), false, false)); + PrintDataFunction.getFunctionDisplayType(PrintDataFunction.F_SUM, pdc.getDisplayType()), false, false)); } } // for all sum columns } // two lines diff --git a/base/src/org/compiere/print/PrintDataFunction.java b/base/src/org/compiere/print/PrintDataFunction.java index 2130d0713c..1f7d181789 100644 --- a/base/src/org/compiere/print/PrintDataFunction.java +++ b/base/src/org/compiere/print/PrintDataFunction.java @@ -20,10 +20,13 @@ import java.math.*; import org.compiere.util.*; /** - * Print Data Function + * Print Data Function * - * @author Jorg Janke - * @version $Id: PrintDataFunction.java,v 1.3 2006/07/30 00:53:02 jjanke Exp $ + * @author Jorg Janke + * @version $Id: PrintDataFunction.java,v 1.3 2006/07/30 00:53:02 jjanke Exp $ + * + * @author Teo Sarca, SC ARHIPAC SERVICE SRL + *
  • BF [ 1789279 ] DisplayType for group columns are incorect */ public class PrintDataFunction { @@ -211,18 +214,19 @@ public class PrintDataFunction } // getFunctionName /** - * Get Funcuion Name of function - * @param function function - * @return function name + * Get DisplayType of function + * @param function function + * @param displayType columns display type + * @return function name */ - static public int getFunctionDisplayType (char function) + static public int getFunctionDisplayType (char function, int displayType) { if (function == F_SUM || function == F_MIN || function == F_MAX) - return DisplayType.Amount; + return displayType; if (function == F_COUNT) return DisplayType.Integer; // Mean, Variance, Std. Deviation return DisplayType.Number; - } // getFunctionName + } } // PrintDataFunction