diff --git a/app/Http/Controllers/SimulasiController.php b/app/Http/Controllers/SimulasiController.php index b4f859f0..b0f00a19 100644 --- a/app/Http/Controllers/SimulasiController.php +++ b/app/Http/Controllers/SimulasiController.php @@ -921,7 +921,6 @@ class SimulasiController extends Controller ->where('gadai.taglel', '=', 0) ->where('gadai.tagpalsu', '=', 0) ->where('gadai.tagpalsu2', '=', 0) - // ->where('cawangan_simulasi.kali', '!=', $kali) ->whereNotIn('cawangan.id', function($query) use ($kali) { $query->select('caw_id') ->from('cawangan_simulasi') @@ -975,6 +974,11 @@ class SimulasiController extends Controller ->where('gadai.taglel', '=', 0) ->where('gadai.tagpalsu', '=', 0) ->where('gadai.tagpalsu2', '=', 0) + ->whereNotIn('cawangan.id', function($query) use ($kali) { + $query->select('caw_id') + ->from('cawangan_simulasi') + ->where('kali', '=' ,$kali); + }) ->whereNotNull('gadai.upah12') ->groupBy('gadai.kodcaw','cawangan.caw_name') ->selectRaw('count(*) as bil_lelong,