Skip to content

Commit eeb94bd

Browse files
committed
Replace Grand Total to Total
1 parent 5e77446 commit eeb94bd

6 files changed

+10
-10
lines changed

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ $columns = [
140140
];
141141
```
142142
### Output Report
143-
![Output Report with Grand Total](https://raw.githubusercontent.com/Jimmy-JS/laravel-report-generator/master/screenshots/report-with-total.png)
143+
![Output Report with Total](https://raw.githubusercontent.com/Jimmy-JS/laravel-report-generator/master/screenshots/report-with-total.png)
144144

145145

146146
### Example Code With Group By
@@ -186,7 +186,7 @@ Or, you can total all records by group using `groupBy` method
186186
**PLEASE TAKE NOTE TO SORT GROUPBY COLUMN VIA QUERY FIRST TO USE THIS GROUP BY METHOD.**
187187

188188
### Output Report With Group By Registered At
189-
![Output Report with Group By Grand Total](https://raw.githubusercontent.com/Jimmy-JS/laravel-report-generator/master/screenshots/report-with-group-by.png)
189+
![Output Report with Group By Total](https://raw.githubusercontent.com/Jimmy-JS/laravel-report-generator/master/screenshots/report-with-group-by.png)
190190

191191

192192
## Other Method

src/ReportMedia/ExcelReport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public function simpleDownload($filename)
111111
});
112112

113113
if ($this->showTotalColumns) {
114-
$totalRows = collect(['Grand Total']);
114+
$totalRows = collect(['Total']);
115115
array_shift($columns);
116116
foreach ($columns as $columnName) {
117117
if (array_key_exists($columnName, $this->showTotalColumns)) {

src/views/general-excel-template.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
}
157157
echo '</tr>';//<tr style="height: 10px;"><td colspan="99">&nbsp;</td></tr>';
158158
159-
// Reset No, Reset Grand Total
159+
// Reset No, Reset Total
160160
$no = 1;
161161
foreach ($showTotalColumns as $showTotalColumn => $type) {
162162
$total[$showTotalColumn] = 0;
@@ -209,7 +209,7 @@
209209
?>
210210
@if ($showTotalColumns != [] && $ctr > 1)
211211
<tr class="f-white">
212-
<td colspan="{{ $grandTotalSkip }}" class="bg-black"><b>Grand Total</b></td> {{-- For Number --}}
212+
<td colspan="{{ $grandTotalSkip }}" class="bg-black"><b>Total</b></td> {{-- For Number --}}
213213
<?php $dataFound = false; ?>
214214
@foreach ($columns as $colName => $colData)
215215
@if (array_key_exists($colName, $showTotalColumns))

src/views/general-pdf-template.blade.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@
185185
186186
if ($isOnSameGroup === false) {
187187
echo '<tr class="bg-black f-white">
188-
<td colspan="' . $grandTotalSkip . '"><b>Grand Total</b></td>';
188+
<td colspan="' . $grandTotalSkip . '"><b>Total</b></td>';
189189
$dataFound = false;
190190
foreach ($columns as $colName => $colData) {
191191
if (array_key_exists($colName, $showTotalColumns)) {
@@ -205,7 +205,7 @@
205205
}
206206
echo '</tr>';//<tr style="height: 10px;"><td colspan="99">&nbsp;</td></tr>';
207207
208-
// Reset No, Reset Grand Total
208+
// Reset No, Reset Total
209209
$no = 1;
210210
foreach ($showTotalColumns as $showTotalColumn => $type) {
211211
$total[$showTotalColumn] = 0;
@@ -258,7 +258,7 @@
258258
?>
259259
@if ($showTotalColumns != [] && $ctr > 1)
260260
<tr class="bg-black f-white">
261-
<td colspan="{{ $grandTotalSkip }}"><b>Grand Total</b></td> {{-- For Number --}}
261+
<td colspan="{{ $grandTotalSkip }}"><b>Total</b></td> {{-- For Number --}}
262262
<?php $dataFound = false; ?>
263263
@foreach ($columns as $colName => $colData)
264264
@if (array_key_exists($colName, $showTotalColumns))

src/views/without-manipulation-excel-template.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
?>
117117
@if ($showTotalColumns != [] && $ctr > 1)
118118
<tr class="f-white">
119-
<td colspan="{{ $grandTotalSkip }}" class="bg-black"><b>Grand Total</b></td> {{-- For Number --}}
119+
<td colspan="{{ $grandTotalSkip }}" class="bg-black"><b>Total</b></td> {{-- For Number --}}
120120
<?php $dataFound = false; ?>
121121
@foreach ($columns as $colName => $colData)
122122
@if (array_key_exists($colName, $showTotalColumns))

src/views/without-manipulation-pdf-template.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@
168168
?>
169169
@if ($showTotalColumns != [] && $ctr > 1)
170170
<tr class="bg-black f-white">
171-
<td colspan="{{ $grandTotalSkip }}"><b>Grand Total</b></td> {{-- For Number --}}
171+
<td colspan="{{ $grandTotalSkip }}"><b>Total</b></td> {{-- For Number --}}
172172
<?php $dataFound = false; ?>
173173
@foreach ($columns as $colName => $colData)
174174
@if (array_key_exists($colName, $showTotalColumns))

0 commit comments

Comments
 (0)