Merge remote-tracking branch 'origin/staging' into origin/production
This commit is contained in:
@@ -528,10 +528,51 @@ class ClaimController extends Controller
|
|||||||
->setCellAlignment(CellAlignment::LEFT)
|
->setCellAlignment(CellAlignment::LEFT)
|
||||||
// ->setBackgroundColor(Color::YELLOW)
|
// ->setBackgroundColor(Color::YELLOW)
|
||||||
->build();
|
->build();
|
||||||
|
$grand_total_billing = 0;
|
||||||
foreach ($dataRow as $rowData) {
|
foreach ($dataRow as $rowData) {
|
||||||
|
if (is_numeric($rowData[12])) {
|
||||||
|
// Jumlahkan nilai angka ke total
|
||||||
|
$grand_total_billing += $rowData[12];
|
||||||
|
}
|
||||||
$row = WriterEntityFactory::createRowFromArray($rowData, $style);
|
$row = WriterEntityFactory::createRowFromArray($rowData, $style);
|
||||||
$writer->addRow($row);
|
$writer->addRow($row);
|
||||||
}
|
}
|
||||||
|
//Footer
|
||||||
|
$footer = [
|
||||||
|
'Total',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
$grand_total_billing,
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
'',
|
||||||
|
''
|
||||||
|
];
|
||||||
|
$style = (new StyleBuilder())
|
||||||
|
->setFontBold()
|
||||||
|
// ->setFontSize(15)
|
||||||
|
// ->setFontColor(Color::BLUE)
|
||||||
|
// ->setShouldWrapText()
|
||||||
|
->setCellAlignment(CellAlignment::LEFT)
|
||||||
|
// ->setBackgroundColor(Color::YELLOW)
|
||||||
|
->build();
|
||||||
|
|
||||||
|
$footerRow = WriterEntityFactory::createRowFromArray($footer, $style);
|
||||||
|
$writer->addRow($footerRow);
|
||||||
}
|
}
|
||||||
$writer->close();
|
$writer->close();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user