Beispiel #1
0
function isDirectAward($rfq)
{
    $quotation = Quotation::whereRfqId($rfq)->first();
    return $quotation->direct_award && Auth::user()->id == $quotation->secretary_id;
}
 /**
  * Display the specified resource.
  * GET /sales/{id}
  *
  * @param  int  $id
  * @return Response
  */
 public function showPdf($rfq)
 {
     $relations = ['customer', 'secretary', 'technical', 'executive', 'attns', 'scopes', 'materials', 'discounts'];
     $quotation = Quotation::whereRfqId($rfq)->first()->load($relations);
     $data['quotation'] = $quotation;
     /*print_r($quotation);*/
     $pdf = PDF::loadView('sales.reports.pdf', $data);
     return $pdf->setPaper(Input::get('size'))->stream();
 }