update query baki lelong

This commit is contained in:
BTMS2
2025-06-11 15:22:10 +08:00
parent 6bce038f82
commit 9c5249b62c
2 changed files with 9 additions and 3 deletions
@@ -126,7 +126,10 @@ public function getSummaryLaporanBakiLelongBelumTuntut(Request $request)
sum(lelong.cajlelong) as sum_cajlelong,
sum(lelong.hargajual) as sum_hargajual,
sum(lelong.baki) as sum_baki'))
->whereNull('lelong.trkhtuntut')
->where(function ($query) use ($request) {
$query->whereNull('lelong.trkhtuntut')
->orWhere('lelong.trkhtuntut', '>', $request->endDate); // or use a specific date: '2025-06-01'
})
->where('lelong.baki', '>', 0.00);