update
This commit is contained in:
@@ -870,25 +870,25 @@ class ReportController extends Controller
|
||||
}
|
||||
|
||||
// Query Periksa
|
||||
$query = Periksa::query()->whereYear('daftar', $tahun);
|
||||
$query = Periksa::query()->where('dlp', 'Kultur')->whereNotNull('dokter_id')->whereYear('daftar', $tahun);
|
||||
if ($bulan != 'ALL' && $bulan != 'Pick Month') {
|
||||
$query->whereMonth('daftar', $bulan);
|
||||
}
|
||||
|
||||
// Preview dibuat paginated agar aman saat filter setahun.
|
||||
$orderbydate = $query->orderBy('daftar', 'ASC')->orderBy('id', 'ASC')->paginate(50);
|
||||
$orderbydate->appends(['bulan' => $bulan, 'tahun' => $tahun]);
|
||||
// Preview dibuat paginated agar aman saat filter setahun.
|
||||
$orderbydate = $query->orderBy('daftar', 'ASC')->orderBy('id', 'ASC')->paginate(50);
|
||||
$orderbydate->appends(['bulan' => $bulan, 'tahun' => $tahun]);
|
||||
|
||||
$pageIds = $orderbydate->pluck('id')->toArray();
|
||||
$antibiotikLookup = $this->mapAntibiotikData($pageIds);
|
||||
$glassRows = $orderbydate->getCollection();
|
||||
$glassLookups = $this->getGlassReportLookups($glassRows);
|
||||
$glassTables = $this->splitGlassReportRows($glassRows, $glassLookups);
|
||||
$pageIds = $orderbydate->pluck('id')->toArray();
|
||||
$antibiotikLookup = $this->mapAntibiotikData($pageIds);
|
||||
$glassRows = $orderbydate->getCollection();
|
||||
$glassLookups = $this->getGlassReportLookups($glassRows);
|
||||
$glassTables = $this->splitGlassReportRows($glassRows, $glassLookups);
|
||||
$glassHeaders = $this->getGlassReportHeaders();
|
||||
|
||||
return view('admin.glassreport', [
|
||||
'orderbydate' => $orderbydate,
|
||||
'antibiotikLookup' => $antibiotikLookup, // Kirim array hasil mapping
|
||||
'antibiotikLookup' => $antibiotikLookup,
|
||||
'jsonantibiotik' => $this->listAntibiotik,
|
||||
'glassTables' => $glassTables,
|
||||
'glassHeaders' => $glassHeaders,
|
||||
@@ -920,7 +920,7 @@ class ReportController extends Controller
|
||||
];
|
||||
|
||||
// Query Tanpa Get() tapi Chunk()
|
||||
$query = Periksa::query()->whereYear('daftar', $tahun);
|
||||
$query = Periksa::query()->where('dlp', 'Kultur')->whereNotNull('dokter_id')->whereYear('daftar', $tahun);
|
||||
if ($bulan != 'ALL' && $bulan != 'Pick Month') {
|
||||
$query->whereMonth('daftar', $bulan);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user