mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange.git
synced 2026-08-29 01:04:21 +00:00
fix wrong status for user after book supplier
This commit is contained in:
@@ -425,6 +425,13 @@ class BookingController extends Controller
|
||||
|
||||
public function confirmPurchaseOrder($id){
|
||||
$booking = Booking::where('user_id',Auth::user()->id)->where('id',$id)->first();
|
||||
|
||||
$purchase_order = $booking->purchaseOrder()->first();
|
||||
|
||||
if(!$purchase_order){
|
||||
return response()->json(["message"=> "Please upload your purchase order"],400);
|
||||
}
|
||||
|
||||
$booking->status = 6;
|
||||
$booking->save();
|
||||
return response()->json(['message'=>'Success'],200);
|
||||
|
||||
Reference in New Issue
Block a user