fix scan
This commit is contained in:
@@ -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){
|
||||
|
||||
Reference in New Issue
Block a user