fix scan
This commit is contained in:
@@ -529,11 +529,17 @@ class GadaiController extends Controller
|
||||
public function barcodeScan($kodcaw,$norujukan){
|
||||
$cawangan = Cawangan::on('mysql7')->where('kodcaw','=',$kodcaw)->first();
|
||||
|
||||
$gadai = Gadai::on($cawangan['mysql'])->where('norujukan','=',$norujukan)->update(array(
|
||||
'semakbarcode'=>'Lulus'
|
||||
));
|
||||
$dahscan = Gadai::on($cawangan['mysql'])->where([['norujukan','=',$norujukan],['semakbarcode','Lulus']])->first();
|
||||
|
||||
return response()->json($gadai,200);
|
||||
if($dahscan){
|
||||
return response()->json('scanned');
|
||||
}else{
|
||||
$gadai = Gadai::on($cawangan['mysql'])->where('norujukan','=',$norujukan)->update([
|
||||
'semakbarcode'=>'Lulus'
|
||||
]);
|
||||
|
||||
return response()->json('success');
|
||||
}
|
||||
}
|
||||
|
||||
public function checkSerahGadaian(Request $request){
|
||||
|
||||
Reference in New Issue
Block a user