GWM : issue fixed
This commit is contained in:
parent
5925a5aaaf
commit
bfc0a54d57
@ -1557,13 +1557,23 @@ class ExcelExportController extends ResourceController
|
||||
$serialNo = 1;
|
||||
$totalSum = 0;
|
||||
|
||||
// foreach ($data as $row) {
|
||||
// $indexedRow = array_values($row);
|
||||
// $lastIndex = count($indexedRow) - 1;
|
||||
// $totalSum += (float) $indexedRow[$lastIndex];
|
||||
// unset($indexedRow[$lastIndex]);
|
||||
// $finalData[] = array_merge([$serialNo++], $indexedRow);
|
||||
// }
|
||||
|
||||
foreach ($data as $row) {
|
||||
|
||||
$indexedRow = array_values($row);
|
||||
|
||||
$totalSum += (float) $row['commission_amount'];
|
||||
// $lastIndex = count($indexedRow) - 1;
|
||||
// $totalSum += (float) $indexedRow[$lastIndex];
|
||||
// unset($indexedRow[$lastIndex]);
|
||||
|
||||
// Commission Amount is last column
|
||||
$commissionIndex = count($indexedRow) - 1;
|
||||
|
||||
$totalSum += (float) $indexedRow[$commissionIndex];
|
||||
|
||||
$finalData[] = array_merge([$serialNo++], $indexedRow);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user