Merged in izzati-hotfix-stokaudit-excel (pull request #93)

update stockaudit excel
This commit is contained in:
izzati zulkifli
2025-04-08 07:49:51 +00:00
+7 -1
View File
@@ -752,7 +752,13 @@ class AkaunController extends Controller
if (empty($stokauditRecords)) {
return back()->with('error', 'No records found to export.');
}
return Excel::download(new SAExport($stokauditRecords, 'Laporan Stok Audit'), 'laporan_stokaudit_' . $request->kodcaw . '_' . $tebus_date . '.xlsx');
//return Excel::download(new SAExport($stokauditRecords, 'Laporan Stok Audit'), 'laporan_stokaudit_' . $request->kodcaw . '_' . $tebus_date . '.xlsx');
return Excel::download(new SAExport(
$stokauditRecords,
'Laporan Stok Audit',
$tebus_date,
$cawangan_detail['namacaw']// ✅ Use the correct branch name from API
), 'laporan_stokaudit_' . $request->kodcaw . '_' . $tebus_date . '.xlsx');
}
else {
if ($request->radaktif === 'aktif') {