Hello,
I was trying to get an average to be calculated for a column in the table widget using grouping function. Adding
"grouping"=>array(
"agent"=>array(
"calculate"=>array(
"{commPaidSum}"=>array("sum","commPaid"),
"{CommissAvg}"=>array("avg","AgentCommPerc"),
"{revenueSum}"=>array("sum","revenue"),
),
did not give me the result expected. After looking for the problem root, I discovered a bug in your code at core/src/widgets/koolphp/Table.php at line 238 it is
if (in_array($method, array("sum", "count", "min", "max", "mode"))) {
and should be including the "avg":
if (in_array($method, array("sum", "count", "min", "max", "mode", "avg"))) {
Please correct it. Kind Regards!