fixed merged conflicts

This commit is contained in:
Zain Fauzan Rofie Azizi
2018-07-04 10:27:22 +08:00
287 changed files with 34022 additions and 309 deletions
+29 -22
View File
@@ -36,11 +36,20 @@ class SoController extends Controller
$user = Auth::user();
$so = new So;
// Fix : contact undefined, for now just get it from input
$so->ff_id = $contact->id; //ff contact list id
// TODO : check ff_id is belongs to user's friend
$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');
// TODO, FIX : $deliveryinfo undefined, this one need deliveryinfo branch
$so->delivery_id = $deliveryinfo->id; //deli-info id
// TODO, FIX : $warehouse undefined, this one need warehouse branch
$so->warehouse_id = $warehouse->id; //warehouse id
$so->com_id = $user->company(); //company id
$so->save();
@@ -48,29 +57,26 @@ class SoController extends Controller
$soitems = $request->input('soitem');
foreach ($soitems as $soitem)
{
$new_soitem = new Soitem(array(
'so_id'=>$so->id,
'status'=>$soitem['status'],
'brand_no'=>$soitem['brand_no'],
'model_no'=>$soitem['model_no'],
'item_code'=>$soitem['item_code'],
'quantity_of_item'=>$soitem['quantity_of_item'],
'uom'=>$soitem['uom'],
'quantity_of_carton'=>$soitem['quantity_of_carton'],
'packaging_type'=>$soitem['packaging_type'],
'packaging_height'=>$soitem['packaging_height'],
'packaging_width'=>$soitem['packaging_width'],
'packaging_depth'=>$soitem['packaging_depth'],
'packaging_gross'=>$soitem['packaging_gross'],
'packaging_nett'=>$soitem['packaging_nett'],
));
$new_soitem = new Soitem(array(
'so_id'=>$so->id,
'status'=>$soitem['status'],
'brand_no'=>$soitem['brand_no'],
'model_no'=>$soitem['model_no'],
'item_code'=>$soitem['item_code'],
'quantity_of_item'=>$soitem['quantity_of_item'],
'uom'=>$soitem['uom'],
'quantity_of_carton'=>$soitem['quantity_of_carton'],
'packaging_type'=>$soitem['packaging_type'],
'packaging_height'=>$soitem['packaging_height'],
'packaging_width'=>$soitem['packaging_width'],
'packaging_depth'=>$soitem['packaging_depth'],
'packaging_gross'=>$soitem['packaging_gross'],
'packaging_nett'=>$soitem['packaging_nett'],
));
$new_soitem->save();
}
return response()->json(['so'=>$so], 201);
$new_soitem->save();
}
return response()->json(['so'=>$so], 201);
}
/**
@@ -112,6 +118,7 @@ class SoController extends Controller
return response()->json(['message'=>'Access Denied!'], 404);
}
// Fix : contact undefined, for now just get it from input
$so->ff_id = $contact->id;
$so->supplier_company_name = $request->input('supplier_company_name');
$so->supplier_contact_person = $request->input('supplier_contact_person');