- Fix the grouping logic to handle the case where the group by column is also

selected as part of the display columns
This commit is contained in:
dave 2007-12-30 20:03:05 +00:00
parent 5bcd7cd1e1
commit ca52174cfe

View File

@ -650,11 +650,13 @@ foreach($report_stock as $n=>$v) {
if($n_groups > 0) {
$group_change = false;
for($x=0; $x<$n_groups; $x++) {
if($last_group_data["G$x"] != $i["G$x"]) {
/* See if any of the "group" fields have changed */
foreach($report['group'] as $x=>$g) {
$f = $g['field'];
$c = $fieldname[$f];
if($last_group_data[$c] != $i[$c])
$group_change = true;
}
$last_group_data["G$x"] = $i["G$x"];
$last_group_data[$c] = $i[$c];
}
if($group_change) {