public function get_my_quotes()
 {
     // Get customer information
     $customer_id = \Laravel\Session::get('quote_account_id');
     $customer = Customer::find($customer_id);
     // Does this customer exist and we are logged in?
     if (is_null($customer)) {
         return Redirect::to_action('quotations/sign_in')->with('success', 'Please login to access this area!');
     }
     // Get quotes assigned to user account
     $quotes = Quotation::where('customer_id', '=', $customer->id)->order_by('id', 'asc')->get();
     // Return view
     return View::make('quotations.my_quotes')->with('quotes', $quotes);
 }
Esempio n. 2
0
 function quotation($id)
 {
     $adminId = Session::get('admin_id');
     if (!isset($adminId)) {
         return Redirect::to('/');
     }
     if (isset($id)) {
         $patientRequest = PatientRequest::find($id);
         if (isset($patientRequest)) {
             $quotation = Quotation::where('request_id', $id)->first();
             Session::set('current_request_id', $id);
             return View::make('admin.quotation')->with('quoted', isset($quotation))->with('quotation', $quotation);
         }
     }
 }
 /**
  * Show the form for editing the specified resource.
  * GET /sales/{id}/edit
  *
  * @param  int  $id
  * @return Response
  */
 public function editRequest($rfq)
 {
     $data['quotation'] = Quotation::where('rfq_id', 'LIKE', $rfq)->first()->load(['customer', 'notes', 'attns', 'technical']);
     $data['unitOfMeasurementsList'] = $this->lookupSelect('unit_of_measurement');
     $data['technicalsList'] = Role::find(3)->users()->get()->lists('full_name', 'id');
     $data['representativesList'] = $data['quotation']->customer->representatives()->get()->lists('full_name', 'id');
     return View::make('sales.quotations.request', $data);
 }
Esempio n. 4
0
 public function salesorders()
 {
     //FIELDS TO INCLUDE IN VIEW : SO Number || CLIENT || BILLING STATUS || DELIVERY STATUS || TOTAL AMOUNT || REMAINING BLANACE
     return View::make('sales.quotations.salesorders')->withQuotations(Quotation::where('billing_status', 'SalesOrder')->orWhere('billing_status', 'Downpayment')->orWhere('billing_status', 'FullPayment')->paginate(15));
 }