mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/izyim-api.git
synced 2026-08-19 04:24:01 +00:00
complete cancel ship order
This commit is contained in:
@@ -74,13 +74,17 @@ class SoController extends Controller
|
||||
*/
|
||||
public function cancelOrder(Request $request)
|
||||
{
|
||||
$so = So::where('user_id', Auth::user()->id)->where('id', $com_id)->firstOrFail();
|
||||
|
||||
|
||||
if (!$so = So::where('com_id', Auth::user()->company())->where('id', $id)->first())
|
||||
{
|
||||
return response()->json(['message'=>'Access denied'], 200);
|
||||
}
|
||||
|
||||
$so->is_cancel = true;
|
||||
$so->save();
|
||||
|
||||
$com_id = auth()->user->id;
|
||||
|
||||
return response()->json(['so'=>$so],200);
|
||||
return response()->json(['message'=>'Success'],200);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -92,7 +96,7 @@ class SoController extends Controller
|
||||
*/
|
||||
public function update(Request $request, $id)
|
||||
{
|
||||
$so = So::where('com_id', Auth::user()->company())->where('id', $id)->firstOrFail();
|
||||
$so = So::where('com_id', Auth::user()->company())->where('id', $id)->first();
|
||||
|
||||
if (!$so)
|
||||
{
|
||||
@@ -134,7 +138,6 @@ class SoController extends Controller
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Remove the shipping order and item
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user