Fix transaksi keuntungan query

This commit is contained in:
Afiq Hamzah
2024-08-11 15:28:20 +08:00
parent 40ac139fbe
commit 8954aa889a
@@ -98,6 +98,9 @@ class TransactionOnlineTrailController extends Controller
if ($transaksiKeuntungan->isEmpty()) {
$transaksiKeuntungan = TransaksiKeuntungan::whereDate('tarikh_bayaran', $date)
->whereHas('transaction', function ($query) {
return $query->where('teller', 'Online');
})
->when($request->filled('norujukan'), function ($query) use ($request) {
return $query->where('norujukan', 'LIKE', '%' . $request->norujukan . '%');
})