fix kelulusan

This commit is contained in:
hafifierahman
2021-01-17 08:46:07 +08:00
parent 28f00f7f39
commit 79aa543e69
4 changed files with 61 additions and 17 deletions
+9 -2
View File
@@ -384,6 +384,10 @@ class GadaiController extends Controller
}
public function gadaiRingkasanTerkumpul($kodcaw,$tarikh){
$current = Carbon::now();
$current = new Carbon();
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$kodcaw)->first();
$array_terkumpul = [];
@@ -392,13 +396,16 @@ class GadaiController extends Controller
->selectRaw('COUNT(*) AS bilangan, SUM(nilaimarhun) as jumlahmarhun, SUM(pinjaman) as jumlahpinjaman')
->where('t_gadai','<=',$tarikh)
// ->where('sttebus','=','')
->whereYear('t_gadai','=',$current->year)
->orderBy('t_gadai','desc')
->get();
$tebus = Gadai::on($cawangan['mysql'])
->selectRaw('COUNT(*) AS bilangan, SUM(nilaimarhun) as jumlahmarhun, SUM(pinjaman) as jumlahpinjaman, SUM(bakiupah) as upahsimpan')
->where('t_gadai','<=',$tarikh)
->where('sttebus','=','T')
->whereYear('t_gadai','=',$current->year)
->orderBy('t_gadai','desc')
->get();
@@ -406,6 +413,7 @@ class GadaiController extends Controller
->selectRaw('COUNT(*) AS bilangan, SUM(nilaimarhun) as jumlahmarhun, SUM(pinjaman) as jumlahpinjaman')
->where('t_gadai','<=',$tarikh)
->where('sttebus','=','L')
->whereYear('t_gadai','=',$current->year)
->orderBy('t_gadai','desc')
->get();
@@ -1098,8 +1106,7 @@ class GadaiController extends Controller
return response('Deleted Successfully', 200);
}
else
return response('Bukan-Tebus');
return response('Bukan-Tebus', 200);
}
public function senaraiLelong($kodcaw,Request $request){