コード例 #1
0
 private function saveQuote(Customer $customer)
 {
     // Create new or update existing
     if (\Laravel\Session::get('quote_id')) {
         $quote = Quotation::find(\Laravel\Session::get('quote_id'));
     } else {
         $quote = new Quotation();
         $quote->quick_access_code = md5(md5($customer->id) . time() . md5($quote->id));
     }
     $quote->customer_id = $customer->id;
     $quote->quotation_layouts_id = \Laravel\Session::get('quote_layout_id');
     $quote->postcode = \Laravel\Session::get('quote_postcode');
     $quote->price = Quotation::calcSessionQuotationCurrentValue();
     $quote->quote_customise_swap_window = \Laravel\Session::get('quote_customise_swap_window');
     $quote->quote_customise_swap_wall = \Laravel\Session::get('quote_customise_swap_wall');
     $quote->quote_customise_extra_door = \Laravel\Session::get('quote_customise_extra_door');
     $quote->quote_customise_fanlight = \Laravel\Session::get('quote_customise_fanlight');
     $quote->quote_customise_half_window = \Laravel\Session::get('quote_customise_half_window');
     $quote->quote_customise_picture_window = \Laravel\Session::get('quote_customise_picture_window');
     $quote->quote_decking_composite_deck_910_910 = \Laravel\Session::get('quote_decking_composite_deck_910_910');
     $quote->quote_decking_composite_deck_910_1820 = \Laravel\Session::get('quote_decking_composite_deck_910_1820');
     $quote->quote_decking_composite_deck_910_2730 = \Laravel\Session::get('quote_decking_composite_deck_910_2730');
     $quote->quote_decking_flyover_roof_910_910 = \Laravel\Session::get('quote_decking_flyover_roof_910_910');
     $quote->quote_decking_flyover_roof_910_1820 = \Laravel\Session::get('quote_decking_flyover_roof_910_1820');
     $quote->quote_decking_flyover_roof_910_2730 = \Laravel\Session::get('quote_decking_flyover_roof_910_2730');
     $quote->quote_electrics_double_sockets_450 = \Laravel\Session::get('quote_electrics_double_sockets_450');
     $quote->quote_electrics_double_sockets_1150 = \Laravel\Session::get('quote_electrics_double_sockets_1150');
     $quote->quote_electrics_light_switch = \Laravel\Session::get('quote_electrics_light_switch');
     $quote->quote_electrics_panel_heater = \Laravel\Session::get('quote_electrics_panel_heater');
     $quote->quote_electrics_double_floor_socket = \Laravel\Session::get('quote_electrics_double_floor_socket');
     $quote->quote_electrics_fused_spur_socket = \Laravel\Session::get('quote_electrics_fused_spur_socket');
     $quote->quote_internals_silver_aluminium_venitian_blind_no_screws = \Laravel\Session::get('quote_internals_silver_aluminium_venitian_blind_no_screws');
     $quote->quote_internals_recessed_blinds = \Laravel\Session::get('quote_internals_recessed_blinds');
     $quote->quote_internals_internal_910_partition_wall = \Laravel\Session::get('quote_internals_internal_910_partition_wall');
     $quote->quote_internals_internal_door_dividing_studio = \Laravel\Session::get('quote_internals_internal_door_dividing_studio');
     $quote->quote_internals_internal_wall_corner_post = \Laravel\Session::get('quote_internals_internal_wall_corner_post');
     $quote->quote_other_decoupled_floor = \Laravel\Session::get('quote_other_decoupled_floor');
     $quote->quote_other_aquastep_oak_floor = \Laravel\Session::get('quote_other_aquastep_oak_floor');
     $quote->quote_other_walls_to_timber = \Laravel\Session::get('quote_other_walls_to_timber');
     $quote->quote_other_taller_walls = \Laravel\Session::get('quote_other_taller_walls');
     $quote->quote_other_entry_steps = \Laravel\Session::get('quote_other_entry_steps');
     $quote->quote_other_entry_handrail = \Laravel\Session::get('quote_other_entry_handrail');
     $quote->quote_other_skirt = \Laravel\Session::get('quote_other_skirt');
     $quote->save();
     return $quote;
 }
コード例 #2
0
 public function po_details()
 {
     $data = Input::all();
     $json['po_number'] = $data['po_number'];
     $record = Quotation::find($data['po_number']);
     $json['record'] = $record;
     //return View::make('productions.po_details');
     return json_encode($json);
 }
コード例 #3
-1
 /**
  * Remove the specified resource from storage.
  * DELETE /sales/{id}
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     $quotation = Quotation::find($id);
     $quotation->status = 0;
     $quotation->save();
     return Redirect::route('sales.index');
 }