From eec6dee9ac0dc7d4915491c350864b015c42475b Mon Sep 17 00:00:00 2001 From: ilhamwara Date: Tue, 8 Jul 2025 09:47:50 +0700 Subject: [PATCH] update --- app/Helpers/custom.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Helpers/custom.php b/app/Helpers/custom.php index 02a2659..b994dcc 100644 --- a/app/Helpers/custom.php +++ b/app/Helpers/custom.php @@ -722,10 +722,10 @@ if (!function_exists('formKriteria')) { if(@$type == 'kota'){ $penilaian = Penilaian::where('key',$data->key)->where('ms_sekolah_id',$idSekolah)->where('status',$status)->first(); - $penilaianOld = Penilaian::where('key',$data->key)->where('ms_sekolah_id',$idSekolah)->where('status',0)->first(); + $penilaianOld = Penilaian::where('key',$data->key)->where('ms_sekolah_id',$idSekolah)->where('status',($status-1))->first(); }elseif(@$type == 'provinsi'){ $penilaian = Penilaian::where('key',$data->key)->where('ms_sekolah_id',$idSekolah)->where('status',$status)->first(); - $penilaianOld = Penilaian::where('key',$data->key)->where('ms_sekolah_id',$idSekolah)->where('status',1)->first(); + $penilaianOld = Penilaian::where('key',$data->key)->where('ms_sekolah_id',$idSekolah)->where('status',($status-1))->first(); }else{ $penilaian = Penilaian::where('key',$data->key)->where('ms_sekolah_id',$idSekolah)->where('status',$status)->first(); }