示例#1
0
 /**
  * Show the form for editing the specified erporder.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $erporder = Erporder::find($id);
     return View::make('erporders.edit', compact('erporder'));
 }
示例#2
0
文件: routes.php 项目: kenkode/xpose
    //Session::purge('orderitems');
    //Session::purge('erporder');
    return Redirect::to('salesorders');
});
Route::get('erporders/cancel/{id}', function ($id) {
    $order = Erporder::findorfail($id);
    $order->status = 'cancelled';
    $order->update();
    return Redirect::to('salesorders');
});
Route::get('erporders/show/{id}', function ($id) {
    $order = Erporder::findorfail($id);
    return View::make('erporders.show', compact('order'));
});
Route::get('salesinvoice/{id}', function ($id) {
    $order = Erporder::find($id);
    $organization = Organization::find(1);
    $pdf = PDF::loadView('erpreports.salesinvoice', compact('order', 'organization'))->setPaper('a4')->setOrientation('potrait');
    return $pdf->stream('Sales Invoice.pdf');
});
Route::resource('itemcategories', 'ItemcategoriesController');
Route::get('itemcategories/edit/{id}', 'ItemcategoriesController@edit');
Route::get('itemcategories/delete/{id}', 'ItemcategoriesController@destroy');
Route::post('itemcategories/update/{id}', 'ItemcategoriesController@update');
Route::get('erpmigrate', function () {
    return View::make('erpmigrate');
});
Route::post('import/categories', function () {
    if (Input::hasFile('category')) {
        $destination = public_path() . '/migrations/';
        $filename = str_random(12);