sort by norujukan

This commit is contained in:
BTMS2
2025-06-11 15:34:21 +08:00
parent b92529a43f
commit e21b52c6a8
2 changed files with 5 additions and 2 deletions
@@ -130,7 +130,8 @@ public function getSummaryLaporanBakiLelongBelumTuntut(Request $request)
$query->whereNull('lelong.trkhtuntut')
->orWhere('lelong.trkhtuntut', '>', $request->endDate); // or use a specific date: '2025-06-01'
})
->where('lelong.baki', '>', 0.00);
->where('lelong.baki', '>', 0.00)
->orderBy('lelong.norujukan', 'asc');
if ($request->filled('startDate') && $request->filled('endDate')) {
+3 -1
View File
@@ -276,7 +276,9 @@ class LelonganService
$query->whereNull('lelong.trkhtuntut')
->orWhere('lelong.trkhtuntut', '>', $endDate); // or use a specific date: '2025-06-01'
})
->where('lelong.baki', '>', 0.00);
->where('lelong.baki', '>', 0.00)
->orderBy('lelong.norujukan', 'asc');
$query_total_lelongan->when(!empty($this->startDate) and !empty($this->endDate), function ($q) {
return $q->where('lelong.t_lelong', '>=', $this->startDate)