This commit is contained in:
afiq
2021-03-01 14:54:53 +08:00
parent fc33c7f3de
commit a6b8afa8ff
2 changed files with 9 additions and 0 deletions
+8
View File
@@ -1880,4 +1880,12 @@ class GadaiController extends Controller
$gadai_aging=DB::connection($db)->select("SELECT kodcaw,count(norujukan) as a,sum(pinjaman)as b,((period_diff(date_format('".$tarikh."', '%Y%m'), date_format(t_gadai, '%Y%m')))+1) AS bln From gadai where ((sttebus='' and t_gadai<='".$tarikh."') or (sttebus!='' and t_update>'".$tarikh."' and t_gadai<='".$tarikh."'))");
return response()->json($gadai_aging);
}
public function rekodGadaian(Request $request){
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$request->kodcaw)->first();
$rekod_gadaian = Gadai::on($cawangan['mysql'])->where('t_gadai','=',$request->tarikh)->get();
return response()->json($rekod_gadaian);
}
}