dropped order_id column in soitem table

This commit is contained in:
Zain Fauzan Rofie Azizi
2018-06-07 17:21:08 +08:00
parent 18c05ecb7d
commit 0226847eea
4 changed files with 47 additions and 16 deletions
+11 -8
View File
@@ -31,7 +31,7 @@ class SoController extends Controller
$so = new So;
$so = So::where("user_id", Auth::user()->com_id)->first();
$so->ff_id = Auth::user()->company()->id;// have to write a logic (validation) that only freight forwarder that added into contact can use the ff_id
$so->ff_id = Auth::user()->company()->id; // have to write a logic (validation) that only freight forwarder that added into contact can use the ff_id
$so->supplier_company_name = $request->input('supplier_company_name');
$so->supplier_contact_person = $request->input('supplier_contact_person');
$so->supplier_contact_person_no = $request->input('supplier_contact_person_no');
@@ -46,9 +46,8 @@ class SoController extends Controller
foreach ($soitems as $soitem)
{
$new_soitem = new Soitem(array(
'so_id'=>$soitem['so_id'],
'so_id'=>$so->id,
'status'=>$soitem['status'],
'order_id'=>$soitem['order_id'],
'brand_no'=>$soitem['brand_no'],
'model_no'=>$soitem['model_no'],
'item_code'=>$soitem['item_code'],
@@ -72,19 +71,23 @@ class SoController extends Controller
}
/**
* Store a newly created resource in storage.
/**
*cancel the shipping order.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
//post the cancel order
public function cancelOrder(Request $request)
{
$so = So::find($id);
}
$so->save();
$com_id = auth()->user->id;
return response()->json(['so'=>$so],200);
}
/**
* Update the shipping order and item.