mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/izyim-api.git
synced 2026-09-02 03:13:59 +00:00
bug fixing
This commit is contained in:
@@ -4,6 +4,7 @@ namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use App\So;
|
||||
use App\Warehousearr;
|
||||
use App\Warehouseitem;
|
||||
use App\Decision;
|
||||
@@ -13,47 +14,25 @@ use Validator;
|
||||
class warehouseArrangementController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
* Display a the warehouse arrangement.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$warehousearr = Warehousearr::where('com_id', Auth::user()->company())->where('id', $id)->first();
|
||||
|
||||
if (!$warehousearr)
|
||||
{
|
||||
return response()->json(['message'=>'Access Denied!'], 404);
|
||||
}
|
||||
|
||||
return response()->json(['warehousearr'=>$warehousearr],200);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
$warehousearrs = DB::table('warehousearrs')
|
||||
->select('id', 'so_id', 'receive_on', 'transport_company_name', 'consignment_note_no', 'warehouse_receive_note_no', 'receiving_person', 'marking_number', 'image')
|
||||
->where('com_id', Auth::user()->company())
|
||||
->get();
|
||||
$warehousearr = Warehousearr::where('com_id', Auth::user()->company())->get();
|
||||
|
||||
if (!$warehousearr)
|
||||
{
|
||||
return response()->json(['message'=>'Access Denied!'], 404);
|
||||
}
|
||||
|
||||
return response()->json($warehousearr, 200);
|
||||
return response()->json(['warehousearr'=>$warehousearr],200);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
* Store a warehouse arrangement.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\Http\Response
|
||||
|
||||
+1
-2
@@ -27,8 +27,7 @@ Route::put('/so/{so_id}', 'SoController@update');//update the shipping order
|
||||
|
||||
|
||||
/* Warehouse-receive-note */
|
||||
|
||||
Route::get('/warehousearr','warehouseArrangementController@index');//view the wrn
|
||||
Route::get('/warehousearr','warehouseArrangementController@show');//view the wrn
|
||||
Route::post('/warehousearr','warehouseArrangementController@store');//store the new wrn
|
||||
Route::post('/warehousearr/warehouse_picture/{wa_id}','warehouseArrangementController@warehousearrpic');//upload warehousepicture picture
|
||||
Route::post('/warehousearr/warehouse_item_picture/{wa_id}','warehouseArrangementController@warehouseitempic');//upload warehousepicture picture
|
||||
|
||||
Reference in New Issue
Block a user