}); Route::get('erporders/show/{id}', function ($id) { $order = Erporder::findorfail($id); return View::make('erporders.show', compact('order')); }); Route::get('erppurchases/show/{id}', function ($id) { $order = Erporder::findorfail($id); return View::make('erppurchases.show', compact('order')); }); Route::get('erpquotations/show/{id}', function ($id) { $order = Erporder::findorfail($id); return View::make('erpquotations.show', compact('order')); }); Route::get('api/getrate', function () { $id = Input::get('option'); $tax = Tax::find($id); return $tax->rate; }); Route::get('morgue', function () { return View::make('morgue'); }); Route::resource('enquiries', 'EnquiriesController'); Route::get('enquiries/edit/{id}', 'EnquiriesController@edit'); Route::get('enquiries/delete/{id}', 'EnquiriesController@destroy'); Route::post('enquiries/update/{id}', 'EnquiriesController@update'); Route::get('enquiries/show/{id}', 'EnquiriesController@show'); Route::resource('resolutions', 'ResolutionsController'); Route::get('resolutions/create/{id}', 'ResolutionsController@create'); Route::get('resolutions/edit/{id}', 'ResolutionsController@edit'); Route::get('resolutions/delete/{id}', 'ResolutionsController@destroy'); Route::post('resolutions/update/{id}', 'ResolutionsController@update');
/** * Show the form for editing the specified branch. * * @param int $id * @return Response */ public function edit($id) { $tax = Tax::find($id); return View::make('taxes.edit', compact('tax')); }
/** * Return a json list of records matching the provided query * * @return json */ public function ajaxProductPriceSearch() { $product_id = Input::get('product_id'); $customer_id = Input::get('customer_id'); $product_string = Input::get('product_string'); $product = Product::find(intval($product_id)); $tax = Tax::find(intval($product->tax_id)); // ToDo: Calculate priece per $customer_id now! $product->price_customer = 0.83 * $product->price; $product->price_customer_with_tax = $product->price_customer * (1 + $tax->percent / 100); // return Product::searchByNameAutocomplete(Input::get('query')); return View::make('products.ajax.show_price', compact('product', 'tax', 'product_string')); }