当前位置: 首页>>代码示例>>PHP>>正文


PHP PDF::load方法代码示例

本文整理汇总了PHP中PDF::load方法的典型用法代码示例。如果您正苦于以下问题:PHP PDF::load方法的具体用法?PHP PDF::load怎么用?PHP PDF::load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PDF的用法示例。


在下文中一共展示了PDF::load方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: ticketDownload

 /**
  * @return mixed
  */
 public function ticketDownload()
 {
     $name = 'thomas';
     $html = view('mails.report', ['name' => $name])->render();
     return $this->pdf->load($html)->download();
     //		return view('mails.report');
 }
开发者ID:thomasdola,项目名称:afrouteWeb,代码行数:10,代码来源:PagesController.php

示例2: reportView

 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();
 }
开发者ID:axisssss,项目名称:ORS,代码行数:25,代码来源:MaintenanceController.php

示例3: imprimirPase

 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');
     }
 }
开发者ID:jogs78,项目名称:talleres,代码行数:29,代码来源:ImprimirController.php

示例4: disciplinaCursadaAluno

 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--------------
 }
开发者ID:WallisonStorck,项目名称:sgd,代码行数:8,代码来源:RelatorioController.php

示例5: showAnalytics

 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();
 }
开发者ID:jogs78,项目名称:talleres,代码行数:9,代码来源:UtilsController.php

示例6: fire

 /**
  * 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('support@glomindz.com', 'DSMG');
         $message->to('saifur.rahman@glomindz.com')->subject('DSMG overdue report');
     });
 }
开发者ID:saifurrahman,项目名称:dev,代码行数:21,代码来源:CronCommands.php

示例7: sendNow

 /**
  * 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('contato@lucianotonet.com', 'L. Tonet');
         $message->from('olmar@basaltosegranitos.com.br', '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('us@example.com', 'Laravel');
         $message->to('contato@lucianotonet.com');
         $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');
     // }
 }
开发者ID:waldenylson,项目名称:alfredapp,代码行数:99,代码来源:PedidosController.php

示例8: reportegeneralusuarios

 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);
 }
开发者ID:gabitoooo,项目名称:potosifarmacias,代码行数:8,代码来源:UsuariosController.php

示例9: prueba

 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);
 }
开发者ID:leyven,项目名称:Cuatrimestre-7,代码行数:9,代码来源:actividadController.php

示例10: export

 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);
     }
 }
开发者ID:ktakayama91,项目名称:GTSlaravel,代码行数:22,代码来源:PlanAprendizajeController.php

示例11: pdf

 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();
 }
开发者ID:strangerAshik,项目名称:AIMS,代码行数:7,代码来源:QualificationController.php

示例12: export_pdf

    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);
        }
    }
开发者ID:ktakayama91,项目名称:GTSlaravel,代码行数:58,代码来源:SolicitudesController.php

示例13: pdfReporteBusquedaFrase


//.........这里部分代码省略.........
          <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();
    }
开发者ID:vvvhh,项目名称:not,代码行数:101,代码来源:ReportesController.php

示例14: printOrderClient

 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;
 }
开发者ID:armannadim,项目名称:restpos,代码行数:43,代码来源:PosController.php

示例15: export_pdf

 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);
     }
 }
开发者ID:ktakayama91,项目名称:GTSlaravel,代码行数:31,代码来源:OtController.php


注:本文中的PDF::load方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。