BF [ 1789279 ] DisplayType for group columns are incorect
http://sourceforge.net/tracker/index.php?func=detail&aid=1789279&group_id=176962&atid=879332
This commit is contained in:
parent
4646b7813a
commit
2de320b935
|
@ -738,7 +738,7 @@ public class DataEngine
|
||||||
pd.addNode(new PrintDataElement(pdc.getColumnName(),
|
pd.addNode(new PrintDataElement(pdc.getColumnName(),
|
||||||
m_group.getValue(group_pdc.getColumnName(),
|
m_group.getValue(group_pdc.getColumnName(),
|
||||||
pdc.getColumnName(), functions[f]),
|
pdc.getColumnName(), functions[f]),
|
||||||
PrintDataFunction.getFunctionDisplayType(functions[f]),
|
PrintDataFunction.getFunctionDisplayType(functions[f], pdc.getDisplayType()),
|
||||||
false, pdc.isPageBreak()));
|
false, pdc.isPageBreak()));
|
||||||
}
|
}
|
||||||
} // for all columns
|
} // for all columns
|
||||||
|
@ -920,7 +920,7 @@ public class DataEngine
|
||||||
pd.addNode(new PrintDataElement(pdc.getColumnName(),
|
pd.addNode(new PrintDataElement(pdc.getColumnName(),
|
||||||
m_group.getValue(group_pdc.getColumnName(),
|
m_group.getValue(group_pdc.getColumnName(),
|
||||||
pdc.getColumnName(), functions[f]),
|
pdc.getColumnName(), functions[f]),
|
||||||
PrintDataFunction.getFunctionDisplayType(functions[f])));
|
PrintDataFunction.getFunctionDisplayType(functions[f], pdc.getDisplayType())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // for all functions
|
} // for all functions
|
||||||
|
@ -954,7 +954,7 @@ public class DataEngine
|
||||||
pd.addNode(new PrintDataElement(pdc.getColumnName(),
|
pd.addNode(new PrintDataElement(pdc.getColumnName(),
|
||||||
m_group.getValue(PrintDataGroup.TOTAL,
|
m_group.getValue(PrintDataGroup.TOTAL,
|
||||||
pdc.getColumnName(), functions[f]),
|
pdc.getColumnName(), functions[f]),
|
||||||
PrintDataFunction.getFunctionDisplayType(functions[f])));
|
PrintDataFunction.getFunctionDisplayType(functions[f], pdc.getDisplayType())));
|
||||||
}
|
}
|
||||||
} // for all columns
|
} // for all columns
|
||||||
} // for all functions
|
} // for all functions
|
||||||
|
@ -1011,7 +1011,7 @@ public class DataEngine
|
||||||
{
|
{
|
||||||
pd.addNode(new PrintDataElement(pdc.getColumnName(),
|
pd.addNode(new PrintDataElement(pdc.getColumnName(),
|
||||||
m_group.getValue(PrintDataGroup.TOTAL, pdc.getColumnName(), PrintDataFunction.F_SUM),
|
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
|
} // for all sum columns
|
||||||
} // two lines
|
} // two lines
|
||||||
|
|
|
@ -24,6 +24,9 @@ import org.compiere.util.*;
|
||||||
*
|
*
|
||||||
* @author Jorg Janke
|
* @author Jorg Janke
|
||||||
* @version $Id: PrintDataFunction.java,v 1.3 2006/07/30 00:53:02 jjanke Exp $
|
* @version $Id: PrintDataFunction.java,v 1.3 2006/07/30 00:53:02 jjanke Exp $
|
||||||
|
*
|
||||||
|
* @author Teo Sarca, SC ARHIPAC SERVICE SRL
|
||||||
|
* <li>BF [ 1789279 ] DisplayType for group columns are incorect
|
||||||
*/
|
*/
|
||||||
public class PrintDataFunction
|
public class PrintDataFunction
|
||||||
{
|
{
|
||||||
|
@ -211,18 +214,19 @@ public class PrintDataFunction
|
||||||
} // getFunctionName
|
} // getFunctionName
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get Funcuion Name of function
|
* Get DisplayType of function
|
||||||
* @param function function
|
* @param function function
|
||||||
|
* @param displayType columns display type
|
||||||
* @return function name
|
* @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)
|
if (function == F_SUM || function == F_MIN || function == F_MAX)
|
||||||
return DisplayType.Amount;
|
return displayType;
|
||||||
if (function == F_COUNT)
|
if (function == F_COUNT)
|
||||||
return DisplayType.Integer;
|
return DisplayType.Integer;
|
||||||
// Mean, Variance, Std. Deviation
|
// Mean, Variance, Std. Deviation
|
||||||
return DisplayType.Number;
|
return DisplayType.Number;
|
||||||
} // getFunctionName
|
}
|
||||||
|
|
||||||
} // PrintDataFunction
|
} // PrintDataFunction
|
||||||
|
|
Loading…
Reference in New Issue