public function imprimirPase($id)
 {
     if (Session::get('id')) {
         $usuario = $this->usuariosRepo->buscar(Session::get('id'));
     } else {
         $usuario = $this->usuariosRepo->buscar($id);
     }
     if ($usuario->available_pago === 1 && $usuario->available_perfil === 1) {
         $datetime1 = new DateTime('2014-09-17 12:30:00');
         $datetime2 = new DateTime("now");
         // if( $datetime1 > $datetime2 ){
         // 	Session::flash('aviso', 'Su pase podra ser impreso hasta el miercoles 17 de noviembre del 2014 a las 12:30 pm');
         // 	return Redirect::back();
         // }
         $content = $usuario->id . ',' . $usuario->full_name . ',' . $usuario->email;
         DNS2D::getBarcodePngPath('codeqr', $content, "QRCODE", 7, 7, array(91, 139, 205));
         $html = View::make("imprimir/imprimirPase", compact('usuario'));
         return PDF::load($html, 'A4', 'landscape')->show();
     } else {
         // Session::flash('aviso', 'Su pago no a sido registrado o su perfil aun esta incompleto');
         $usuario = [Auth::user()->available_pago, Auth::user()->available_perfil];
         if ($usuario[0] == 0 && $usuario[1] == 0) {
             Session::flash('aviso', 'Debe completar su perfíl');
         } elseif ($usuario[0] == 0 && $usuario[1] == 1) {
             Session::flash('aviso', 'Su pago no ha sido validado. Intente más tarde');
         }
         return Redirect::route('inicio');
     }
 }
 /**
  * @return mixed
  */
 public function ticketDownload()
 {
     $name = 'thomas';
     $html = view('mails.report', ['name' => $name])->render();
     return $this->pdf->load($html)->download();
     //		return view('mails.report');
 }
 public function reportView($id)
 {
     $loopID = DB::table('tbl_reservation')->where('batch_id', $id)->get();
     $result = array();
     foreach ($loopID as $batch) {
         $sumRow = DB::table('tbl_reservation')->where('batch_id', $id)->sum('total_amount');
         $data = array('id' => $batch->id, 'name' => $batch->full_name, 'date_to' => $batch->date_time_to, 'date_from' => $batch->date_time_from, 'amount' => $batch->total_amount, 'totalAmt' => $sumRow);
         array_push($result, $data);
     }
     //        dd($result[0]["totalAmt"]);
     $viewMake = View::make('admin.pdf.report_verification')->with('result', $result);
     define('BUDGETS_DIR', public_path('uploads/emailReportDelete'));
     // I define this in a constants.php file
     if (!is_dir(BUDGETS_DIR)) {
         mkdir(BUDGETS_DIR, 0755, true);
     }
     $pdf = new \Thujohn\Pdf\Pdf();
     $pdf->load($viewMake, 'A4', 'portrait')->download('report');
     $pdfPath = BUDGETS_DIR . '/report.pdf';
     File::put($pdfPath, PDF::load($viewMake, 'A4', 'portrait')->output());
     if (File::exists($pdfPath)) {
         File::delete($pdfPath);
     }
     PDF::clear();
 }
 public function disciplinaCursadaAluno()
 {
     $rel = Historico::select('ccr.id AS id_ccr', 'ccr.nome_ccr AS nome_ccr', DB::raw('COUNT(status_his) AS cursadas'), 'historico_his.id AS id_his', 'historico_his.status_his AS status_his', 'historico_his.id_alu_his AS id_alu_his', 'historico_his.ano_his AS ano_his', 'ddi.id AS id_dis', 'ddi.semestre_dis AS semestre_dis', 'aluno_alu.nome_alu AS nome_alu', 'aluno_alu.id AS id_alu')->leftJoin('aluno_alu', 'aluno_alu.id', '=', 'historico_his.id_alu_his')->leftJoin('componente_curricular_ccr AS ccr', 'ccr.id', '=', 'historico_his.id_dis_his')->leftJoin('disciplina_dis AS ddi', 'ddi.id', '=', 'historico_his.id_dis_his')->where('status_his', 1)->groupBy('id_alu_his')->get();
     //-----------ThuJohnPDF--------------
     return PDF::load(View::make('relatorio.DisciplinaCursadaAluno', ['rel' => $rel]), 'A4', 'portrait')->show('Disciplina_Cursada_por_Aluno');
     PDF::clear();
     //-----------ThuJohnPDF--------------
 }
Exemple #5
0
 function showAnalytics()
 {
     $users = $this->usuariosRepo->asistentesAlfabeticos();
     $users2 = $this->usuariosRepo->asistentesVendedor();
     $users3 = $this->usuariosRepo->usuariosTipo();
     $vendedores = $this->usuariosRepo->vendedores();
     $html = View::make("imprimir/analytics", compact('users', 'users2', 'users3', 'vendedores'));
     return PDF::load($html, 'A4', 'portrait')->show();
 }
Exemple #6
0
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function fire()
 {
     $query = "SELECT c.code, a.role, a.due_date_of_inspection,a.date_of_inspection,a.maintenance_by,a.designation FROM nfr_jp_crossing_inspection_ledger a INNER JOIN (SELECT station_id, MAX(due_date_of_inspection) due_date_of_inspection FROM nfr_jp_crossing_inspection_ledger GROUP BY station_id) b ON a.station_id = b.station_id AND a.due_date_of_inspection = b.due_date_of_inspection ,nfr_station_master c WHERE a.station_id=c.id and a.due_date_of_inspection<NOW() ORDER BY a.due_date_of_inspection,a.station_id";
     $data = DB::select(DB::raw($query));
     $result = array();
     for ($i = 0; $i < count($data); $i++) {
         $row = array('station' => $data[$i]->code, 'due_date_of_inspection' => $data[$i]->due_date_of_inspection);
         array_push($result, $row);
     }
     $html = '<html><body>' . '<p>Hello, Welcome to TechZoo.</p>' . '</body></html>';
     $mailAttachment = PDF::load($html, 'A4', 'portrait')->show('my_pdf');
     Mail::send('emails.reports', $result, function ($message) {
         $message->from('*****@*****.**', 'DSMG');
         $message->to('*****@*****.**')->subject('DSMG overdue report');
     });
 }
 /**
  * Envia o pedido via e-mail
  * para o fornecedor ou e-mail selecionado
  *
  * @param  string  $email
  * @return Response
  */
 public function sendNow()
 {
     $data = Input::all();
     $pedido = Pedido::find($data['id']);
     $pedido->cliente = Cliente::find($pedido->cliente_id);
     $pedido->fornecedor = Fornecedor::find($pedido->fornecedor_id);
     $pedido->vendedor = Vendedor::find($pedido->vendedor_id);
     //$produtos            = Produto::all();
     // Formata data
     $pedido->entrega_data = date("d/m/Y", strtotime($pedido->entrega_data));
     $pedido->data = date("d/m/Y", strtotime($pedido->created_at));
     // Decode JSON
     $pedido->itens = json_decode($pedido->itens, true);
     $itens = array();
     for ($i = 0; $i < count($pedido->itens['qtd']); $i++) {
         // Loop no primeiro item pra pegar a quantidade de linhas
         $itens[$i] = array('qtd' => $pedido->itens['qtd'][$i], 'unidade' => $pedido->itens['unidade'][$i], 'produto' => Produto::find($pedido->itens['produto_id'][$i]), 'preco' => number_format($pedido->itens['preco'][$i], '2', ',', '.'), 'subtotal' => number_format($pedido->itens['subtotal'][$i], '2', ',', '.'));
     }
     $pedido->itens = $itens;
     $pedido->total = number_format($pedido->total, '2', ',', '.');
     //return View::make('pedidos.email.index', compact('pedido','fornecedores'));
     // Change Pedido Status
     $p = Pedido::find($data['id']);
     $p->status = '2';
     $p->save();
     $data['fornecedor'] = $pedido->fornecedor->empresa ? $pedido->fornecedor->empresa : @$pedido->fornecedor->nome;
     $data['pedido'] = $pedido;
     //SEND THE MAIL
     Mail::send('pedidos.email.preview', compact('pedido', 'fornecedores'), function ($message) use($data) {
         //$message->from('*****@*****.**', 'L. Tonet');
         $message->from('*****@*****.**', 'Olmar Primieri');
         $message->to($data['to']);
         if (isset($data['cc']) and !empty($data['cc'])) {
             $message->cc($data['cc']);
             //append to report record
             $reportMsg = ' com CC: <' . $data['cc'] . '>';
         }
         $message->subject('NOVO PEDIDO - Olmar Primieri (' . $data['fornecedor'] . ')');
         // Log this
         // Report::create([
         //       'user_id'        => Auth::id(),
         //       'status'         => 'success',
         //       'event'          => 'sended',
         //       'title'          => 'Pedido enviado para <'. $data['to'] .'>'.@$reportMsg,
         //       'resource_model' => 'Pedido',
         //       'resource_id'    => $data['pedido']->id,
         //       'resource_obj'   => json_encode($data['pedido']),
         //    ]);
     });
     // MAIL TO CLIENTe (cc)
     if (isset($data['to_client']) and !empty($data['to_client'])) {
         $data['cliente_nome'] = $pedido->nome;
         Mail::send('pedidos.email.preview', compact('pedido', 'fornecedores'), function ($message) use($data) {
             $message->to($data['to_client'], $data['cliente_nome'])->subject('SEU PEDIDO - Olmar Primieri');
             // Report::create([
             //    'user_id'        => Auth::id(),
             //    'status'         => 'success',
             //    'event'          => 'sended',
             //    'title'          => 'Pedido enviado para "'. $data['cliente_nome'] . ' <'.$data['to_client'] .'>"',
             //    'resource_model' => 'Pedido',
             //    'resource_id'    => $pedido->id,
             //    'resource_obj'   => json_encode($pedido),
             // ]);
         });
     }
     /**
      *    PDF VIA EMAIL
      */
     define('PEDIDOS_DIR', public_path('uploads/pedidos'));
     // I define this in a constants.php file
     if (!is_dir(PEDIDOS_DIR)) {
         mkdir(PEDIDOS_DIR, 0755, true);
     }
     $outputName = 'PEDIDO-' . $pedido->id;
     $pdfPath = PEDIDOS_DIR . '/' . $outputName . '.pdf';
     File::put($pdfPath, PDF::load($view, 'A4', 'portrait')->output());
     Mail::send('pedidos.email', $data, function ($message) use($pdfPath) {
         //$message->from('*****@*****.**', 'Laravel');
         $message->to('*****@*****.**');
         $message->attach($pdfPath);
     });
     // $alert = array(
     //                'alert-danger' => 'Opa, algo errado. Não deu para enviar o pedido.'
     //             );
     // Session::flash('alerts', $alert);
     // return Redirect::route('pedidos.index');
     // }else{
     $alert[] = ['class' => 'alert-success', 'message' => 'O pedido foi enviado! Note que se você alterar este pedido novamente, o status mudará para <strong>não enviado</strong>.'];
     Session::flash('alerts', $alert);
     return Redirect::route('pedidos.index');
     // }
 }
 public function reportegeneralusuarios()
 {
     $usuarios = Usuario::all();
     $html = View::make('administrador.usuarios.reporteusuarios')->with('usuarios', $usuarios);
     return PDF::load($html, 'A4', 'portrait')->download('usuariosreportes');
     //return PDF::download($html, 'A4', 'portrait')->show();
     //return View::make('administrador.usuarios.reporteusuarios')->with('usuarios',$usuarios);
 }
 public function prueba()
 {
     try {
         $req3 = DB::table('requerimientos')->get();
     } catch (ErrorException $e) {
     }
     return PDF::load($req3, 'A4', 'portrait')->download('reporte_requerimientos');
     //return View::make('requerimientos2')->with('reqt', $reqt);
 }
Exemple #10
0
 function pdf_record()
 {
     $appointment = Appointment::find(Input::get('id'));
     $patient = $appointment->patient;
     //      Personal Information
     $dob = date('j F, Y', strtotime($patient->dob));
     $html = "<html><body>" . " <img src='./images/logo_new1.jpg'/>\n                <center>\n                    <h1><u> {$patient->name} Medical Record </u></h1>\n                </center>\n                <table style='width: 80%; border-collapse: collapse; margin-left:auto; margin-right:auto' cellpadding='7' border='1'>\n                    <caption>(Personal Information)</caption>\n                    <tr>\n                        <td height='20'><label>Patient Name:</label></td>\n                        <td><label> {$patient->name} </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'><label>Patient ID:</label></td>\n                        <td><label> {$patient->patient_id} </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'><label>Date of Birth:</label></td>\n                        <td><label> {$dob} </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'><label>Gender:</label></td>\n                        <td><label> {$patient->gender} </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'><label>Age:</label></td>\n                        <td><label> {$patient->age} Years</label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'><label>Email:</label></td>\n                        <td><label> {$patient->email} </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'><label>City:</label></td>\n                        <td><label> {$patient->city} </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'> <label>Country:</label></td>\n                        <td><label> {$patient->country} </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'> <label>Address:</label></td>\n                        <td><label> {$patient->address} </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'> <label>Phone:</label></td>\n                        <td><label> {$patient->phone} </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'> <label>CNIC:</label></td>\n                        <td><label> {$patient->cnic} </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'> <label>Additional Info:</label></td>\n                        <td><label> {$patient->note} </label></td>\n                    </tr>\n                </table>";
     //      Appointment Details
     $doctor = $appointment->employee->name;
     $visit_date = date('j F, Y', strtotime($appointment->date));
     if ($appointment->checkupfee) {
         $checkup_fee = $appointment->checkupfee->checkup_fee;
     } else {
         $checkup_fee = 0;
     }
     $html .= "<br> <br>\n                <table style='border-collapse: collapse; margin-left:auto; margin-right:auto' cellpadding='7' border='1'>\n                    <caption>(Appointment Details)</caption>\n                    <tr>\n                        <td height='20'><label>Visit Date:</label></td>\n                        <td><label> {$visit_date} </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'><label>Visit Time:</label></td>\n                        <td><label> {$appointment->time} </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'><label>Doctor Name:</label></td>\n                        <td><label> {$doctor} </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'><label>Checkup Reason:</label></td>\n                        <td><label> {$appointment->checkup_reason} </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'> <label>Checkup Fee:</label></td>\n                        <td><label> {$checkup_fee}-/Rs </label></td>\n                    </tr>\n                </table>";
     //      Prescription
     if ($appointment->prescription) {
         $medicines = [];
         foreach (explode(',', $appointment->prescription->medicines) as $id) {
             array_push($medicines, Medicine::find($id));
         }
         $doctor = $appointment->employee->name;
         $code = $appointment->prescription->code;
         $note = $appointment->prescription->note;
         $proc = $appointment->prescription->procedure;
         $html .= "<br> <br> <br> <br> <br>\n                <table style='border-collapse: collapse; margin-left:auto; margin-right:auto' cellpadding='7' border='1'>\n                    <caption>(Prescription)</caption>\n                    <tr>\n                        <td height='20'><label>Patient Name:</label></td>\n                        <td><label> {$patient->name} </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'><label>Patient ID:</label></td>\n                        <td><label> {$patient->patient_id} </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'><label>Visit Date:</label></td>\n                        <td><label> {$appointment->date} </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'><label>Visit Time:</label></td>\n                        <td><label> {$appointment->time} </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'><label>Doctor Name:</label></td>\n                        <td><label> {$doctor} </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'><label>Prescription Code:</label></td>\n                        <td><label> {$code} </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'> <label>Medicines:</label></td>\n                        <td><label>";
         foreach ($medicines as $index => $medicine) {
             $html .= $index + 1 . ' - ' . $medicine->name . "<br />";
         }
         $html .= "</label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'><label>Note:</label></td>\n                        <td><label> {$note} </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'><label>Diagnostic Procedure:</label></td>\n                        <td><label> {$proc} </label></td>\n                    </tr>\n                </table>";
     }
     //      Vitalsigns
     if ($appointment->vitalsign) {
         $note = $appointment->vitalsign->note;
         $vitals = $appointment->vitalsign;
         $html .= "<br> <br>\n                <table style='border-collapse: collapse; margin-left:auto; margin-right:auto' cellpadding='7' border='1'>\n                    <caption>(Vital Signs)</caption>\n                    <tr>\n                        <td height='20'><label>Patient Height:</label></td>\n                        <td><label> {$vitals->height} - cm </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'><label>Patient Weight:</label></td>\n                        <td><label> {$vitals->weight} - kg </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'><label>Blood Pressure (Systolic):</label></td>\n                        <td><label> {$vitals->bp_systolic} - mmHg </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'><label>Blood Pressure (Diastolic):</label></td>\n                        <td><label> {$vitals->bp_diastolic} - mmHg </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'><label>Blood Group:</label></td>\n                        <td><label> {$vitals->blood_group} </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'><label>Pulse Rate:</label></td>\n                        <td><label> {$vitals->pulse_rate} - per min </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'><label>Respiration Rate:</label></td>\n                        <td><label> {$vitals->respiration_rate} - per min </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'> <label>Temperature:</label></td>\n                        <td><label> {$vitals->temprature} - {$vitals->temprature_unit} </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'><label>Note:</label></td>\n                        <td><label> {$vitals->note} </label></td>\n                    </tr>\n                </table>";
     }
     //        Diagnostic Procedure
     if ($appointment->diagonosticprocedure) {
         $note = $appointment->diagonosticprocedure->procedure_note;
         $html .= "<br> <br>\n                <table style='border-collapse: collapse; margin-left:auto; margin-right:auto' cellpadding='7' border='1'>\n                    <caption>(Diagnostic Procedure)</caption>\n                    <tr>\n                        <td height='20'><label>Procedure Note:</label></td>\n                        <td><label> {$note} </label></td>\n                    </tr>\n                </table>";
     }
     //        Lab Tests
     if ($appointment->labtests) {
         foreach ($appointment->labtests as $labtest) {
             $html .= "<br> <br>\n                <table style='border-collapse: collapse; margin-left:auto; margin-right:auto' cellpadding='7' border='1'>\n                    <caption>(Lab Test)</caption>\n                    <tr>\n                        <td height='20'><label>Test Name:</label></td>\n                        <td><label> {$labtest->test_name} </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'><label>Test Description:</label></td>\n                        <td><label> {$labtest->test_description} </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'><label>Test Results:</label></td>\n                        <td><label> {$labtest->test_results} </label></td>\n                    </tr>\n                </table>";
         }
     }
     //        Family History
     if ($patient->familyhistories) {
         foreach ($patient->familyhistories as $familyhistory) {
             $html .= "<br> <br>\n                <table style='border-collapse: collapse; margin-left:auto; margin-right:auto' cellpadding='7' border='1'>\n                    <caption>(Family History)</caption>\n                    <tr>\n                        <td height='20'><label>Family Member Name:</label></td>\n                        <td><label> {$familyhistory->f_member_name} </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'><label>Relation wtih Patient:</label></td>\n                        <td><label> {$familyhistory->patient_relation} </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'><label>Gender:</label></td>\n                        <td><label> {$familyhistory->gender} </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'><label>Age:</label></td>\n                        <td><label> {$familyhistory->age} </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'><label>Disease Note:</label></td>\n                        <td><label> {$familyhistory->diesease_note} </label></td>\n                    </tr>\n                </table>";
         }
     }
     //        Surgical History
     if ($patient->surgicalhistories) {
         foreach ($patient->surgicalhistories as $surgicalhistory) {
             $date = date('j F, Y', strtotime($surgicalhistory->surgery_date));
             $html .= "<br> <br>\n                <table style='border-collapse: collapse; margin-left:auto; margin-right:auto' cellpadding='7' border='1'>\n                    <caption>(Surgical History)</caption>\n                    <tr>\n                        <td height='20'><label>Surgery Name:</label></td>\n                        <td><label> {$surgicalhistory->surgery_name} </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'><label>Surgery Date:</label></td>\n                        <td><label> {$date} </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'><label>Surgery Note:</label></td>\n                        <td><label> {$surgicalhistory->surgery_notes} </label></td>\n                    </tr>\n                </table>";
         }
     }
     //        Previous Diseases
     if ($patient->previousdiseases) {
         foreach ($patient->previousdiseases as $disease) {
             $html .= "<br> <br>\n                <table style='border-collapse: collapse; margin-left:auto; margin-right:auto' cellpadding='7' border='1'>\n                    <caption>(Previous Disease)</caption>\n                    <tr>\n                        <td height='20'><label>Disease Name:</label></td>\n                        <td><label> {$disease->disease_name} </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'><label>Disease Note:</label></td>\n                        <td><label> {$disease->disease_notes} </label></td>\n                    </tr>\n                </table>";
         }
     }
     //        Drug Usage
     if ($patient->drugusages) {
         foreach ($patient->drugusages as $drug) {
             $html .= "<br> <br>\n                <table style='border-collapse: collapse; margin-left:auto; margin-right:auto' cellpadding='7' border='1'>\n                    <caption>(Drug Usage)</caption>\n                    <tr>\n                        <td height='20'><label>Drug Name:</label></td>\n                        <td><label> {$drug->drug_name} </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'><label>Usage Note:</label></td>\n                        <td><label> {$drug->usage_note} </label></td>\n                    </tr>\n                </table>";
         }
     }
     //        Allergy
     if ($patient->allergies) {
         foreach ($patient->allergies as $allergy) {
             $html .= "<br> <br>\n                <table style='border-collapse: collapse; margin-left:auto; margin-right:auto' cellpadding='7' border='1'>\n                    <caption>(Allergy)</caption>\n                    <tr>\n                        <td height='20'><label>Allergy Name:</label></td>\n                        <td><label> {$allergy->allergy_name} </label></td>\n                    </tr>\n                    <tr>\n                        <td height='20'><label>Allergy Note:</label></td>\n                        <td><label> {$allergy->allergy_note} </label></td>\n                    </tr>\n                </table>";
         }
     }
     $html .= "</body></html>";
     return PDF::load($html, 'A4', 'portrait')->show($patient->name . ' Medical Record');
 }
 public function export($id)
 {
     if (Auth::check()) {
         $data["inside_url"] = Config::get('app.inside_url');
         $data["user"] = Session::get('user');
         // Verifico si el usuario es un Webmaster
         if ($data["user"]->idrol == 1 || $data["user"]->idrol == 2 || $data["user"]->idrol == 3 || $data["user"]->idrol == 4 || $data["user"]->idrol == 7 || $data["user"]->idrol == 9 || $data["user"]->idrol == 10 || $data["user"]->idrol == 11 || $data["user"]->idrol == 12) {
             $plan = PlanAprendizaje::find($id);
             if (!$plan) {
                 Session::flash('error', 'No se encontró el plan de aprendizaje.');
                 return Redirect::to('plan_aprendizaje/index');
             }
             $data["plan"] = $plan;
             $html = View::make('investigacion.proyecto.plan_aprendizaje.export', $data);
             return PDF::load($html, "A4", "portrait")->download('Plan de aprendizaje - ' . $data["plan"]->proyecto->codigo);
         } else {
             return View::make('error/error', $data);
         }
     } else {
         return View::make('error/error', $data);
     }
 }
 public function getLocationDetails()
 {
     $locations = Location::get();
     $result = View::make('reports.locationslist', ['locations' => $locations]);
     return PDF::load($result, 'A4', 'portrait')->download();
 }
    public function export_pdf()
    {
        if (Auth::check()) {
            $data["inside_url"] = Config::get('app.inside_url');
            $data["user"] = Session::get('user');
            // Verifico si el usuario es un Webmaster
            if ($data["user"]->idrol == 1 || $data["user"]->idrol == 2 || $data["user"]->idrol == 3 || $data["user"]->idrol == 4 || $data["user"]->idrol == 5 || $data["user"]->idrol == 6 || $data["user"]->idrol == 7 || $data["user"]->idrol == 8 || $data["user"]->idrol == 9 || $data["user"]->idrol == 10 || $data["user"]->idrol == 11 || $data["user"]->idrol == 12) {
                $solicitud_id = Input::get('solicitud_id');
                $solicitud = SolicitudCompra::find($solicitud_id);
                if ($solicitud == null) {
                    $url = "solicitudes_compra/edit_solicitud_compra" . "/" . $solicitud_id;
                    return Redirect::to($url);
                }
                $servicio = Servicio::find($solicitud->idservicio);
                $familia = FamiliaActivo::find($solicitud->idfamilia_activo);
                $usuario = User::find($solicitud->id_responsable);
                $tipo_solicitud = TipoSolicitudCompra::find($solicitud->idtipo_solicitud_compra);
                $estado = Estado::find($solicitud->idestado);
                $documento = Documento::searchDocumentoByIdSolicitudCompra($solicitud_id)->get();
                $documento = $documento[0];
                $detalle_solicitud = DetalleSolicitudCompra::getDetalleSolicitudCompra($solicitud_id)->get();
                $size = count($detalle_solicitud);
                $table = '<table style="width:100%">' . '<tr><th>Descripcion</th><th>Marca</th><th>Modelo</th><th>Serie/Numero Parte</th><th>Cantidad</th></tr>';
                for ($i = 0; $i < $size; $i++) {
                    $detalle = $detalle_solicitud[$i];
                    $table = $table . '<tr>' . '<td>' . $detalle->descripcion . '</td>' . '<td>' . $detalle->modelo . '</td>' . '<td>' . $detalle->marca . '</td>' . '<td>' . $detalle->serie_parte . '</td>' . '<td>' . $detalle->cantidad . '</td>' . '</tr>';
                }
                $table = $table . '</table>';
                $html = '<html><head><style>' . 'table, th, td {
    						border: 1px solid black;
    						border-collapse: collapse;
						}' . 'th, td {
							text-align: center;
						}' . '.lista_generales{
							list-style-type:none;
							border:1px solid black;
							width:100%;
						}' . 'li{
							margin-bottom:5px;
							margin-left:-15px;
						}' . '.nombre_general{
							width:100%;
						}' . '#titulo{
							text-align:center;
							margin-top:60px;
							position:fixed;
						}' . '#logo{
							padding:10px 10px 10px 10px;	
						}' . '</style>
						</head>' . '<div class="nombre_general"><img id="logo" src="img/logo_uib.jpg" ></img><h2 id="titulo" >Requerimiento de Compra: N°' . $solicitud->idsolicitud_compra . '</h2></div>' . '<div>' . '<ul class="lista_generales">' . '<li><label><strong>Numero Orden de Mantenimiento</strong></label>: OT N° ' . $solicitud->idordenes_trabajo . '</li>' . '<li><label><strong>Servicio: </strong></label>' . $servicio->nombre . '</li>' . '<li><label><strong>Nombre del Equipo: </strong></label>' . $familia->nombre_equipo . '</li>' . '<li><label><strong>Usuario Responsable: </strong></label>' . $usuario->apellido_pat . ' ' . $usuario->apellido_mat . ', ' . $usuario->nombre . '</li>' . '<li><label><strong>Tipo de Requerimiento: </strong></label>' . $tipo_solicitud->nombre . '</li>' . '<li><label><strong>Fecha: </strong></label>' . $solicitud->fecha . '</li>' . '<li><label><strong>Estado: </strong></label>' . $estado->nombre . '</li>' . '<li><label><strong>Sustento: </strong></label>' . $solicitud->sustento . '</li>' . '<li><label><strong>Reporte de Necesidad: </strong></label>' . $documento->codigo_archivamiento . '</li>' . '</ul></div>' . '<div>' . $table . '</div>' . '</html>';
                return PDF::load($html, "A4", "portrait")->show();
            } else {
                return View::make('error/error', $data);
            }
        } else {
            return View::make('error/error', $data);
        }
    }
Exemple #14
0
    public function pdfReporteBusquedaFrase()
    {
        /*CONTRASEÑA Actualizar*/
        $data = array('buscar' => Input::get('b'));
        /*  $data = array(
              'palabra1' => "leyes",
              'palabra2' => "distrito",
              'palabra3' => "",
              'palabra4' => "",
              'condicion'=> 1
            );*/
        /*  $palabra1 = $data['palabra1'];
            $palabra2 = $data['palabra2'];
            $palabra3 = $data['palabra3'];
            $palabra4 = $data['palabra4'];
        */
        $busqueda = ArticulosController::getBusquedaFrase($data['buscar']);
        $fecha = ReportesController::getFecha();
        $i = 0;
        $cuerpoTabla = '';
        foreach ($busqueda as $value) {
            $i = $i + 1;
            $titulo = $value->artTitulo;
            $tipo;
            if ($value->artTipo == 1) {
                $tipo = "artículo";
            }
            if ($value->artTipo == 2) {
                $tipo = "consulta";
            }
            if ($value->artTipo == 3) {
                $tipo = "tesis";
            }
            if ($value->artTipo == 4) {
                $tipo = "jurisprudencia";
            }
            if ($value->artTipo == 5) {
                $tipo = "tips";
            }
            $autor;
            if ($value->artAutor == null || $value->artAutor == "" || $value->artAutor == "") {
                $autor = "Sin autor";
            } else {
                $autor = $value->artAutor;
            }
            $pagina = $value->artPagina;
            $revista = $value->revNombre;
            $numero = $value->reNumero;
            $anio = $value->reAnio;
            $mes = ReportesController::selectMes($value->reMes);
            //  $autor = $value['artAutor'];
            $ubicacion = $value->reUbicacion;
            $cuerpoTabla = $cuerpoTabla . '<tr>
          <td>
            <div align="center">
            <p style="font-size:10px; ">' . $i . '</p>
            </div>
          </td>
          <td  >
            <div align="justify">
            <p style="font-size:10px; padding:0 5px 0 5px ">' . $titulo . '</p>
            </div>
          </td>
          <td>
            <div align="center">
            <p style="font-size:10px; ">' . $tipo . '</p>
            </div>
          </td>
          <td >
            <div align="center">
            <p style="font-size:10px; ">' . $pagina . '</p>
            </div>
          </td>
          <td >
            <div align="center">
            <p style="font-size:10px; ">' . $revista . '</p>
            </div>
          </td>
          <td >
            <div align="center">
            <p style="font-size:10px; ">' . $numero . '</p>
            </div>
          </td>
          <td >
            <div align="center">
            <p style="font-size:10px; ">' . $anio . '</p>
            </div>
          </td>
          <td >
            <div align="center">
            <p style="font-size:10px; ">' . $mes . '</p>
            </div>
          </td>
          <td >
            <div align="center">
            <p style="font-size:10px; ">' . $autor . '</p>
            </div>
          </td>

        </tr>';
            /*<td >
                <div align="center">
                <p style="font-size:10px; ">'.$ubicacion.'</p>
                </div>
              </td>*/
        }
        $html = '<html><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><body>' . '<span align="left">Buscador de revistas</span>' . '<h3 align="center">Resultados de búsqueda</h3>' . '<p><strong>   Termino(s) de busqueda: </strong>' . $data['buscar'] . ' </p>' . '<table cellspacing="0"  border="1" align="center" width="550" >
      <tbody >
        <tr style="background:#0d47a1;">
          <th>
            <div align="center">
            </div>
          </th>
          <th>
            <div align="center">
              <h5 style="color:#fff;"><strong>Título</strong> </h5>
            </div>
          </th>
          <th>
            <div align="center">
              <h5 style="color:#fff;"><strong>Tipo</strong> </h5>
            </div>
          </th>
          <th>
            <div align="center">
              <h5 style="color:#fff;"><strong>Página</strong> </h5>
            </div>
          </th>
          <th>
            <div align="center">
              <h5 style="color:#fff;"><strong>Revista</strong> </h5>
            </div>
          </th>
          <th>
            <div align="center">
              <h5 style="color:#fff;"><strong>Número</strong> </h5>
            </div>
          </th>
          <th>
            <div align="center">
              <h5 style="color:#fff;"><strong>Año</strong> </h5>
            </div>
          </th>
          <th>
            <div align="center">
            <h5 style="color:#fff;"><strong>Mes</strong> </h5>
            </div>
          </th>
          <th>
            <div align="center">
            <h5 style="color:#fff;"><strong>Autor</strong> </h5>
            </div>
          </th>

        </tr>' . $cuerpoTabla . '</tbody
     </table>' . '<p style="font-size:10px; "> Total: <CODE >' . $i . '  </code>' . $fecha . '</code> </p>' . ' </code> </body></html>';
        return PDF::load($html, 'letter', 'portrait')->show();
    }
Exemple #15
0
 public function printOrderClient()
 {
     $data = Request::all();
     $id_order = $data['order_id'];
     TblOrder::where('id_order', '=', $id_order)->update(array('total_price' => $data['subTotal'], 'vat' => $data['iva'], 'global_discount' => $data['discount']));
     $config = Configuration::All();
     foreach ($config as $value) {
         ${$value}['name'] = $value['value'];
         echo ${$value}['name'] . "<br>";
     }
     /* Variables */
     //restaurent_name
     //address
     //nif
     //default_lang
     //owner
     //email
     //web
     //phone
     //phone2
     $order = TblOrder::with("Table", "TblOrderItem")->find($id_order);
     $html = "<html><body><div style='width: 200px;font-size:10px;'>" . "<header style='text-align:center;'>" . "<span style='font-size:14px;font-weight:bold;'>{$restaurent_name}</span><br><span style='font-size:12px;'>{$address}</span></header><br>";
     $html .= "<div style='text-align:center;'><table style='margin:auto;font-size:10px;'><thead><tr><td>No</td><td>Items</td><td>Price/u</td><td>Quantity</td><td>Total</td></tr></thead>" . "<tbody>";
     $count = 1;
     $total_price = 0;
     foreach ($order->tbl_order_item as $value) {
         $item = Item::find($value['id_food_items']);
         $total_item_price = $value['unit_price'] * $value['quantity'];
         $html .= "<tr><td>" . $count . "</td><td>" . $item['name'] . "</td><td>" . $value['unit_price'] . "</td><td>" . $value['quantity'] . "</td><td>" . $total_item_price . "</td></tr>";
         $count++;
         $total_price = $total_price + $total_item_price;
     }
     $html .= "<tr><td style='border-top:1pt dotted black;'></td><td style='border-top:1pt dotted black;'>sub total</td><td style='border-top:1pt dotted black;'></td><td style='border-top:1pt dotted black;'></td><td style='border-top:1pt dotted black;'>" . $total_price . "</td></tr>";
     if ($data['discount'] !== 0) {
         $html .= "<tr><td></td><td>Discount</td><td></td><td></td><td>" . $data['discount'] . "</td></tr>";
     }
     $iva = ($total_price - $data['discount']) * 0.21;
     $html .= "<tr><td></td><td>IVA(21%)</td><td></td><td></td><td>" . $iva . "</td></tr>";
     $html .= "<tr><td style='border-top:1pt solid black;'></td><td style='border-top:1pt solid black;'>Total</td><td style='border-top:1pt solid black;'></td><td style='border-top:1pt solid black;'></td><td style='border-top:1pt solid black;'>" . ($total_price + $iva) . "</td></tr>";
     $html = $html . "</tbody></table></div></div></body><html>";
     return PDF::load($html, '', 'portrait')->show();
     //return $html;
 }
 public function export_pdf()
 {
     if (Auth::check()) {
         $data["inside_url"] = Config::get('app.inside_url');
         $data["user"] = Session::get('user');
         // Verifico si el usuario es un Webmaster
         if ($data["user"]->idrol == 1 || $data["user"]->idrol == 2 || $data["user"]->idrol == 3 || $data["user"]->idrol == 4 || $data["user"]->idrol == 5 || $data["user"]->idrol == 6 || $data["user"]->idrol == 7 || $data["user"]->idrol == 8 || $data["user"]->idrol == 9 || $data["user"]->idrol == 10 || $data["user"]->idrol == 11 || $data["user"]->idrol == 12) {
             $idot_correctivo = Input::get('idot_correctivo');
             $ot_correctivo = OtCorrectivo::searchOtById($idot_correctivo)->get();
             if ($ot_correctivo->isEmpty()) {
                 Session::flash('error', 'No se encontró la OT.');
                 return Redirect::to('mant_correctivo/list_mant_correctivo');
             }
             $data["ot_correctivo"] = $ot_correctivo[0];
             $data["tareas"] = TareasOtCorrectivo::getTareasXOtXActi($idot_correctivo)->get();
             $data["repuestos"] = RepuestosOtCorrectivo::getRepuestosXOtXActi($idot_correctivo)->get();
             $data["personal"] = PersonalOtCorrectivo::getPersonalXOtXActi($idot_correctivo)->get();
             $data["estado_ot"] = Estado::find($data["ot_correctivo"]->idestado_ot);
             $data["prioridad"] = Prioridad::find($data["ot_correctivo"]->idprioridad);
             $data["tipo_falla"] = TipoFalla::find($data["ot_correctivo"]->idtipo_falla);
             $data["estado_inicial_activo"] = Estado::find($data["ot_correctivo"]->idestado_inicial);
             $data["estado_final_activo"] = Estado::find($data["ot_correctivo"]->idestado_final);
             $html = View::make('ot/correctivo/otCorrectivoExport', $data);
             return PDF::load($html, "A4", "portrait")->download('OTM Correctivo - ' . $data["ot_correctivo"]->ot_tipo_abreviatura . $data["ot_correctivo"]->ot_correlativo . $data["ot_correctivo"]->ot_activo_abreviatura);
         } else {
             return View::make('error/error', $data);
         }
     } else {
         return View::make('error/error', $data);
     }
 }
 public function export_pdf()
 {
     if (Auth::check()) {
         $data["inside_url"] = Config::get('app.inside_url');
         $data["user"] = Session::get('user');
         // Verifico si el usuario es un Webmaster
         if ($data["user"]->idrol == 1 || $data["user"]->idrol == 2 || $data["user"]->idrol == 3 || $data["user"]->idrol == 4 || $data["user"]->idrol == 5 || $data["user"]->idrol == 6 || $data["user"]->idrol == 7 || $data["user"]->idrol == 8 || $data["user"]->idrol == 9 || $data["user"]->idrol == 10 || $data["user"]->idrol == 11 || $data["user"]->idrol == 12) {
             $idot_busqueda_info = Input::get('idot_busqueda_info');
             $data["ot_info"] = OrdenesTrabajoBusquedaInformacion::searchOtBusquedaInformacionById($idot_busqueda_info)->get();
             if ($data["ot_info"]->isEmpty()) {
                 return Redirect::to('busqueda_informacion/list_busqueda_informacion');
             }
             $data["ot_info"] = $data["ot_info"][0];
             $data["tipo"] = TipoOtBusquedaInformacion::find($data["ot_info"]->idtipo_busqueda_info);
             $data["tareas"] = TareasOtBusquedaInformacion::getTareasXOt($data["ot_info"]->idot_busqueda_info)->get();
             $data["personal_data"] = PersonalOtBusquedaInformacion::getPersonalXOt($data["ot_info"]->idot_busqueda_info)->get();
             $html = View::make('ot/busquedaInformacion/otBusquedaInformacionExport', $data);
             return PDF::load($html, "A4", "portrait")->download('OTM busqueda informacion ' . $data["ot_info"]->ot_tipo_abreviatura . $data["ot_info"]->ot_correlativo);
         } else {
             return View::make('error/error', $data);
         }
     } else {
         return View::make('error/error', $data);
     }
 }
 public function pdf()
 {
     $id = Auth::user()->emp_id();
     $personnel = DB::table('qualification_personal')->where('emp_id', '=', $id)->get();
     $html = '<html><body>' . '<p>Put your html here, or generate it with your favourite ' . 'templating system.</p>' . '</body></html>';
     return PDF::load($html, 'A4', 'portrait')->show();
 }
Exemple #19
0
}
/********************End of the Site Conditions Page (Natural Environment Characteristics)*********************/
/***********************Start of the Infrastructure Page (Infrastructure for Operation)************************/
if (isset($infrastructure)) {
    $html .= '<div style="page-break-after:always;"></div>' . '<h2>Infrastructure for Operation</h2>' . 'Describe the operations of the proposed development (e.g. proposed hours of operation, number of personnel, vehicle movement, proposed site visitor numbers, proposed residential population, proposed employee population):' . '<br /><br />' . $infrastructure->InfraforOpComment . '<br /><br />' . '<div style="page-break-after:always;"></div>' . '<table><thead><tr>' . '<th>Infrastructure for operation</th>' . '<th>No.</th>' . '<th>Comments / Description / Indicative Area Size / Length etc.</th>' . '</tr></thead>' . '<tbody><tr>' . '<td>Access Roads</td>' . '<td>' . $infrastructure->accessRoadsNo . '</td>' . '<td>' . $infrastructure->accessRoadsD . '</td>' . '</tr><tr>' . '<td>Infrastructure Corridors</td>' . '<td>' . $infrastructure->infrastructureCorridorsNo . '</td>' . '<td>' . $infrastructure->infrastructureCorridorsD . '</td>' . '</tr><tr>' . '<td>Fixed Infrastructure (e.g. substation)</td>' . '<td>' . $infrastructure->fixedInfrastructureNo . '</td>' . '<td>' . $infrastructure->fixedInfrastructureD . '</td>' . '</tr><tr>' . '<td>Water Tanks</td>' . '<td>' . $infrastructure->waterTanksNo . '</td>' . '<td>' . $infrastructure->waterTanksD . '</td>' . '</tr><tr>' . '<td>Site office</td>' . '<td>' . $infrastructure->siteOfficeNo . '</td>' . '<td>' . $infrastructure->siteOfficeD . '</td>' . '</tr><tr>' . '<td>Communications Tower</td>' . '<td>' . $infrastructure->communicationsTowerNo . '</td>' . '<td>' . $infrastructure->communicationsTowerD . '</td>' . '</tr><tr>' . '<td>Waste Disposal Pit (e.g. oils)</td>' . '<td>' . $infrastructure->wasteDisposalNo . '</td>' . '<td>' . $infrastructure->wasteDisposalD . '</td>' . '</tr><tr>' . '<td>On-site water treatment plant</td>' . '<td>' . $infrastructure->waterTreatmentNo . '</td>' . '<td>' . $infrastructure->waterTreatmentD . '</td>' . '</tr><tr>' . '<td>On-site sewerage treatment plant</td>' . '<td>' . $infrastructure->sewerageTreatmentNo . '</td>' . '<td>' . $infrastructure->sewerageTreatmentD . '</td>' . '</tr><tr>' . '<td>On-site renewable energy plant</td>' . '<td>' . $infrastructure->renewableEnergyNo . '</td>' . '<td>' . $infrastructure->renewableEnergyD . '</td>' . '</tr><tr>' . '<td>On-site water feature</td>' . '<td>' . $infrastructure->waterFeatureNo . '</td>' . '<td>' . $infrastructure->waterFeatureD . '</td>' . '</tr><tr>' . '<td>Exhaust stack</td>' . '<td>' . $infrastructure->exhaustStackNo . '</td>' . '<td>' . $infrastructure->exhaustStackD . '</td>' . '</tr><tr>' . '<td>On-site community cooling faciltiies</td>' . '<td>' . $infrastructure->communityCoolingNo . '</td>' . '<td>' . $infrastructure->communityCoolingD . '</td>' . '</tr><tr>' . '<td>Heavy Vehicle Turnarounds</td>' . '<td>' . $infrastructure->vehicleTurnaroundsNo . '</td>' . '<td>' . $infrastructure->vehicleTurnaroundsD . '</td>' . '</tr><tr>' . '<td>Above-ground carparking</td>' . '<td>' . $infrastructure->aboveCarParkingNo . '</td>' . '<td>' . $infrastructure->aboveCarParkingD . '</td>' . '</tr><tr>' . '<td>Under-ground carparking</td>' . '<td>' . $infrastructure->underCarParkingNo . '</td>' . '<td>' . $infrastructure->underCarParkingD . '</td>' . '</tr><tr>' . '<td>On-site flood mitigation infrastructure (e.g.pumps)</td>' . '<td>' . $infrastructure->floodMitigationNo . '</td>' . '<td>' . $infrastructure->floodMitigationD . '</td>' . '</tr><tr>' . '<td>Irrigation Areas</td>' . '<td>' . $infrastructure->irrigationAreasNo . '</td>' . '<td>' . $infrastructure->irrigationAreasD . '</td>' . '</tr><tr>' . '<td>Irrigation Facilities (pumps, tanks, etc.)</td>' . '<td>' . $infrastructure->irrigationFacilitiesNo . '</td>' . '<td>' . $infrastructure->irrigationFacilitiesD . '</td>' . '</tr><tr>' . '<td>Irrigation Water Pipes</td>' . '<td>' . $infrastructure->waterPipesNo . '</td>' . '<td>' . $infrastructure->waterPipesD . '</td>' . '</tr><tr>' . '<td>Stormwater Retention Systems</td>' . '<td>' . $infrastructure->retentionSystemsNo . '</td>' . '<td>' . $infrastructure->retentionSystemsD . '</td>' . '</tr><tr>' . '<td>Stormwater Detention Systems</td>' . '<td>' . $infrastructure->detentionSystemsNo . '</td>' . '<td>' . $infrastructure->detentionSystemsD . '</td>' . '</tr><tr>' . '<td>Retaining Walls</td>' . '<td>' . $infrastructure->retainingWallsNo . '</td>' . '<td>' . $infrastructure->retainingWallsD . '</td>' . '</tr></tbody></table><br />' . '<br /><br /><hr />' . '<h2>Operational Works</h2>' . 'Describe the operations of the proposed development (e.g. proposed hours of operation, number of personnel, vehicle movement, proposed site visitor numbers, proposed employee population):' . '<br /><br />' . $infrastructure->OpWorksComment . '<br /><br />' . '<table><thead><tr>' . '<th>Infrastructure for operation</th>' . '<th>No.</th>' . '<th>Comments / Description / Indicative Area Size / Length etc.</th>' . '</tr></thead>' . '<tbody><tr>' . '<td>Earthworks and Retaining Walls</td>' . '<td>' . $infrastructure->earthworksNo . '</td>' . '<td>' . $infrastructure->earthworksD . '</td>' . '</tr><tr>' . '<td>Access Roads</td>' . '<td>' . $infrastructure->accessRoadsNo . '</td>' . '<td>' . $infrastructure->accessRoadsD . '</td>' . '</tr><tr>' . '<td>Construction Camps</td>' . '<td>' . $infrastructure->constructionCampsNo . '</td>' . '<td>' . $infrastructure->constructionCampsD . '</td>' . '</tr><tr>' . '<td>Lay Down Areas</td>' . '<td>' . $infrastructure->layDownAreasNo . '</td>' . '<td>' . $infrastructure->layDownAreasD . '</td>' . '</tr><tr>' . '<td>Site Offices</td>' . '<td>' . $infrastructure->operationalSiteOfficeNo . '</td>' . '<td>' . $infrastructure->operationalSiteOfficeD . '</td>' . '</tr><tr>' . '<td>Truck Turnarounds</td>' . '<td>' . $infrastructure->truckTurnaroundsNo . '</td>' . '<td>' . $infrastructure->truckTurnaroundsD . '</td>' . '</tr><tr>' . '<td>Workshops</td>' . '<td>' . $infrastructure->workshopsNo . '</td>' . '<td>' . $infrastructure->workshopsD . '</td>' . '</tr></tbody></table><br />' . '<br /><br /><hr />' . '<h2>Gravel/Fill</h2>' . 'Is a Gravel Permit required? ' . $infrastructure->GravelFillPermitReq . ' ' . $infrastructure->GravelFillPermitReqEntity . '<br />' . 'Is a gravel transport permit required? ' . $infrastructure->GravelFillTransPermitReq . ' ' . $infrastructure->GravelFillTransPermitReqEntity . '<br />' . '<br /><br /><hr />' . '<h2>Top Soil</h2>' . 'Is a top soil permit required? ' . $infrastructure->TopSoilPermitReq . ' ' . $infrastructure->TopSoilPermitReqEntity . '<br />' . 'Is a Top Soil transport permit required? ' . $infrastructure->TopSoilTransPermitReq . ' ' . $infrastructure->TopSoilTransPermitReqEntity . '<br />' . '<br /><br /><hr />';
}
/*********************************End of the Infrastructure Page (Top Soil)*********************************/
/*****Start of the Climate Page (Energy Management - Community Strategies for Passive Cooling and Heating)*****/
if (isset($climate)) {
    $html .= '<div style="page-break-after:always;"></div>' . '<h2>Energy Management - Community Strategies for Passive Cooling and Heating</h2>' . 'Describe the passive cooling and heating program that is to be implemented for this development: ' . '<br /><br />' . $climate->ClimateComment . '<br /><br /><br />' . '<h3>Community Strategies for Passive Cooling and Heating - Design</h3>' . '<table><thead><tr>' . '<th colspan="3"></th>' . '<th>Target</th>' . '<th>Proposed</th>' . '<th>Actual</th>' . '<th>Gap</th>' . '</tr></thead><tbody><tr>' . '<td colspan="3">Enter the number of passive cooling strategies listed that have been incorporated into the community design: </td>' . '<td>' . $climate->coolingStratTarget . '</td>' . '<td>' . $climate->coolingStratProposed . '</td>' . '<td>' . $climate->coolingStratActual . '</td>' . '<td>' . $climate->coolingStratGap . '</td>' . '</tr><tr>' . '<td colspan="3">Enter the number of passive heating strategies listed that have been incorporated into the community design: </td>' . '<td>' . $climate->heatingStratTarget . '</td>' . '<td>' . $climate->heatingStratProposed . '</td>' . '<td>' . $climate->heatingStratActual . '</td>' . '<td>' . $climate->heatingStratGap . '</td>' . '</tr><tr>' . '<td colspan="3">Enter the percentage of community hardscape (excluding roads) that has utilised strategies to reduce the build up of heat: </td>' . '<td>' . $climate->comHardscapeHeatTarget . '</td>' . '<td>' . $climate->comHardscapeHeatProposed . '</td>' . '<td>' . $climate->comHardscapeHeatActual . '</td>' . '<td>' . $climate->comHardscapeHeatGap . '</td>' . '</tr></tbody></table>' . '<br /><br />' . '<h3>Technical Requirements</h3>' . '<table><thead><tr>' . '<th colspan="3"></th>' . '<th>Required</th>' . '<th>Document Title and Revision / <br />Drawing Number, Title and Revision</th>' . '<th>Responsible Party</th>' . '</tr></thead><tbody><tr>' . '<td colspan="3">Annual weather conditions for the site including solar azimuth and altitude,<br /> solar radiation, prevailing wind direction, wind speeds, wind temperatures<br /> and humidity have been considered in the design of the proposed development. </td>' . '<td>' . $climate->annualWeatherConReq . '</td>' . '<td>' . $climate->annualWeatherConDoc . '</td>' . '<td>' . $climate->annualWeatherConParty . '</td>' . '</tr><tr>' . '<td colspan="3">Site map illustrating the annual onsite wind conditions. </td>' . '<td>' . $climate->siteMapAnnualWeatherConReq . '</td>' . '<td>' . $climate->siteMapAnnualWeatherConDoc . '</td>' . '<td>' . $climate->siteMapAnnualWeatherConParty . '</td>' . '</tr><tr>' . '<td colspan="3">Conceptual solar and wind analysis report including studies for all adopted <br /> strategies and evidence of how the community design promotes shading and wind <br /> flows for passive cooling and improved pedestrian comfort. </td>' . '<td>' . $climate->ConSolarWindAnalysisReq . '</td>' . '<td>' . $climate->ConSolarWindAnalysisDoc . '</td>' . '<td>' . $climate->ConSolarWindAnalysisParty . '</td>' . '</tr><tr>' . '<td colspan="3">Site plan illustrating how the adopted strategies will be implemented. </td>' . '<td>' . $climate->sitePlanAdoptStratReq . '</td>' . '<td>' . $climate->sitePlanAdoptStratDoc . '</td>' . '<td>' . $climate->sitePlanAdoptStratParty . '</td>' . '</tr><tr>' . '<td colspan="3">Conceptual shadow effect on neighbouring properties is completed and provided <br />for regulator and community assessment (if required). </td>' . '<td>' . $climate->conShadowEffectReq . '</td>' . '<td>' . $climate->conShadowEffectDoc . '</td>' . '<td>' . $climate->conShadowEffectParty . '</td>' . '</tr></tbody></table>' . '<br /><br />' . '<h3>Advanced Analysis Techniques</h3>' . '<table><thead><tr>' . '<th colspan="3"></th>' . '<th>Required</th>' . '<th>Document Title and Revision / <br />Drawing Number, Title and Revision</th>' . '<th>Responsible Party</th>' . '</tr></thead><tbody><tr>' . '<td colspan="3">Narrative of the advanced solar and wind analysis describing how the results <br /> informed the final community design. </td>' . '<td>' . $climate->advSolarWindAnalysisReq . '</td>' . '<td>' . $climate->advSolarWindAnalysisDoc . '</td>' . '<td>' . $climate->advSolarWindAnalysisParty . '</td>' . '</tr><tr>' . '<td colspan="3">Technical report containing outputs from the advanced solar and wind modeling <br />analysis for all adopted strategies, demonstrating an improved level of performance. </td>' . '<td>' . $climate->advSolarWindOutReq . '</td>' . '<td>' . $climate->advSolarWindOutDoc . '</td>' . '<td>' . $climate->advSolarWindOutParty . '</td>' . '</tr><tr>' . '<td colspan="3">Site plan indicating how the strategies will be implemented for passive cooling <br /> and heating, and landscaping. </td>' . '<td>' . $climate->sitePlanHeatCoolStratReq . '</td>' . '<td>' . $climate->sitePlanHeatCoolStratDoc . '</td>' . '<td>' . $climate->sitePlanHeatCoolStratParty . '</td>' . '</tr><tr>' . '<td colspan="3">As-built street sections illustrating urban heat reduction strategies. </td>' . '<td>' . $climate->streetUrbanHeatReq . '</td>' . '<td>' . $climate->streetUrbanHeatDoc . '</td>' . '<td>' . $climate->streetUrbanHeatParty . '</td>' . '</tr></tbody></table>' . '<br /><br />' . '<h3>Regulator requirements</h3>' . '<table><thead><tr>' . '<th colspan="3"></th>' . '<th>Required</th>' . '<th>Document Title and Revision / <br />Drawing Number, Title and Revision</th>' . '<th>Responsible Party</th>' . '</tr></thead><tbody><tr>' . '<td colspan="3">Does the proposed development meet and/or exceed national design guidelines for <br />"green" buiding ratings/ "green" infrastructure targets. </td>' . '<td>' . $climate->PropDevGreenGuideReq . '</td>' . '<td>' . $climate->PropDevGreenGuideDoc . '</td>' . '<td>' . $climate->PropDevGreenGuideParty . '</td>' . '</tr><tr>' . '<td colspan="3">Does the Local Government/ Regional Government Planning Systems define design guidelines? </td>' . '<td>' . $climate->GovPlanDefGuideReq . '</td>' . '<td>' . $climate->GovPlanDefGuideDoc . '</td>' . '<td>' . $climate->GovPlanDefGuideParty . '</td>' . '</tr><tr>' . '<td colspan="3">Does the Local Government/ Regional Government Planning Systems define infrastructure charging regimes? </td>' . '<td>' . $climate->GovPlanDefInfraReq . '</td>' . '<td>' . $climate->GovPlanDefInfraDoc . '</td>' . '<td>' . $climate->GovPlanDefInfraParty . '</td>' . '</tr><tr>' . '<td colspan="3">Do these guidelines provide incentives for energy and waste efficient buildings? </td>' . '<td>' . $climate->IncEnergyWasteEffReq . '</td>' . '<td>' . $climate->IncEnergyWasteEffDoc . '</td>' . '<td>' . $climate->IncEnergyWasteEffParty . '</td>' . '</tr><tr>' . '<td colspan="3">If yes to incentives, are there monetary or development incentives that assist in <br />the promotion of efficient buildings/ developments? </td>' . '<td>' . $climate->MonDevIncAssistReq . '</td>' . '<td>' . $climate->MonDevIncAssistDoc . '</td>' . '<td>' . $climate->MonDevIncAssistParty . '</td>' . '</tr><tr>' . '<td colspan="3">Does the proposed development meet or exceed the guidelines to allow incentive <br /> opportunities to be implemented? </td>' . '<td>' . $climate->PropDevguideIncReq . '</td>' . '<td>' . $climate->PropDevguideIncDoc . '</td>' . '<td>' . $climate->PropDevguideIncParty . '</td>' . '</tr><tr>' . '<td colspan="3">If the monetary incentives are available, what is the value of <br /> these incentives for this development? </td>' . '<td>' . $climate->MonIncValueDevCurrency . '</td>' . '<td>' . $climate->MonIncValueDev . '</td>' . '</tr><tr>' . '<td colspan="3">If other development incentives are available, how are these applied <br /> to the proposed development? </td>' . '<td colspan="2">' . $climate->OtherDevIncApp . '</td>' . '</tr></tbody></table>' . '<br /><br />' . '<br /><br /><hr />' . '<h2>Community Strategies for Passive Cooling and Heating - Construction</h2>' . '<h3>Submission Requirements</h3>' . '<table><thead><tr>' . '<th colspan="3">Conceptual Solar and Wind Analysis</th>' . '<th>Achieved <br />&amp; <br />Submitted?</th>' . '<th>Document Title and Revision / <br />Drawing Number, Title and Revision</th>' . '<th>Responsible Party</th>' . '</tr></thead><tbody><tr>' . '<td colspan="3">Revised documentation as per design rating including as-built site plans illustrating <br />how the adopted strategies were integrated into the design: </td>' . '<td>' . $climate->DocRateAdoptStratReq . '</td>' . '<td>' . $climate->DocRateAdoptStratDoc . '</td>' . '<td>' . $climate->DocRateAdoptStratParty . '</td>' . '</tr><tr>' . '<td colspan="3">Photographic evidence of linear parks or vegetated corridors, shelter belts and <br />wind towers where applicable: </td>' . '<td>' . $climate->PhotoEvParkReq . '</td>' . '<td>' . $climate->PhotoEvParkDoc . '</td>' . '<td>' . $climate->PhotoEvParkParty . '</td>' . '</tr></tbody></table>' . '<br /><br />' . '<table><thead><tr>' . '<th colspan="3">Advanced Analysis Techniques</th>' . '<th>Achieved <br />&amp; <br />Submitted?</th>' . '<th>Document Title and Revision / <br />Drawing Number, Title and Revision</th>' . '<th>Responsible Party</th>' . '</tr></thead><tbody><tr>' . '<td colspan="3">Revised documentation as per design rating including as-built site plans illustrating <br />how the adopted strategies were integrated into the design: </td>' . '<td>' . $climate->RevDocSitePlanStratReq . '</td>' . '<td>' . $climate->RevDocSitePlanStratDoc . '</td>' . '<td>' . $climate->RevDocSitePlanStratParty . '</td>' . '</tr><tr>' . '<td colspan="3">Photographic evidence of alternative passive cooling strategies where applicable: </td>' . '<td>' . $climate->PhotoEvAltCoolStratReq . '</td>' . '<td>' . $climate->PhotoEvAltCoolStratDoc . '</td>' . '<td>' . $climate->PhotoEvAltCoolStratParty . '</td>' . '</tr><tr>' . '<td colspan="3">Plan drawings highlighting the extent of all hardscape surfaces, overlaid with <br />clearly identifiable \'hashed\' areas denoting the coverage of the various measures: </td>' . '<td>' . $climate->DrawHardSurfHashReq . '</td>' . '<td>' . $climate->DrawHardSurfHashDoc . '</td>' . '<td>' . $climate->DrawHardSurfHashParty . '</td>' . '</tr><tr>' . '<td colspan="3">Typical street sections illustrating urban heat reduction strategies: </td>' . '<td>' . $climate->StreetSectUrbanHeadRedReq . '</td>' . '<td>' . $climate->StreetSectUrbanHeadRedDoc . '</td>' . '<td>' . $climate->StreetSectUrbanHeadRedParty . '</td>' . '</tr></tbody></table>' . '<br /><br />' . '<h3>Technical Factors</h3>' . '<table><thead><tr>' . '<th colspan="3"></th>' . '<th>Required</th>' . '<th>Document Title and Revision / <br />Drawing Number, Title and Revision</th>' . '<th>Responsible Party</th>' . '</tr></thead><tbody><tr>' . '<td colspan="3">Calculations from Community Energy Strategy confirming the total annual energy consumption <br /> of all community infrastructure:</td>' . '<td>' . $climate->CalcComEnStratAnConsReq . '</td>' . '<td>' . $climate->CalcComEnStratAnConsDoc . '</td>' . '<td>' . $climate->CalcComEnStratAnConsParty . '</td>' . '</tr><tr>' . '<td colspan="3">Building Guidelines to comply with legislated requirements:</td>' . '<td>' . $climate->BuildGuideLegRequireReq . '</td>' . '<td>' . $climate->BuildGuideLegRequireDoc . '</td>' . '<td>' . $climate->BuildGuideLegRequireParty . '</td>' . '</tr><tr>' . '<td colspan="3">Demonstrate the mechanism for ensuring compliance with building guidelines:</td>' . '<td>' . $climate->DemMechComGuideReq . '</td>' . '<td>' . $climate->DemMechComGuideDoc . '</td>' . '<td>' . $climate->DemMechComGuideParty . '</td>' . '</tr><tr>' . '<td colspan="3">Draft of building guidelines highlighting energy model outputs and iterative steps in optimising <br/>the designs in order to achieve the targeted reductions have been developed <br />and submitted. At a minimum this should include: <br />
- Design drawings and model screenshots illustrating representative buildings. <br />
- Details on the baseline and proposed building elements including: building envelope, lighting, <br />HVAC, service water heating and receptacle and process loads. <br />
- Summary table highlighting the most effective strategies.<br />
- Energy consumption of proposed and baseline buildings confirming the percentage reduction.</td>' . '<td>' . $climate->EnOutOpTarRedReq . '</td>' . '<td>' . $climate->EnOutOpTarRedDoc . '</td>' . '<td>' . $climate->EnOutOpTarRedParty . '</td>' . '</tr></tbody></table>' . '<br /><br />' . '<h3>Regulator requirements</h3>' . '<table><thead><tr>' . '<th colspan="3"></th>' . '<th>Required</th>' . '<th>Document Title and Revision / <br />Drawing Number, Title and Revision</th>' . '<th>Responsible Party</th>' . '</tr></thead><tbody><tr>' . '<td colspan="3">Has the proposed development met and/or exceeded national design guidelines for "green" <br /> buiding ratings/ "green" infrastructure targets?</td>' . '<td>' . $climate->PropDevNatDesGuideGreenReq . '</td>' . '<td>' . $climate->PropDevNatDesGuideGreenDoc . '</td>' . '<td>' . $climate->PropDevNatDesGuideGreenParty . '</td>' . '</tr><tr>' . '<td colspan="3">Has the development met Local Government/ Regional Government Planning Systems define <br/>design guidelines for energy and water efficient buildings/ developments/ infrastructure?</td>' . '<td>' . $climate->GovPlanSysDesGuideReq . '</td>' . '<td>' . $climate->GovPlanSysDesGuideDoc . '</td>' . '<td>' . $climate->GovPlanSysDesGuideParty . '</td>' . '</tr><tr>' . '<td colspan="3">Local Government/ Regional Government Planning Systems define infrastructure charging /<br /> incentive regimes for energy and water efficient buildings/ developments/ infrastructure?</td>' . '<td>' . $climate->GovPlanSysInfraCharIncReq . '</td>' . '<td>' . $climate->GovPlanSysInfraCharIncDoc . '</td>' . '<td>' . $climate->GovPlanSysInfraCharIncParty . '</td>' . '</tr><tr>' . '<td colspan="3">If the monetary incentives are available, what was the total value of these incentives <br />for this development in agreement with the regulator?</td>' . '<td>' . $climate->TotValIncDevAgreeCurrency . '</td>' . '<td>' . $climate->TotValIncDevAgreeValue . '</td>' . '</tr><tr>' . '<td colspan="3">If the monetary incentives are available, how were these incentives considered and <br />implemented for this development in agreement with the regulator?</td>' . '<td colspan="2">' . $climate->MonIncImpDevReg . '</td>' . '</tr><tr>' . '<td colspan="3">If other development incentives are available, how were these incentives considered and <br />implented for this development in agreement with the regulator?</td>' . '<td colspan="2">' . $climate->OtherIncImpDevReg . '</td>' . '</tr></tbody></table>' . '<br /><br /><hr />';
}
/********End of the Climate Page (Community Strategies for Passive Cooling and Heating - Construction)********/
/******************************Start of the Operations Page (Operational Waste)******************************/
if (isset($operation)) {
    $html .= '<div style="page-break-after:always;"></div>' . '<h2>Operational Waste</h2>' . 'Describe the operation waste program activities to be implemented for this development:' . '<br /><br />' . $operation->OpWasteComment . '<br />' . '<h3>Waste Composition</h3>' . '<table><tr>' . '<td colspan="2"></td>' . '<td>Paper/Cardboard</td>' . '<td>Aluminium</td>' . '<td>Glass</td>' . '<td>Hazardous</td>' . '<td>Non-Hazardous</td>' . '<td>Organic</td>' . '<td>Total</td>' . '</tr><tr>' . '<td>Target volume</td>' . '<td>' . $operation->O_Tvolume_Units . '</td>' . '<td>' . $operation->O_Tvolume_Paper . '</td>' . '<td>' . $operation->O_Tvolume_Aluminium . '</td>' . '<td>' . $operation->O_Tvolume_Glass . '</td>' . '<td>' . $operation->O_Tvolume_Hazardous . '</td>' . '<td>' . $operation->O_Tvolume_NonHazardous . '</td>' . '<td>' . $operation->O_Tvolume_Organic . '</td>' . '<td>' . $operation->totalTargetO . '</td>' . '</tr><tr>' . '<td>Proposed volume for landfill</td>' . '<td>' . $operation->O_PvolumeForLandfill_Units . '</td>' . '<td>' . $operation->O_PvolumeForLandfill_Paper . '</td>' . '<td>' . $operation->O_PvolumeForLandfill_Aluminium . '</td>' . '<td>' . $operation->O_PvolumeForLandfill_Glass . '</td>' . '<td>' . $operation->O_PvolumeForLandfill_Hazardous . '</td>' . '<td>' . $operation->O_PvolumeForLandfill_NonHazardous . '</td>' . '<td>' . $operation->O_PvolumeForLandfill_Organic . '</td>' . '<td>' . $operation->totalProposedLandO . '</td>' . '</tr><tr>' . '<td>Proposed volume for recycle / reuse</td>' . '<td>' . $operation->O_PvolumeForRecycle_Units . '</td>' . '<td>' . $operation->O_PvolumeForRecycle_Paper . '</td>' . '<td>' . $operation->O_PvolumeForRecycle_Aluminium . '</td>' . '<td>' . $operation->O_PvolumeForRecycle_Glass . '</td>' . '<td>' . $operation->O_PvolumeForRecycle_Hazardous . '</td>' . '<td>' . $operation->O_PvolumeForRecycle_NonHazardous . '</td>' . '<td>' . $operation->O_PvolumeForRecycle_Organic . '</td>' . '<td>' . $operation->totalProposedRecycleO . '</td>' . '</tr><tr>' . '<td>Actual volume for landfill</td>' . '<td>' . $operation->O_ActVolumeForLandfill_Units . '</td>' . '<td>' . $operation->O_ActVolumeForLandfill_Paper . '</td>' . '<td>' . $operation->O_ActVolumeForLandfill_Aluminium . '</td>' . '<td>' . $operation->O_ActVolumeForLandfill_Glass . '</td>' . '<td>' . $operation->O_ActVolumeForLandfill_Hazardous . '</td>' . '<td>' . $operation->O_ActVolumeForLandfill_NonHazardous . '</td>' . '<td>' . $operation->O_ActVolumeForLandfill_Organic . '</td>' . '<td>' . $operation->totalActualLandO . '</td>' . '</tr><tr>' . '<td>Actual volume for recycle/reuse</td>' . '<td>' . $operation->O_ActVolumeForRecycle_Units . '</td>' . '<td>' . $operation->O_ActVolumeForRecycle_Paper . '</td>' . '<td>' . $operation->O_ActVolumeForRecycle_Aluminium . '</td>' . '<td>' . $operation->O_ActVolumeForRecycle_Glass . '</td>' . '<td>' . $operation->O_ActVolumeForRecycle_Hazardous . '</td>' . '<td>' . $operation->O_ActVolumeForRecycle_NonHazardous . '</td>' . '<td>' . $operation->O_ActVolumeForRecycle_Organic . '</td>' . '<td>' . $operation->totalActualRecycleO . '</td>' . '</tr><tr>' . '<td>Difference in volume for landfill</td>' . '<td>' . $operation->O_DifVolumeForLandfill_Units . '</td>' . '<td>' . $operation->O_DifVolumeForLandfill_Paper . '</td>' . '<td>' . $operation->O_DifVolumeForLandfill_Aluminium . '</td>' . '<td>' . $operation->O_DifVolumeForLandfill_Glass . '</td>' . '<td>' . $operation->O_DifVolumeForLandfill_Hazardous . '</td>' . '<td>' . $operation->O_DifVolumeForLandfill_NonHazardous . '</td>' . '<td>' . $operation->O_DifVolumeForLandfill_Organic . '</td>' . '<td>' . $operation->totalDifLandO . '</td>' . '</tr><tr>' . '<td>Difference in volume for recycle/re-use</td>' . '<td>' . $operation->O_DifVolumeForRecycle_Units . '</td>' . '<td>' . $operation->O_DifVolumeForRecycle_Paper . '</td>' . '<td>' . $operation->O_DifVolumeForRecycle_Aluminium . '</td>' . '<td>' . $operation->O_DifVolumeForRecycle_Glass . '</td>' . '<td>' . $operation->O_DifVolumeForRecycle_Hazardous . '</td>' . '<td>' . $operation->O_DifVolumeForRecycle_NonHazardous . '</td>' . '<td>' . $operation->O_DifVolumeForRecycle_Organic . '</td>' . '<td>' . $operation->totalDifRecycleO . '</td>' . '</tr></table>' . '<br /><br />' . '<h3 style="padding-top:50px;">Waste Composition Cost Analysis</h3>' . '<table><tr>' . '<td colspan="2"></td>' . '<td>Paper / Cardboard</td>' . '<td>Aluminium</td>' . '<td>Glass</td>' . '<td>Hazardous</td>' . '<td>Non-Hazardous</td>' . '<td>Organic</td>' . '<td>Total</td>' . '</tr><tr>' . '<td>Value (landfill)/Unit</td>' . '<td>' . $operation->valueLandfillCurrencyO . '</td>' . '<td>' . $operation->valueLandfillPaperO . '</td>' . '<td>' . $operation->valueLandfillAluminiumO . '</td>' . '<td>' . $operation->valueLandfillGlassO . '</td>' . '<td>' . $operation->valueLandfillHazardousO . '</td>' . '<td>' . $operation->valueLandfillNonHazardousO . '</td>' . '<td>' . $operation->valueLandfillOrganicO . '</td>' . '<td>' . $operation->valueLandfillTotalO . '</td>' . '</tr><tr>' . '<td>Value (recycle)/Unit</td>' . '<td>' . $operation->valueRecycleCurrencyO . '</td>' . '<td>' . $operation->valueRecyclePaperO . '</td>' . '<td>' . $operation->valueRecycleAluminiumO . '</td>' . '<td>' . $operation->valueRecycleGlassO . '</td>' . '<td>' . $operation->valueRecycleHazardousO . '</td>' . '<td>' . $operation->valueRecycleNonHazardousO . '</td>' . '<td>' . $operation->valueRecycleOrganicO . '</td>' . '<td>' . $operation->valueRecycleTotalO . '</td>' . '</tr><tr>' . '<td>Actual Value (landfill)/Unit</td>' . '<td>' . $operation->actualLandfillCurrencyO . '</td>' . '<td>' . $operation->actualLandfillPaperO . '</td>' . '<td>' . $operation->actualLandfillAluminiumO . '</td>' . '<td>' . $operation->actualLandfillGlassO . '</td>' . '<td>' . $operation->actualLandfillHazardousO . '</td>' . '<td>' . $operation->actualLandfillNonHazardousO . '</td>' . '<td>' . $operation->actualLandfillOrganicO . '</td>' . '<td>' . $operation->actualLandfillTotalO . '</td>' . '</tr><tr>' . '<td>Actual Value (recycle)/Unit</td>' . '<td>' . $operation->actualRecycleCurrencyO . '</td>' . '<td>' . $operation->actualRecyclePaperO . '</td>' . '<td>' . $operation->actualRecycleAluminiumO . '</td>' . '<td>' . $operation->actualRecycleGlassO . '</td>' . '<td>' . $operation->actualRecycleHazardousO . '</td>' . '<td>' . $operation->actualRecycleNonHazardousO . '</td>' . '<td>' . $operation->actualRecycleOrganicO . '</td>' . '<td>' . $operation->actualRecycleTotalO . '</td>' . '</tr><tr>' . '<td>Total Value Proposed</td>' . '<td>' . $operation->totalValuePropCurrencyO . '</td>' . '<td>' . $operation->totalValuePropPaperO . '</td>' . '<td>' . $operation->totalValuePropAluminiumO . '</td>' . '<td>' . $operation->totalValuePropGlassO . '</td>' . '<td>' . $operation->totalValuePropHazardousO . '</td>' . '<td>' . $operation->totalValuePropNonHazardousO . '</td>' . '<td>' . $operation->totalValuePropOrganicO . '</td>' . '<td>' . $operation->totalValuePropTotalO . '</td>' . '</tr><tr>' . '<td>Total Value Actual</td>' . '<td>' . $operation->totalValueActCurrencyO . '</td>' . '<td>' . $operation->totalValueActPaperO . '</td>' . '<td>' . $operation->totalValueActAluminiumO . '</td>' . '<td>' . $operation->totalValueActGlassO . '</td>' . '<td>' . $operation->totalValueActHazardousO . '</td>' . '<td>' . $operation->totalValueActNonHazardousO . '</td>' . '<td>' . $operation->totalValueActOrganicO . '</td>' . '<td>' . $operation->totalValueActTotalO . '</td>' . '</tr></table>' . '<br /><br /><hr />' . '<h2>Operational waste diversion from landfill rates</h2>' . 'Comments: ' . '<br /><br />' . $operation->OpLandWasteComment . '<br /><br />' . '<h3>General</h3>' . 'Will an operational waste management plan be written? ' . $operation->O_WasteManagementPlan . '<br />' . 'Will adequate access be provided for refuse collection vehicles? ' . $operation->AccessProvCollectVehicles . '<br />' . 'Will landscape waste be collected? ' . $operation->LandscapeWasteCollect . '<br />' . 'Will landscape waste be treated in a suitable facility, e.g. composting? ' . $operation->LandscapeWasteTreated . '<br />' . 'Will at least one collection point will be provided to collect hazardous waste from the community? ' . $operation->CollectionPointHazardousWaste . '<br />' . 'Will adequately sized collection and storage waste facilities be provided? ' . $operation->CollectionStorageWasteFacilities . '<br />' . 'If appropriate, will adequately sized treatment waste treatment facilities be provided? ' . $operation->TreatmentWasteFacilities . '<br /><br />' . '<h3>Non-residential</h3>' . 'Will waste education be provided to staff, guests, students, etc., e.g. leaflets? ' . $operation->WasteEdNonResident . '<br />' . 'Will non-residential non-organic waste be stored and collected as separate streams? ' . $operation->NonResidentNonorganicWasteCollectedSep . '<br />' . 'Will organic waste from all non-residential building uses be stored and collected separately? ' . $operation->NonResidentOrganicWasteCollectedSep . '<br />' . 'Will there be a facilities manager responsible for waste in the building? ' . $operation->NonResidentFacilityManager . '<br /><br />' . '<h3>Technical Factors Non-Residential</h3>' . 'Will non-organic recyclable waste be segregated manually on-site or mechanically in a recycling plant? ' . $operation->NonResidentNonorganicRecycleWasteSegManOrMechPlant . '<br />' . 'Will organic waste be composted, and if so will it be done on-site or off-site? ' . $operation->NonResidentOrganicWasteComposted . '<br /><br />' . '<h3>Residential</h3>' . 'Will waste education be provided to residents, e.g. leaflets? ' . $operation->WasteEdResident . '<br />' . 'Will non-organic residential waste be stored and collected as separate streams? ' . $operation->ResidentNonorganicWasteCollectedSep . '<br />' . 'Will organic residential waste be stored and collected separately? ' . $operation->ResidentOrganicWasteCollectedSep . '<br /><br />' . '<h3>Residential Technical Factors</h3>' . 'Will non-organic recyclable waste be segregated manually on-site or mechanically in a recycling plant? ' . $operation->ResidentNonorganicRecycleWasteSegManOrMechPlant . '<br />' . 'Will organic waste be composted, and if so will it be done on-site or off-site? ' . $operation->ResidentOrganicWasteComposted . '<br />' . '<br /><br /><hr />';
}
/******************End of the Operations Page (Operational waste diversion from landfill rates)***************/
/**********************Start of the Construction Indicators Page (Demolition Waste)****************************/
if (isset($waste)) {
    $html .= '<div style="page-break-after:always;"></div>' . '<h2>Demolition Waste</h2>' . 'Describe the demolition waste program and its objectives to be implemented for this development:' . '<br /><br />' . $waste->DemWasteComment . '<br />' . '<h3>Waste Composition</h3>' . '<table style="page-break-after:always;"><tr>' . '<td></td><td></td>' . '<td>Concrete</td>' . '<td>Steel</td>' . '<td>Aluminium</td>' . '<td>Copper</td>' . '<td>Timber</td>' . '<td>Glass</td>' . '<td>Hazardous</td>' . '<td>Non-Hazardous</td>' . '<td>Organic</td>' . '<td>Conduit</td>' . '<td>Total</td>' . '</tr><tr>' . '<td>Target volume</td>' . '<td>' . $waste->D_Tvolume_Units . '</td>' . '<td>' . $waste->D_Tvolume_Concrete . '</td>' . '<td>' . $waste->D_Tvolume_Steel . '</td>' . '<td>' . $waste->D_Tvolume_Aluminium . '</td>' . '<td>' . $waste->D_Tvolume_Copper . '</td>' . '<td>' . $waste->D_Tvolume_Timber . '</td>' . '<td>' . $waste->D_Tvolume_Glass . '</td>' . '<td>' . $waste->D_Tvolume_Hazardous . '</td>' . '<td>' . $waste->D_Tvolume_NonHazardous . '</td>' . '<td>' . $waste->D_Tvolume_Organic . '</td>' . '<td>' . $waste->D_Tvolume_Conduit . '</td>' . '<td>' . $waste->totalTargetD . '</td>' . '</tr><tr>' . '<td>Proposed volume for landfill</td>' . '<td>' . $waste->D_PvolumeForLandfill_Units . '</td>' . '<td>' . $waste->D_PvolumeForLandfill_Concrete . '</td>' . '<td>' . $waste->D_PvolumeForLandfill_Steel . '</td>' . '<td>' . $waste->D_PvolumeForLandfill_Aluminium . '</td>' . '<td>' . $waste->D_PvolumeForLandfill_Copper . '</td>' . '<td>' . $waste->D_PvolumeForLandfill_Timber . '</td>' . '<td>' . $waste->D_PvolumeForLandfill_Glass . '</td>' . '<td>' . $waste->D_PvolumeForLandfill_Hazardous . '</td>' . '<td>' . $waste->D_PvolumeForLandfill_NonHazardous . '</td>' . '<td>' . $waste->D_PvolumeForLandfill_Organic . '</td>' . '<td>' . $waste->D_PvolumeForLandfill_Conduit . '</td>' . '<td>' . $waste->totalProposedLandD . '</td>' . '</tr><tr>' . '<td>Proposed volume for recycle / reuse</td>' . '<td>' . $waste->D_PvolumeForRecycle_Units . '</td>' . '<td>' . $waste->D_PvolumeForRecycle_Concrete . '</td>' . '<td>' . $waste->D_PvolumeForRecycle_Steel . '</td>' . '<td>' . $waste->D_PvolumeForRecycle_Aluminium . '</td>' . '<td>' . $waste->D_PvolumeForRecycle_Copper . '</td>' . '<td>' . $waste->D_PvolumeForRecycle_Timber . '</td>' . '<td>' . $waste->D_PvolumeForRecycle_Glass . '</td>' . '<td>' . $waste->D_PvolumeForRecycle_Hazardous . '</td>' . '<td>' . $waste->D_PvolumeForRecycle_NonHazardous . '</td>' . '<td>' . $waste->D_PvolumeForRecycle_Organic . '</td>' . '<td>' . $waste->D_PvolumeForRecycle_Conduit . '</td>' . '<td>' . $waste->totalProposedRecycleD . '</td>' . '</tr><tr>' . '<td>Actual volume for landfill</td>' . '<td>' . $waste->D_ActVolumeForLandfill_Units . '</td>' . '<td>' . $waste->D_ActVolumeForLandfill_Concrete . '</td>' . '<td>' . $waste->D_ActVolumeForLandfill_Steel . '</td>' . '<td>' . $waste->D_ActVolumeForLandfill_Aluminium . '</td>' . '<td>' . $waste->D_ActVolumeForLandfill_Copper . '</td>' . '<td>' . $waste->D_ActVolumeForLandfill_Timber . '</td>' . '<td>' . $waste->D_ActVolumeForLandfill_Glass . '</td>' . '<td>' . $waste->D_ActVolumeForLandfill_Hazardous . '</td>' . '<td>' . $waste->D_ActVolumeForLandfill_NonHazardous . '</td>' . '<td>' . $waste->D_ActVolumeForLandfill_Organic . '</td>' . '<td>' . $waste->D_ActVolumeForLandfill_Conduit . '</td>' . '<td>' . $waste->totalActualLandD . '</td>' . '</tr><tr>' . '<td>Actual volume for recycle/reuse</td>' . '<td>' . $waste->D_ActVolumeForRecycle_Units . '</td>' . '<td>' . $waste->D_ActVolumeForRecycle_Concrete . '</td>' . '<td>' . $waste->D_ActVolumeForRecycle_Steel . '</td>' . '<td>' . $waste->D_ActVolumeForRecycle_Aluminium . '</td>' . '<td>' . $waste->D_ActVolumeForRecycle_Copper . '</td>' . '<td>' . $waste->D_ActVolumeForRecycle_Timber . '</td>' . '<td>' . $waste->D_ActVolumeForRecycle_Glass . '</td>' . '<td>' . $waste->D_ActVolumeForRecycle_Hazardous . '</td>' . '<td>' . $waste->D_ActVolumeForRecycle_NonHazardous . '</td>' . '<td>' . $waste->D_ActVolumeForRecycle_Organic . '</td>' . '<td>' . $waste->D_ActVolumeForRecycle_Conduit . '</td>' . '<td>' . $waste->totalActualRecycleD . '</td>' . '</tr><tr>' . '<td>Difference in volume for landfill</td>' . '<td>' . $waste->D_DifVolumeForLandfill_Units . '</td>' . '<td>' . $waste->D_DifVolumeForLandfill_Concrete . '</td>' . '<td>' . $waste->D_DifVolumeForLandfill_Steel . '</td>' . '<td>' . $waste->D_DifVolumeForLandfill_Aluminium . '</td>' . '<td>' . $waste->D_DifVolumeForLandfill_Copper . '</td>' . '<td>' . $waste->D_DifVolumeForLandfill_Timber . '</td>' . '<td>' . $waste->D_DifVolumeForLandfill_Glass . '</td>' . '<td>' . $waste->D_DifVolumeForLandfill_Hazardous . '</td>' . '<td>' . $waste->D_DifVolumeForLandfill_NonHazardous . '</td>' . '<td>' . $waste->D_DifVolumeForLandfill_Organic . '</td>' . '<td>' . $waste->D_DifVolumeForLandfill_Conduit . '</td>' . '<td>' . $waste->totalDifLandD . '</td>' . '</tr><tr>' . '<td>Difference in volume for recycle/re-use</td>' . '<td>' . $waste->D_DifVolumeForRecycle_Units . '</td>' . '<td>' . $waste->D_DifVolumeForRecycle_Concrete . '</td>' . '<td>' . $waste->D_DifVolumeForRecycle_Steel . '</td>' . '<td>' . $waste->D_DifVolumeForRecycle_Aluminium . '</td>' . '<td>' . $waste->D_DifVolumeForRecycle_Copper . '</td>' . '<td>' . $waste->D_DifVolumeForRecycle_Timber . '</td>' . '<td>' . $waste->D_DifVolumeForRecycle_Glass . '</td>' . '<td>' . $waste->D_DifVolumeForRecycle_Hazardous . '</td>' . '<td>' . $waste->D_DifVolumeForRecycle_NonHazardous . '</td>' . '<td>' . $waste->D_DifVolumeForRecycle_Organic . '</td>' . '<td>' . $waste->D_DifVolumeForRecycle_Conduit . '</td>' . '<td>' . $waste->totalDifRecycleD . '</td>' . '</tr></table>' . '<h3 style="padding-top:50px;">Waste Composition Cost Analysis</h3>' . '<table><tr>' . '<td></td><td></td>' . '<td>Concrete</td>' . '<td>Steel</td>' . '<td>Aluminium</td>' . '<td>Copper</td>' . '<td>Timber</td>' . '<td>Glass</td>' . '<td>Hazardous</td>' . '<td>Non-Hazardous</td>' . '<td>Organic</td>' . '<td>Conduit</td>' . '<td>Total</td>' . '</tr><tr>' . '<td>Value (landfill)/Unit</td>' . '<td>' . $waste->valueLandfillCurrencyD . '</td>' . '<td>' . $waste->valueLandfillConcreteD . '</td>' . '<td>' . $waste->valueLandfillSteelD . '</td>' . '<td>' . $waste->valueLandfillAluminiumD . '</td>' . '<td>' . $waste->valueLandfillCopperD . '</td>' . '<td>' . $waste->valueLandfillTimberD . '</td>' . '<td>' . $waste->valueLandfillGlassD . '</td>' . '<td>' . $waste->valueLandfillHazardousD . '</td>' . '<td>' . $waste->valueLandfillNonHazardousD . '</td>' . '<td>' . $waste->valueLandfillOrganicD . '</td>' . '<td>' . $waste->valueLandfillConduitD . '</td>' . '<td>' . $waste->valueLandfillTotalD . '</td>' . '</tr><tr>' . '<td>Value (recycle)/Unit</td>' . '<td>' . $waste->valueRecycleCurrencyD . '</td>' . '<td>' . $waste->valueRecycleConcreteD . '</td>' . '<td>' . $waste->valueRecycleSteelD . '</td>' . '<td>' . $waste->valueRecycleAluminiumD . '</td>' . '<td>' . $waste->valueRecycleCopperD . '</td>' . '<td>' . $waste->valueRecycleTimberD . '</td>' . '<td>' . $waste->valueRecycleGlassD . '</td>' . '<td>' . $waste->valueRecycleHazardousD . '</td>' . '<td>' . $waste->valueRecycleNonHazardousD . '</td>' . '<td>' . $waste->valueRecycleOrganicD . '</td>' . '<td>' . $waste->valueRecycleConduitD . '</td>' . '<td>' . $waste->valueRecycleTotalD . '</td>' . '</tr><tr>' . '<td>Actual Value (landfill)/Unit</td>' . '<td>' . $waste->actualLandfillCurrencyD . '</td>' . '<td>' . $waste->actualLandfillConcreteD . '</td>' . '<td>' . $waste->actualLandfillSteelD . '</td>' . '<td>' . $waste->actualLandfillAluminiumD . '</td>' . '<td>' . $waste->actualLandfillCopperD . '</td>' . '<td>' . $waste->actualLandfillTimberD . '</td>' . '<td>' . $waste->actualLandfillGlassD . '</td>' . '<td>' . $waste->actualLandfillHazardousD . '</td>' . '<td>' . $waste->actualLandfillNonHazardousD . '</td>' . '<td>' . $waste->actualLandfillOrganicD . '</td>' . '<td>' . $waste->actualLandfillConduitD . '</td>' . '<td>' . $waste->actualLandfillTotalD . '</td>' . '</tr><tr>' . '<td>Actual Value (recycle)/Unit</td>' . '<td>' . $waste->actualRecycleCurrencyD . '</td>' . '<td>' . $waste->actualRecycleConcreteD . '</td>' . '<td>' . $waste->actualRecycleSteelD . '</td>' . '<td>' . $waste->actualRecycleAluminiumD . '</td>' . '<td>' . $waste->actualRecycleCopperD . '</td>' . '<td>' . $waste->actualRecycleTimberD . '</td>' . '<td>' . $waste->actualRecycleGlassD . '</td>' . '<td>' . $waste->actualRecycleHazardousD . '</td>' . '<td>' . $waste->actualRecycleNonHazardousD . '</td>' . '<td>' . $waste->actualRecycleOrganicD . '</td>' . '<td>' . $waste->actualRecycleConduitD . '</td>' . '<td>' . $waste->actualRecycleTotalD . '</td>' . '</tr><tr>' . '<td>Total Value Proposed</td>' . '<td>' . $waste->totalValuePropCurrencyD . '</td>' . '<td>' . $waste->totalValuePropConcreteD . '</td>' . '<td>' . $waste->totalValuePropSteelD . '</td>' . '<td>' . $waste->totalValuePropAluminiumD . '</td>' . '<td>' . $waste->totalValuePropCopperD . '</td>' . '<td>' . $waste->totalValuePropTimberD . '</td>' . '<td>' . $waste->totalValuePropGlassD . '</td>' . '<td>' . $waste->totalValuePropHazardousD . '</td>' . '<td>' . $waste->totalValuePropNonHazardousD . '</td>' . '<td>' . $waste->totalValuePropOrganicD . '</td>' . '<td>' . $waste->totalValuePropConduitD . '</td>' . '<td>' . $waste->totalValuePropTotalD . '</td>' . '</tr><tr>' . '<td>Total Value Actual</td>' . '<td>' . $waste->totalValueActCurrencyD . '</td>' . '<td>' . $waste->totalValueActConcreteD . '</td>' . '<td>' . $waste->totalValueActSteelD . '</td>' . '<td>' . $waste->totalValueActAluminiumD . '</td>' . '<td>' . $waste->totalValueActCopperD . '</td>' . '<td>' . $waste->totalValueActTimberD . '</td>' . '<td>' . $waste->totalValueActGlassD . '</td>' . '<td>' . $waste->totalValueActHazardousD . '</td>' . '<td>' . $waste->totalValueActNonHazardousD . '</td>' . '<td>' . $waste->totalValueActOrganicD . '</td>' . '<td>' . $waste->totalValueActConduitD . '</td>' . '<td>' . $waste->totalValueActTotalD . '</td>' . '</tr></table>' . '<br /><hr />' . '<h2>Construction Waste</h2>' . 'Describe the construction waste management program and its objectives to be implemented for this development:' . '<br /><br />' . $waste->ConWasteComment . '<br /><div style="page-break-after:always;"></div>' . '<h3>Waste Composition</h3>' . '<table><tr>' . '<td></td><td></td>' . '<td>Concrete</td>' . '<td>Steel</td>' . '<td>Aluminium</td>' . '<td>Copper</td>' . '<td>Timber</td>' . '<td>Glass</td>' . '<td>Hazardous</td>' . '<td>Non-Hazardous</td>' . '<td>Organic</td>' . '<td>Conduit</td>' . '<td>Total</td>' . '</tr><tr>' . '<td>Target volume</td>' . '<td>' . $waste->C_Tvolume_Units . '</td>' . '<td>' . $waste->C_Tvolume_Concrete . '</td>' . '<td>' . $waste->C_Tvolume_Steel . '</td>' . '<td>' . $waste->C_Tvolume_Aluminium . '</td>' . '<td>' . $waste->C_Tvolume_Copper . '</td>' . '<td>' . $waste->C_Tvolume_Timber . '</td>' . '<td>' . $waste->C_Tvolume_Glass . '</td>' . '<td>' . $waste->C_Tvolume_Hazardous . '</td>' . '<td>' . $waste->C_Tvolume_NonHazardous . '</td>' . '<td>' . $waste->C_Tvolume_Organic . '</td>' . '<td>' . $waste->C_Tvolume_Conduit . '</td>' . '<td>' . $waste->totalTargetC . '</td>' . '</tr><tr>' . '<td>Proposed volume for landfill</td>' . '<td>' . $waste->C_PvolumeForLandfill_Units . '</td>' . '<td>' . $waste->C_PvolumeForLandfill_Concrete . '</td>' . '<td>' . $waste->C_PvolumeForLandfill_Steel . '</td>' . '<td>' . $waste->C_PvolumeForLandfill_Aluminium . '</td>' . '<td>' . $waste->C_PvolumeForLandfill_Copper . '</td>' . '<td>' . $waste->C_PvolumeForLandfill_Timber . '</td>' . '<td>' . $waste->C_PvolumeForLandfill_Glass . '</td>' . '<td>' . $waste->C_PvolumeForLandfill_Hazardous . '</td>' . '<td>' . $waste->C_PvolumeForLandfill_NonHazardous . '</td>' . '<td>' . $waste->C_PvolumeForLandfill_Organic . '</td>' . '<td>' . $waste->C_PvolumeForLandfill_Conduit . '</td>' . '<td>' . $waste->totalProposedLandC . '</td>' . '</tr><tr>' . '<td>Proposed volume for recycle / reuse</td>' . '<td>' . $waste->C_PvolumeForRecycle_Units . '</td>' . '<td>' . $waste->C_PvolumeForRecycle_Concrete . '</td>' . '<td>' . $waste->C_PvolumeForRecycle_Steel . '</td>' . '<td>' . $waste->C_PvolumeForRecycle_Aluminium . '</td>' . '<td>' . $waste->C_PvolumeForRecycle_Copper . '</td>' . '<td>' . $waste->C_PvolumeForRecycle_Timber . '</td>' . '<td>' . $waste->C_PvolumeForRecycle_Glass . '</td>' . '<td>' . $waste->C_PvolumeForRecycle_Hazardous . '</td>' . '<td>' . $waste->C_PvolumeForRecycle_NonHazardous . '</td>' . '<td>' . $waste->C_PvolumeForRecycle_Organic . '</td>' . '<td>' . $waste->C_PvolumeForRecycle_Conduit . '</td>' . '<td>' . $waste->totalProposedRecycleC . '</td>' . '</tr><tr>' . '<td>Actual volume for landfill</td>' . '<td>' . $waste->C_ActVolumeForLandfill_Units . '</td>' . '<td>' . $waste->C_ActVolumeForLandfill_Concrete . '</td>' . '<td>' . $waste->C_ActVolumeForLandfill_Steel . '</td>' . '<td>' . $waste->C_ActVolumeForLandfill_Aluminium . '</td>' . '<td>' . $waste->C_ActVolumeForLandfill_Copper . '</td>' . '<td>' . $waste->C_ActVolumeForLandfill_Timber . '</td>' . '<td>' . $waste->C_ActVolumeForLandfill_Glass . '</td>' . '<td>' . $waste->C_ActVolumeForLandfill_Hazardous . '</td>' . '<td>' . $waste->C_ActVolumeForLandfill_NonHazardous . '</td>' . '<td>' . $waste->C_ActVolumeForLandfill_Organic . '</td>' . '<td>' . $waste->C_ActVolumeForLandfill_Conduit . '</td>' . '<td>' . $waste->totalActualLandC . '</td>' . '</tr><tr>' . '<td>Actual volume for recycle/reuse</td>' . '<td>' . $waste->C_ActVolumeForRecycle_Units . '</td>' . '<td>' . $waste->C_ActVolumeForRecycle_Concrete . '</td>' . '<td>' . $waste->C_ActVolumeForRecycle_Steel . '</td>' . '<td>' . $waste->C_ActVolumeForRecycle_Aluminium . '</td>' . '<td>' . $waste->C_ActVolumeForRecycle_Copper . '</td>' . '<td>' . $waste->C_ActVolumeForRecycle_Timber . '</td>' . '<td>' . $waste->C_ActVolumeForRecycle_Glass . '</td>' . '<td>' . $waste->C_ActVolumeForRecycle_Hazardous . '</td>' . '<td>' . $waste->C_ActVolumeForRecycle_NonHazardous . '</td>' . '<td>' . $waste->C_ActVolumeForRecycle_Organic . '</td>' . '<td>' . $waste->C_ActVolumeForRecycle_Conduit . '</td>' . '<td>' . $waste->totalActualRecycleC . '</td>' . '</tr><tr>' . '<td>Difference in volume for landfill</td>' . '<td>' . $waste->C_DifVolumeForLandfill_Units . '</td>' . '<td>' . $waste->C_DifVolumeForLandfill_Concrete . '</td>' . '<td>' . $waste->C_DifVolumeForLandfill_Steel . '</td>' . '<td>' . $waste->C_DifVolumeForLandfill_Aluminium . '</td>' . '<td>' . $waste->C_DifVolumeForLandfill_Copper . '</td>' . '<td>' . $waste->C_DifVolumeForLandfill_Timber . '</td>' . '<td>' . $waste->C_DifVolumeForLandfill_Glass . '</td>' . '<td>' . $waste->C_DifVolumeForLandfill_Hazardous . '</td>' . '<td>' . $waste->C_DifVolumeForLandfill_NonHazardous . '</td>' . '<td>' . $waste->C_DifVolumeForLandfill_Organic . '</td>' . '<td>' . $waste->C_DifVolumeForLandfill_Conduit . '</td>' . '<td>' . $waste->totalDifLandC . '</td>' . '</tr><tr>' . '<td>Difference in volume for recycle/re-use</td>' . '<td>' . $waste->C_DifVolumeForRecycle_Units . '</td>' . '<td>' . $waste->C_DifVolumeForRecycle_Concrete . '</td>' . '<td>' . $waste->C_DifVolumeForRecycle_Steel . '</td>' . '<td>' . $waste->C_DifVolumeForRecycle_Aluminium . '</td>' . '<td>' . $waste->C_DifVolumeForRecycle_Copper . '</td>' . '<td>' . $waste->C_DifVolumeForRecycle_Timber . '</td>' . '<td>' . $waste->C_DifVolumeForRecycle_Glass . '</td>' . '<td>' . $waste->C_DifVolumeForRecycle_Hazardous . '</td>' . '<td>' . $waste->C_DifVolumeForRecycle_NonHazardous . '</td>' . '<td>' . $waste->C_DifVolumeForRecycle_Organic . '</td>' . '<td>' . $waste->C_DifVolumeForRecycle_Conduit . '</td>' . '<td>' . $waste->totalDifRecycleC . '</td>' . '</tr></table>' . '<h3 style="padding-top:50px;">Waste Composition Cost Analysis</h3>' . '<table><tr>' . '<td></td><td></td>' . '<td>Concrete</td>' . '<td>Steel</td>' . '<td>Aluminium</td>' . '<td>Copper</td>' . '<td>Timber</td>' . '<td>Glass</td>' . '<td>Hazardous</td>' . '<td>Non-Hazardous</td>' . '<td>Organic</td>' . '<td>Conduit</td>' . '<td>Total</td>' . '</tr><tr>' . '<td>Value (landfill)/Unit</td>' . '<td>' . $waste->valueLandfillCurrencyC . '</td>' . '<td>' . $waste->valueLandfillConcreteC . '</td>' . '<td>' . $waste->valueLandfillSteelC . '</td>' . '<td>' . $waste->valueLandfillAluminiumC . '</td>' . '<td>' . $waste->valueLandfillCopperC . '</td>' . '<td>' . $waste->valueLandfillTimberC . '</td>' . '<td>' . $waste->valueLandfillGlassC . '</td>' . '<td>' . $waste->valueLandfillHazardousC . '</td>' . '<td>' . $waste->valueLandfillNonHazardousC . '</td>' . '<td>' . $waste->valueLandfillOrganicC . '</td>' . '<td>' . $waste->valueLandfillConduitC . '</td>' . '<td>' . $waste->valueLandfillTotalC . '</td>' . '</tr><tr>' . '<td>Value (recycle)/Unit</td>' . '<td>' . $waste->valueRecycleCurrencyC . '</td>' . '<td>' . $waste->valueRecycleConcreteC . '</td>' . '<td>' . $waste->valueRecycleSteelC . '</td>' . '<td>' . $waste->valueRecycleAluminiumC . '</td>' . '<td>' . $waste->valueRecycleCopperC . '</td>' . '<td>' . $waste->valueRecycleTimberC . '</td>' . '<td>' . $waste->valueRecycleGlassC . '</td>' . '<td>' . $waste->valueRecycleHazardousC . '</td>' . '<td>' . $waste->valueRecycleNonHazardousC . '</td>' . '<td>' . $waste->valueRecycleOrganicC . '</td>' . '<td>' . $waste->valueRecycleConduitC . '</td>' . '<td>' . $waste->valueRecycleTotalC . '</td>' . '</tr><tr>' . '<td>Actual Value (landfill)/Unit</td>' . '<td>' . $waste->actualLandfillCurrencyC . '</td>' . '<td>' . $waste->actualLandfillConcreteC . '</td>' . '<td>' . $waste->actualLandfillSteelC . '</td>' . '<td>' . $waste->actualLandfillAluminiumC . '</td>' . '<td>' . $waste->actualLandfillCopperC . '</td>' . '<td>' . $waste->actualLandfillTimberC . '</td>' . '<td>' . $waste->actualLandfillGlassC . '</td>' . '<td>' . $waste->actualLandfillHazardousC . '</td>' . '<td>' . $waste->actualLandfillNonHazardousC . '</td>' . '<td>' . $waste->actualLandfillOrganicC . '</td>' . '<td>' . $waste->actualLandfillConduitC . '</td>' . '<td>' . $waste->actualLandfillTotalC . '</td>' . '</tr><tr>' . '<td>Actual Value (recycle)/Unit</td>' . '<td>' . $waste->actualRecycleCurrencyC . '</td>' . '<td>' . $waste->actualRecycleConcreteC . '</td>' . '<td>' . $waste->actualRecycleSteelC . '</td>' . '<td>' . $waste->actualRecycleAluminiumC . '</td>' . '<td>' . $waste->actualRecycleCopperC . '</td>' . '<td>' . $waste->actualRecycleTimberC . '</td>' . '<td>' . $waste->actualRecycleGlassC . '</td>' . '<td>' . $waste->actualRecycleHazardousC . '</td>' . '<td>' . $waste->actualRecycleNonHazardousC . '</td>' . '<td>' . $waste->actualRecycleOrganicC . '</td>' . '<td>' . $waste->actualRecycleConduitC . '</td>' . '<td>' . $waste->actualRecycleTotalC . '</td>' . '</tr><tr>' . '<td>Total Value Proposed</td>' . '<td>' . $waste->totalValuePropCurrencyC . '</td>' . '<td>' . $waste->totalValuePropConcreteC . '</td>' . '<td>' . $waste->totalValuePropSteelC . '</td>' . '<td>' . $waste->totalValuePropAluminiumC . '</td>' . '<td>' . $waste->totalValuePropCopperC . '</td>' . '<td>' . $waste->totalValuePropTimberC . '</td>' . '<td>' . $waste->totalValuePropGlassC . '</td>' . '<td>' . $waste->totalValuePropHazardousC . '</td>' . '<td>' . $waste->totalValuePropNonHazardousC . '</td>' . '<td>' . $waste->totalValuePropOrganicC . '</td>' . '<td>' . $waste->totalValuePropConduitC . '</td>' . '<td>' . $waste->totalValuePropTotalC . '</td>' . '</tr><tr>' . '<td>Total Value Actual</td>' . '<td>' . $waste->totalValueActCurrencyC . '</td>' . '<td>' . $waste->totalValueActConcreteC . '</td>' . '<td>' . $waste->totalValueActSteelC . '</td>' . '<td>' . $waste->totalValueActAluminiumC . '</td>' . '<td>' . $waste->totalValueActCopperC . '</td>' . '<td>' . $waste->totalValueActTimberC . '</td>' . '<td>' . $waste->totalValueActGlassC . '</td>' . '<td>' . $waste->totalValueActHazardousC . '</td>' . '<td>' . $waste->totalValueActNonHazardousC . '</td>' . '<td>' . $waste->totalValueActOrganicC . '</td>' . '<td>' . $waste->totalValueActConduitC . '</td>' . '<td>' . $waste->totalValueActTotalC . '</td>' . '</tr></table>' . '<br /><hr style="page-break-after:always;" />' . '<h2>Construction and Demolition Waste Recycling and Salvage Rates</h2>' . 'Describe the construction and demolition waste recycling management program and its objectives to be implemented for this development:' . '<br /><br />' . $waste->RecWasteComment . '<br />' . '<h3>Salvage and recycling of Construction and Demolition waste</h3>' . '<br />' . 'Will a construction and demolition waste management plan be written? ' . $waste->C_D_WasteManagementPlan . '<br />' . 'Will waste education be provided to construction contractors? ' . $waste->WasteEdConstructionContractors . '<br />' . 'Will waste education be provided to demolition contractors? ' . $waste->WasteEdDemolitionContractors . '<br />' . 'Will waste be adequately segregated and temporarily stored on-site during construction? ' . $waste->WasteSegTempStoreOnsiteConstruction . '<br />' . 'Will waste be adequately segregated and temporarily stored on-site during demolition? ' . $waste->WasteSegTempStoreOnsiteDemolition . '<br />' . 'Will there be a person responsible of C&amp;D waste management? ' . $waste->PersonResponsibleCDWaste . '<br />' . '<div style="page-break-after:always;"></div>' . '<h3>Technical factors</h3>' . '<br />' . 'What percentage of material from existing community elements/buildings will be reused in the new one? ' . $waste->PercentMatExistCommReused . '%' . '<br />' . 'Will construction waste be segregated in a recycling plant? ' . $waste->ConstructionSegRecyclingPlant . '<br />' . 'Which plant(s)? ' . $waste->ConstructionPlants . '<br />' . 'Will demolition waste be segregated in a recycling plant? ' . $waste->DemolitionSegRecyclingPlant . '<br />' . 'Which plant(s)? ' . $waste->DemolitionPlants . '<br />' . 'Override automatic values and enter customised capture rates? ' . $waste->OverrideCapRate . '<br />' . 'Construction customised capture rates? ' . $waste->OverrideConstructionCapRate . '<br />' . 'Demolition customised capture rates? ' . $waste->OverrideDemolitionCapRate . '<br />' . '<br /><hr style="page-break-after:always;"/>' . '<h2>Electricity</h2>' . 'Description of Electricity:  <br /><br />' . $waste->ElectricityComment . '<br /><br /><hr style="page-break-after:always;"/>' . '<h2>Fuel</h2>' . 'Description of Fuel:  <br /><br />' . $waste->FuelComment . '<br /><br /><hr style="page-break-after:always;"/>' . '<h2>Renewable Energy</h2>' . 'Description of Renewable Energy:  <br /><br />' . $waste->RenewableEnergyComment . '<br /><br /><hr style="page-break-after:always;"/>' . '<h2>Labour</h2>' . 'Description of Labour:  <br /><br />' . $waste->LabourComment . '<br /><br /><hr style="page-break-after:always;"/>';
}
/**********************************End of Construction Indicators Page (Labour)*******************************/
/**************************************************End Section************************************************/
$html .= '</body></html>';
//return PDF::load($html, 'A4', 'landscape')->show();
return PDF::load($html, 'A4', 'landscape')->download($projectName);
Exemple #20
0
		                      		    		margin: 0;
		                      		    		padding: 0;
		                      		    		width: 100%;
		                      		    		color: #777777;
		                      		    		padding-top: 8px;"
		                      		    		font:arial, sans-serif;>' . $codigo . '
		                      		</p>
		                	</div>   

		                	<img style="width: 100%;position: absolute; bottom: 180px;" src="http://nufarm-maxx.com/encuesta/public/assets/imagenes/Nufarm-footer.png" id="Nufarm" title="Nufarm" alt="Imagen no encontrada">
	    		
	          		</div>
		</div>
	</div>';
    $html .= '</body></html>';
    return PDF::load($html, 'A4', 'portrait')->download('Nufarm-Encuesta-Codigo');
    //return PDF::load($html, 'A4', 'portrait')->show();
}));
Route::get('/formulario', function () {
    $token = Session::get("_token");
    $preguntas = Session::get("preguntas");
    $email = Session::get("email");
    $nombre = Session::get("nombre");
    $empresa = Session::get("empresa");
    $datosEncuesta = Session::get("datosEncuesta");
    return View::make('encuesta.formulario', array('preguntas' => $preguntas, 'email' => $email, 'nombre' => $nombre, 'empresa' => $empresa, 'encuesta' => $datosEncuesta));
});
Route::get('/formulario-ok', function () {
    $mensaje = Session::get('mensaje');
    $usuariosEmail = Session::get('usuariosEmail');
    $datosEncuesta = Session::get('datosEncuesta');
 public function imprimirpedido($id)
 {
     if (Auth::check()) {
         $iduser = Auth::user()->id;
         $iddi = DB::table('pedido')->join('direccion_cliente', 'pedido.direccion_cliente_id', '=', 'direccion_cliente.id')->select('direccion_cliente.id')->where('pedido.id', $id)->pluck('direccion_cliente.id');
         $idcliente = DB::table('cliente')->where("usuario_id", $iduser)->pluck('id');
         $idp = DB::table('pedido')->where('direccion_cliente_id', $iddi)->pluck('cliente_id');
         $d = DB::table('pedido')->join('pedido_detalle', 'pedido.id', '=', 'pedido_detalle.pedido_id')->where('pedido.id', $id)->pluck('pedido_detalle.id');
         $idd = DB::table('pedido')->join('pedido_detalle', 'pedido.id', '=', 'pedido_detalle.pedido_id')->where('pedido.id', $id)->pluck('pedido_detalle.producto_id');
         $iddirec = DB::table('pedido')->join('direccion_cliente', 'pedido.direccion_cliente_id', '=', 'direccion_cliente.id')->where('pedido.id', $id)->pluck('pedido.direccion_cliente_id');
         if ($iddi == NULL) {
             $pedido = DB::table('pedido')->where('pedido.id', $id)->get();
             $cli = DB::table('cliente')->where('id', $idcliente)->get();
             $domi = DB::table('direccion_cliente')->join('cliente', 'direccion_cliente.cliente_id', '=', 'cliente.id')->join('pais', 'direccion_cliente.pais_id', '=', 'pais.id')->join('estado', 'direccion_cliente.estado_id', '=', 'estado.id')->join('municipio', 'direccion_cliente.municipio_id', '=', 'municipio.id')->join('telefono_cliente', 'direccion_cliente.telefono_cliente_id', '=', 'telefono_cliente.id')->where("direccion_cliente.id", $iddirec)->get();
             $ped = DB::table('cliente')->join('pedido', 'cliente.id', '=', 'pedido.cliente_id')->where('pedido.id', $id)->get();
             $pro = DB::table('producto')->join('familia', 'producto.familia_id', '=', 'familia.id')->join('pedido_detalle', 'producto.id', '=', 'pedido_detalle.producto_id')->join('producto_precio', 'producto.id', '=', 'producto_precio.producto_id')->where('pedido_detalle.pedido_id', $id)->get();
             $dpro = DB::table('pedido_detalle')->join('producto', 'pedido_detalle.producto_id', '=', 'producto.id')->where('pedido_detalle.id', $d)->get();
             //Sacamos el total
             $total = 0;
             foreach ($pro as $item) {
                 $m = $item->precio_venta * $item->factor_descuento;
                 $total += ($item->precio_venta - $m) * $item->cantidad;
             }
             $pdf = View::make('users/report', compact('dpro', 'pro', 'domi', 'ped', 'pedido', 'total', 'cli'));
             return PDF::load($pdf, 'A4', 'portrait')->show();
         } else {
             $pedido = DB::table('pedido')->where('pedido.id', $id)->get();
             if ($idp == $idcliente) {
                 $domi = DB::table('direccion_cliente')->join('cliente', 'direccion_cliente.cliente_id', '=', 'cliente.id')->join('pais', 'direccion_cliente.pais_id', '=', 'pais.id')->join('estado', 'direccion_cliente.estado_id', '=', 'estado.id')->join('municipio', 'direccion_cliente.municipio_id', '=', 'municipio.id')->join('telefono_cliente', 'direccion_cliente.telefono_cliente_id', '=', 'telefono_cliente.id')->where("direccion_cliente.id", $iddirec)->get();
                 $ped = DB::table('cliente')->join('pedido', 'cliente.id', '=', 'pedido.cliente_id')->where('pedido.id', $id)->get();
                 $pro = DB::table('producto')->join('familia', 'producto.familia_id', '=', 'familia.id')->join('pedido_detalle', 'producto.id', '=', 'pedido_detalle.producto_id')->join('producto_precio', 'producto.id', '=', 'producto_precio.producto_id')->where('pedido_detalle.pedido_id', $id)->get();
                 $dpro = DB::table('pedido_detalle')->join('producto', 'pedido_detalle.producto_id', '=', 'producto.id')->where('pedido_detalle.id', $d)->get();
                 //Sacamos el total
                 $total = 0;
                 foreach ($pro as $item) {
                     $m = $item->precio_venta * $item->factor_descuento;
                     $total += ($item->precio_venta - $m) * $item->cantidad;
                 }
                 $pdf = View::make('users/report', compact('dpro', 'pro', 'domi', 'ped', 'pedido', 'total'));
                 return PDF::load($pdf, 'A4', 'portrait')->show();
             } else {
                 echo "Error, la página solicitada no existe.";
             }
         }
     } else {
         return Redirect::to('login');
     }
 }
 public function getPdf($idCotizacion, $membrete = 0)
 {
     try {
         $cotizacion = Cotizacion::find($idCotizacion);
         if ($membrete == 1) {
             $html = View::make('cotizaciones.membrete')->with(compact('cotizacion'));
         } else {
             $html = View::make('cotizaciones.pdf')->with(compact('cotizacion'));
         }
         return PDF::load($html, 'Letter', 'portrait')->show();
         #return View::make('cotizaciones.pdf')->with(compact('cotizacion'));
     } catch (Exception $e) {
         Session::flash('mensajeError', 'No fue posible generar el PDF de la cotizacion ' . $idCotizacion);
         return Redirect::to('cotizaciones/listado');
     }
 }
Exemple #23
0
 */
Route::get("api/employees", "ApiController@employees");
/*
 * Dummy Route
 * 
 * These routes are solely used for testing and experiments, and are not part of the actual application.
 * These routes are intended to be removed when the application is fully released.
 * 
 */
Route::get('pdf', function () {
    // 	$html = '<html><body>'
    // 			. '<p>Put your html here, or generate it with your favourite '
    // 					. 'templating system.</p>'
    // 							. '</body></html>';
    $html = View::make("Others.waiver_view")->render();
    return PDF::load($html, 'A4', 'portrait')->show();
    // 	$view = View::make("Others.waiver_view");
    // 	return $view;
});
Route::get("404", function () {
    return View::make("error");
});
Route::get("viewdummy", function () {
    return View::make("dummy");
});
Route::get("viewdummy2", function () {
    return View::make("Others.waiver_view");
});
Route::get('dummy', function () {
    $employees = Employee::whereHas("assets", function ($q) {
        $q->whereHas("model", function ($q) {
 public function getResponsiva($id)
 {
     function Mes($mes)
     {
         switch ($mes) {
             case 1:
                 return "Enero";
             case 2:
                 return "Febrero";
             case 3:
                 return "Marzo";
             case 4:
                 return "Abril";
             case 5:
                 return "Mayo";
             case 6:
                 return "Junio";
             case 7:
                 return "Julio";
             case 8:
                 return "Agosto";
             case 9:
                 return "Septiembre";
             case 10:
                 return "Octubre";
             case 11:
                 return "Noviembre";
             case 12:
                 return "Diciembre";
         }
         return "Ninguno";
     }
     //Informacion de Usuario
     if (Auth::check()) {
         $usuario = Auth::user();
     }
     //Se busca el Registro
     $computadora = Computo::find($id);
     $html = '<html><header><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></header><body>';
     $html .= '<img src="responsiva_equipo.jpg" style="position:absolute;margin-top:0px;margin-left:0px" />';
     $html .= '<div style="position:absolute;top:153px;margin-left:450px;font-size:14px;">' . 'Mexico D.F. a ' . date('d') . ' de ' . Mes(date('m')) . ' de ' . date('Y') . '</div>';
     $html .= '<div style="position:absolute;margin-top:183px;margin-left:130px;font-size:14px;">' . $computadora->nombre . '</div>';
     $html .= '<div style="position:absolute;margin-top:183px;margin-left:550px;font-size:14px;">' . $computadora->rpe . '</div>';
     $html .= '<div style="position:absolute;margin-top:726px;margin-left:300px;font-size:14px">
         ' . $computadora->cpu . '<br>
         ' . $computadora->monitor . '<br>
         ' . $computadora->teclado . '<br>
         ' . $computadora->mouse . '<br>
         ' . $computadora->modelocomputo->marcacomputo->marca . '/' . $computadora->modelocomputo->modelo . '
         <p style="margin-left:-3px;margin-top:3px">' . $usuario->fullname . ' ( ' . $usuario->username . ' )</p>
         <p align="center">
         <br><br><br><br><br>' . $computadora->nombre . '(' . $computadora->rpe . ')</p>
         </div>';
     $html .= '</div></body></html>';
     //return $html;
     return PDF::load($html, 'A4', 'portrait')->download('Rcomputo-' . $computadora->rpe . '-' . $computadora->cpu . '.pdf');
 }
 public function getDopdf($lista_id)
 {
     $dataModule["asistencias"] = VistaNomina::where('lista_id', '=', $lista_id)->get();
     $dataModule["lista"] = Lista::find($lista_id);
     $customPaper = array(0, 0, 950, 950);
     $html = View::make('emails.test', $dataModule);
     return PDF::load($html, 'letter', 'landscape')->show();
     /*$pdf = DOPDF::loadView('emails.test', $dataModule);
     		return DOPDF::loadFile(public_path().'/myfile.html')->save('/my_stored_file.pdf')->stream('download.pdf');
     		*/
 }
 public function export($id)
 {
     if (Auth::check()) {
         $data["inside_url"] = Config::get('app.inside_url');
         $data["user"] = Session::get('user');
         // Verifico si el usuario es un Webmaster
         if ($data["user"]->idrol == 1 || $data["user"]->idrol == 2 || $data["user"]->idrol == 3 || $data["user"]->idrol == 4 || $data["user"]->idrol == 7 || $data["user"]->idrol == 9 || $data["user"]->idrol == 10 || $data["user"]->idrol == 11 || $data["user"]->idrol == 12) {
             $reporte = ReporteFinanciamiento::find($id);
             if (!$reporte) {
                 Session::flash('error', 'No se encontró el reporte.');
                 return Redirect::to('reporte_financiamiento/index');
             }
             $data["reporte"] = $reporte;
             $html = View::make('investigacion.reportes.financiamiento.export', $data);
             return PDF::load($html, "A4", "portrait")->download('Reporte Financiamiento - ' . $data["reporte"]->categoria->nombre . ' - ' . $data["reporte"]->id);
         } else {
             return View::make('error/error', $data);
         }
     } else {
         return View::make('error/error', $data);
     }
 }
Exemple #27
0
<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the Closure to execute when that URI is requested.
|
*/
Route::get('/', function () {
    return View::make('index');
});
Route::get('/pdf', function () {
    $html = '<html><body>' . '<p>Hello, Welcome to TechZoo.</p>' . '</body></html>';
    return PDF::load($html, 'A4', 'portrait')->download('my_pdf');
});
//before login
Route::controller('user', 'UserController');
Route::controller('mobile', 'MobileController');
//after login
Route::controller('dsmg', 'AppController');
Route::controller('schedule', 'ScheduleController');
Route::controller('common', 'CommonController');
Route::controller('report', 'ReportController');
Route::controller('gear', 'GearController');
Route::controller('cron', 'CronController');
 public function export_pdf()
 {
     if (Auth::check()) {
         $data["inside_url"] = Config::get('app.inside_url');
         $data["user"] = Session::get('user');
         // Verifico si el usuario es un Webmaster
         if ($data["user"]->idrol == 1 || $data["user"]->idrol == 2 || $data["user"]->idrol == 3 || $data["user"]->idrol == 4 || $data["user"]->idrol == 5 || $data["user"]->idrol == 6 || $data["user"]->idrol == 7 || $data["user"]->idrol == 8 || $data["user"]->idrol == 9 || $data["user"]->idrol == 10 || $data["user"]->idrol == 11 || $data["user"]->idrol == 12) {
             $evento_id = Input::get('evento_adverso_id');
             $data["evento_adverso_info"] = EventoAdverso::searchEventoAdversoById($evento_id)->get();
             if ($data["evento_adverso_info"]->isEmpty()) {
                 return Redirect::to('eventos_adversos/list_eventos_adversos');
             }
             $data["evento_adverso_info"] = $data["evento_adverso_info"][0];
             if ($data["evento_adverso_info"]->idactivo == null) {
                 $data["activo_info"] = null;
             } else {
                 $activo = Activo::find($data["evento_adverso_info"]->idactivo);
                 $data["activo_info"] = Activo::searchActivosByCodigoPatrimonial($activo->codigo_patrimonial)->get();
                 $data["activo_info"] = $data["activo_info"][0];
             }
             //sacaremos los datos de la clasificacion
             $data["subtipohijo_info"] = EventoxSubTipoHijo::searchEventoXSubTiposById($data["evento_adverso_info"]->id)->get();
             if (count($data["subtipohijo_info"]) == 2) {
                 //quiere decir que es de caidas
                 $data["subtipohijo_nieto1"] = EventoxSubTipoHijoxSubTipoNieto::searchEventoXSubTiposById($data["subtipohijo_info"][0]->id)->get()[0];
                 $data["nieto1"] = SubTipoNietoIncidente::find($data["subtipohijo_nieto1"]->idsubtiponieto_incidente);
                 $data["subtipohijo_nieto2"] = EventoxSubTipoHijoxSubTipoNieto::searchEventoXSubTiposById($data["subtipohijo_info"][1]->id)->get()[0];
                 $data["nieto2"] = SubTipoNietoIncidente::find($data["subtipohijo_nieto2"]->idsubtiponieto_incidente);
                 $data["flag_tipoHijo"] = 1;
             } else {
                 $data["subtipohijo_nieto1"] = null;
                 $data["subtipohijo_nieto2"] = null;
                 $data["nieto1"] = null;
                 $data["nieto2"] = null;
                 $data["flag_tipoHijo"] = 0;
             }
             $data["subtipohijo_info"] = $data["subtipohijo_info"][0];
             $data["hijo"] = SubTipoHijoIncidente::find($data["subtipohijo_info"]->idsubtipohijo);
             $data["padre"] = SubTipoPadreIncidente::find($data["subtipohijo_info"]->idsubtipopadre_incidente);
             $data["tipo_incidente"] = TipoIncidente::find($data["subtipohijo_info"]->idtipo_incidente);
             $data["tipo_documento"] = TipoDocumento::find($data["evento_adverso_info"]->idtipo_documento);
             if ($data["evento_adverso_info"] === 'M') {
                 $data["sexo"] = 'Masculino';
             } else {
                 $data["sexo"] = 'Femenino';
             }
             //sacamos los datos del entorno asistencial
             if ($data["evento_adverso_info"]->idetapa_servicio == null) {
                 //quiere decir que hay un comentario
                 $data["entorno_asistencial"] = EventoxEntornoAsistencial::searchEntornoAsistencialByIdEvento($data["evento_adverso_info"]->id)->get()[0];
                 $data["etapa_servicio"] = null;
                 /*echo '<pre>';
                 		print_r($data["entorno_asistencial"]);
                 		exit;*/
             } else {
                 $data["etapa_servicio"] = EtapaServicio::getEtapaServiciosByIdEtapaServicio($data["evento_adverso_info"]->idetapa_servicio)->get()[0];
                 $data["entorno_asistencial"] = EntornoAsistencial::find($data["etapa_servicio"]->identorno);
                 /*echo '<pre>';
                 		print_r($data["etapa_servicio"][0]);
                 		exit;*/
             }
             $data["personas_implicadas"] = EventoxPersonasImplicadas::getPersonasImplicadasByIdEvento($data["evento_adverso_info"]->id)->get();
             $data["cantidad_personas"] = count($data["personas_implicadas"]);
             $data["tipos_frecuencias"] = FrecuenciaIncidente::find($data["evento_adverso_info"]->idfrecuencia);
             $data["grados_danhos"] = GradoDanho::find($data["evento_adverso_info"]->idgrado_danho);
             $data["factores"] = FactoresContribuyentes::find($data["evento_adverso_info"]->idfactor);
             $data["procesos"] = Proceso::find($data["evento_adverso_info"]->idproceso);
             $html = View::make('riesgos/eventos_adversos/exportEventoAdverso', $data);
             return PDF::load($html, "A4", "portrait")->download('Reporte Evento Adverso N° ' . $data["evento_adverso_info"]->id);
         } else {
             return View::make('error/error', $data);
         }
     } else {
         return View::make('error/error', $data);
     }
 }
Exemple #29
0
Route::get('reporte_requerimientos_gerencia', function () {
    $html = "Reporte de Requerimientos: ";
    try {
        $req3 = DB::table('requerimientos')->where('Departamento', '=', 'Gerencia')->get();
    } catch (ErrorException $e) {
    }
    $html .= '<html><head><meta charset="UTF-8"></head><table><tr><th>Folio</th><th>Prioridad</th><th>Nombre de requerimiento</th><th>Departamento</th><th>Fecha de captura</th><th>Hora de captura</th><th>Descripcion</th></tr> ';
    foreach ($req3 as $key) {
        $html .= "<tr>";
        $html .= "<td>{$key->Folio}</td><td>{$key->Prioridad}</td><td>{$key->Nombre}</td><td>{$key->Departamento}</td><td>{$key->fecha_Captura}</td><td>{$key->hora_Captura}</td><td>{$key->Descripcion}</td>";
        $html .= "</tr>";
    }
    $html .= '</table></html>';
    return PDF::load($html, 'A2', 'portrait')->download('reporte_requerimientos_Gerencia');
});
Route::get('reporte_requerimientos_compras', function () {
    $html = "Reporte de Requerimientos: ";
    try {
        $req3 = DB::table('requerimientos')->where('Departamento', '=', 'Compras')->get();
    } catch (ErrorException $e) {
    }
    $html .= '<html><head><meta charset="UTF-8"></head><table><tr><th>Folio</th><th>Prioridad</th><th>Nombre de requerimiento</th><th>Departamento</th><th>Fecha de captura</th><th>Hora de captura</th><th>Descripcion</th></tr> ';
    foreach ($req3 as $key) {
        $html .= "<tr>";
        $html .= "<td>{$key->Folio}</td><td>{$key->Prioridad}</td><td>{$key->Nombre}</td><td>{$key->Departamento}</td><td>{$key->fecha_Captura}</td><td>{$key->hora_Captura}</td><td>{$key->Descripcion}</td>";
        $html .= "</tr>";
    }
    $html .= '</table></html>';
    return PDF::load($html, 'A2', 'portrait')->download('reporte_requerimientos_compras');
});
Route::get('/reporte', 'actividadController@prueba');
 public function showVerpdfinformegest()
 {
     $html = View::make("pdf.informegestion");
     return PDF::load($html, 'A4', 'landscape')->show();
 }