Fix transaksi keuntungan query
This commit is contained in:
@@ -98,6 +98,9 @@ class TransactionOnlineTrailController extends Controller
|
|||||||
|
|
||||||
if ($transaksiKeuntungan->isEmpty()) {
|
if ($transaksiKeuntungan->isEmpty()) {
|
||||||
$transaksiKeuntungan = TransaksiKeuntungan::whereDate('tarikh_bayaran', $date)
|
$transaksiKeuntungan = TransaksiKeuntungan::whereDate('tarikh_bayaran', $date)
|
||||||
|
->whereHas('transaction', function ($query) {
|
||||||
|
return $query->where('teller', 'Online');
|
||||||
|
})
|
||||||
->when($request->filled('norujukan'), function ($query) use ($request) {
|
->when($request->filled('norujukan'), function ($query) use ($request) {
|
||||||
return $query->where('norujukan', 'LIKE', '%' . $request->norujukan . '%');
|
return $query->where('norujukan', 'LIKE', '%' . $request->norujukan . '%');
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user