This commit is contained in:
afiq
2021-08-08 01:45:39 +08:00
parent 4712b6d2d2
commit 2d5a62cb1c
2 changed files with 20 additions and 7 deletions
+10 -3
View File
@@ -580,10 +580,17 @@ class TebusController extends Controller
public function tagterimaupdate($kodcaw,$norujukan){
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$kodcaw)->first();
$dahscan = Tebus::on($cawangan['mysql'])->where([['norujukan','=',$norujukan],['tagterima',1]])->first();
$update_inoutmar = Tebus::on($cawangan['mysql'])->where('norujukan','=',$norujukan)->update(array(
'tagterima' => 1
));
if($dahscan){
return response()->json('scanned');
}else{
$update_inoutmar = Tebus::on($cawangan['mysql'])->where('norujukan','=',$norujukan)->update(array(
'tagterima' => 1
));
return response()->json('success');
}
}
public function checkSerahTebus(Request $request){