From f9e6283d1075463c8bcc2a2f86e3f40fb6c10836 Mon Sep 17 00:00:00 2001 From: JokoPrasetio Date: Thu, 21 Aug 2025 13:31:32 +0700 Subject: [PATCH] done -> testing in production --- app/Http/Controllers/CustomerController.php | 2 +- app/Http/Controllers/DashboardController.php | 12 ++++++------ resources/views/guest/layout/main.blade.php | 2 +- .../views/guest/layout/partials/header.blade.php | 2 -- 4 files changed, 8 insertions(+), 10 deletions(-) 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 --}} - \ +