add pendahuluanserahan

This commit is contained in:
hafifierahman
2021-02-24 17:00:13 +08:00
parent 0f6ab90482
commit 32745f09f3
4 changed files with 133 additions and 43 deletions
+19 -8
View File
@@ -248,6 +248,7 @@ class KelulusanController extends Controller
'tarikh'=> $harini->toDateString(),
'mohon' => $request->mohon,
'norujukan' => $norujukan,
'katalaluan' => $request->message,
'benar' => '0',
'teller' => $request->teller
]);
@@ -262,14 +263,24 @@ class KelulusanController extends Controller
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$kodcaw)->first();
$kelulusan=Mohonid::on($cawangan['mysql'])
->where('tarikh','=',$harini->toDateString())
->where('norujukan','=',$norujukan)
->update(array(
'benar' => '1',
'id' => $request->khazanah
));
if($request->pembatalan != null)
{
$kelulusan=Mohonid::on($cawangan['mysql'])
->where('tarikh','=',$harini->toDateString())
->where('norujukan','=',$norujukan)
->update(array(
'benar' => '2',
'id' => $request->khazanah
));
}else{
$kelulusan=Mohonid::on($cawangan['mysql'])
->where('tarikh','=',$harini->toDateString())
->where('norujukan','=',$norujukan)
->update(array(
'benar' => '1',
'id' => $request->khazanah
));
}
return response()->json($kelulusan,202);
}