diff --git a/app/Http/Controllers/CustomerController.php b/app/Http/Controllers/CustomerController.php
index 0c96777..ecd7014 100644
--- a/app/Http/Controllers/CustomerController.php
+++ b/app/Http/Controllers/CustomerController.php
@@ -577,7 +577,7 @@ class CustomerController extends Controller
}
// 2. Baru query kalau ada keyword
- $data =Karyawan::where('statusenabled', true)
+ $data =Karyawan::where('statusenabled', true)->where('kedudukanfk', 1)
->where('namalengkap', 'ILIKE', "%{$search}%")
->limit(5)
->pluck('namalengkap') // langsung ambil string
diff --git a/app/Http/Controllers/DashboardController.php b/app/Http/Controllers/DashboardController.php
index 322e881..f9b3c8e 100644
--- a/app/Http/Controllers/DashboardController.php
+++ b/app/Http/Controllers/DashboardController.php
@@ -61,15 +61,15 @@ class DashboardController extends Controller
'note_dibatalkan' => $first->note_dibatalkan,
];
})->values();
- $pemasukanKaryawan = $grouped->where('jenis_customer', 'Karyawan RSAB Harapan Kita')->sum('total_harga');
- $pemasukanMasyarakat = $grouped->where('jenis_customer', 'Masyarakat Umum')->sum('total_harga');
- $pemasukanKeluargaPasien = $grouped->where('jenis_customer', 'Keluarga Pasien / Penunggu Pasien')->sum('total_harga');
+ $pemasukanKaryawan = $grouped->where('jenis_customer', 'Karyawan RSAB Harapan Kita')->whereNotIn('status_order', ['Belum Bayar'])->sum('total_harga');
+ $pemasukanMasyarakat = $grouped->where('jenis_customer', 'Masyarakat Umum')->whereNotIn('status_order', ['Belum Bayar'])->sum('total_harga');
+ $pemasukanKeluargaPasien = $grouped->where('jenis_customer', 'Keluarga Pasien / Penunggu Pasien')->whereNotIn('status_order', ['Belum Bayar'])->sum('total_harga');
- $totalPemasukan = $grouped->sum('total_harga');
- $pesananPending = $grouped->whereNotIn('status_order', ['Lunas', 'Dibatalkan'])->count();
+ $totalPemasukan = $grouped->whereNotIn('status_order', ['Belum Bayar'])->sum('total_harga');
+ $pesananPending = $grouped->whereNotIn('status_order', ['Lunas', 'Dibatalkan', 'Belum Bayar'])->count();
$pesananLunas = $grouped->where('status_order', 'Lunas')->count();
$pesananBatal = $grouped->where('status_order', 'Dibatalkan')->count();
- $totalPesanan = $grouped->count();
+ $totalPesanan = $grouped->whereNotIn('status_order', ['Belum Bayar'])->count();
$pesananSelesai = DB::connection('dbOrderGizi')->table('public.order as o')
->where('o.statusenabled', true)
diff --git a/resources/views/guest/layout/main.blade.php b/resources/views/guest/layout/main.blade.php
index 7d873a5..c61bfc2 100644
--- a/resources/views/guest/layout/main.blade.php
+++ b/resources/views/guest/layout/main.blade.php
@@ -39,7 +39,7 @@
{{-- Jquery --}}
- \
+