コード例 #1
0
 public function postAdicionar()
 {
     $dados = new TabelaExemplar();
     $dados->id_livrodois = Input::get('id_livrodois');
     $dados->estado_livro = Input::get('estado_livro');
     $dados->ano = Input::get('ano');
     $dados->edicao = Input::get('edicao');
     $dados->data_entrada = date("Y.m.d");
     $valida = Validator::make($dados->toArray(), $this->rules);
     if ($valida->fails()) {
         return Redirect::to('exemplar/adicionar')->withErrors($valida)->withInput();
     }
     $dados->save();
     $etiqueta = DB::table('exemplar')->max('id_exemplar');
     $exemplares = TabelaExemplar::join('livro', 'exemplar.id_livrodois', '=', 'id_livro')->select('exemplar.*', 'nome_livro')->where('id_exemplar', $etiqueta)->get();
     $exemplares = $exemplares[0];
     $pdf = new Fpdf('L', 'mm', array(50, 30));
     $pdf->AddPage();
     $pdf->Code39(15, 5, $etiqueta, 1, 15);
     // $pdf->SetFont('Arial','',8);
     // $pdf->ln(15);
     // $pdf->Cell(2,10,utf8_decode($exemplares->id_exemplar));
     // $pdf->ln(5);
     // 		$pdf->Cell(5,10,utf8_decode($exemplares->nome_livro));
     // 		$pdf->ln(5);
     // $pdf->Cell(5,10,utf8_decode($exemplares->ano));
     // 		$pdf->ln(5);
     // $pdf->Cell(5,10,utf8_decode($exemplares->edicao));
     $pdf->Output();
     exit;
     return Redirect::to('exemplar');
 }
コード例 #2
0
 public function getIndex()
 {
     $usuarios = TabelaUsuario::get();
     $fpdf = new Fpdf('L', 'mm', 'A4');
     $fpdf->AddPage();
     $fpdf->SetFont('Arial', 'B', 14);
     $i = 0;
     $fpdf->Ln(15);
     $fpdf->Cell(55, 10, '<h1>Nome</h1>');
     $fpdf->Cell(52, 10, 'CPF');
     $fpdf->Cell(65, 10, 'Telefone');
     $fpdf->Cell(23, 10, 'E-Mail');
     $fpdf->Cell(100, 10, 'Login', 0, 1, 'C');
     $fpdf->Ln(10);
     $fpdf->SetFont('Arial', '', 14);
     foreach ($usuarios as $usuario) {
         $fpdf->Cell(55, 10, $usuario->nome);
         $fpdf->Cell(50, 10, $usuario->cpf);
         $fpdf->Cell(45, 10, $usuario->telefone);
         $fpdf->Cell(35, 10, $usuario->email);
         $fpdf->Cell(120, 10, $usuario->login, 0, 1, 'C');
     }
     $fpdf->Output();
     exit;
 }
コード例 #3
0
 public function actionImprimirPDF()
 {
     $tUsuario = TUsuario::whereRaw('nombreUsuario=?', [Session::get('usuario')])->get();
     $listaTDirectorio = TDirectorio::whereRaw('idUsuario=?', [$tUsuario[0]->idUsuario])->get();
     Fpdf::AddPage();
     Fpdf::SetFont('Arial', 'B', 16);
     $i = 0;
     Fpdf::Cell(40, 3 * $i, 'USUARIO');
     Fpdf::Cell(50, 3 * $i, 'NOMBRE ');
     Fpdf::Cell(50, 3 * $i, 'DIRECCION ');
     Fpdf::Cell(40, 3 * $i, 'TELEFONO ', 0, 1, 'C');
     $i++;
     Fpdf::Cell(40, 3 * $i, '', 0, 1, 'C');
     Fpdf::Cell(40, 3 * $i, '', 0, 1, 'C');
     Fpdf::SetFont('Arial', '', 12);
     foreach ($listaTDirectorio as $key => $value) {
         Fpdf::Cell(40, 3 * $i, $value->tUsuario->nombreUsuario);
         Fpdf::Cell(50, 3 * $i, $value->nombreCompleto);
         Fpdf::Cell(50, 3 * $i, $value->direccion);
         Fpdf::Cell(40, 3 * $i, $value->telefono, 0, 1, 'C');
         $i++;
     }
     //Fpdf::Cell(40,10,'Hello World!');
     // Fpdf::Output();
     $header = ['Content-Type' => 'appication/pdf'];
     return response::make(Fpdf::Output(), 200, $header);
 }
コード例 #4
0
//formato de la tabla
$fpdf->Ln(5);
$fpdf->SetFont('Arial', 'B', 10);
$fpdf->SetFillColor(67, 187, 70);
// fondo color verde
// titulos
$fpdf->Cell(15, 5, 'Codigo', 0, 0, 'C', True);
$fpdf->Cell(25, 5, 'Nombre', 0, 0, 'C', True);
$fpdf->Cell(20, 5, 'Fecha ', 0, 0, 'C', True);
$fpdf->Cell(10, 5, 'Num.', 0, 0, 'C', True);
$fpdf->Cell(10, 5, 'Max.', 0, 0, 'C', True);
$fpdf->Cell(110, 5, 'Descripcion ', 0, 1, 'C', True);
$fpdf->Cell(15, 5, '', 0, 0, 'C', True);
$fpdf->Cell(25, 5, 'Curso', 0, 0, 'C', True);
$fpdf->Cell(20, 5, 'Inicio', 0, 0, 'C', True);
$fpdf->Cell(10, 5, 'Estu.', 0, 0, 'C', True);
$fpdf->Cell(10, 5, 'Estu.', 0, 0, 'C', True);
$fpdf->Cell(110, 5, ' Curso', 0, 1, 'C', True);
// tipo de color y letra adentro de la consulta
$fpdf->SetFont('Arial', '', 9);
while ($frow = mysqli_fetch_row($frec)) {
    // las columnas que quiere que aparezca
    $fpdf->Cell(15, 5, $frow[1], 1, 0, 'C');
    $fpdf->Cell(25, 5, $frow[2], 1, 0, 'C');
    $fpdf->Cell(20, 5, $frow[4], 1, 0, 'C');
    $fpdf->Cell(10, 5, $frow[7], 1, 0, 'C');
    $fpdf->Cell(10, 5, $frow[6], 1, 0, 'C');
    $fpdf->Cell(110, 5, $frow[3], 1, 1, 'C');
}
$fpdf->Output('Reporte_Cursos', 'D');
// solo funciona para descargar
コード例 #5
0
    $fpdf->Image($updatedTwoByTwoPicture, 20, 170, -350);
} else {
    $fpdf->Image($applicationForm->picture, 20, 170, -350);
}
//signature
if (strtolower($applicationForm->applicationstatus) == "approved") {
    if (strtolower($applicationForm->position) == "governor") {
        $fpdf->SetFont('Times', '', 11);
        //$fpdf->Image('mar_roxas.png',120,170,50);
        $fpdf->text(137, 192, "Secretary");
        $fpdf->text(137, 197, $barcodeHeading);
        if ($applicationForm->InitialToUsec) {
            $initial = App\config::where('configName', 'InitialToUsec')->get()->first()->contentOrLocation;
            $fpdf->Image($initial, 165, 185, 10);
        }
    } else {
        $fpdf->SetFont('Times', '', 11);
        $fpdf->Image('austere_a_apanadero.png', 125, 170, 50);
        $fpdf->text(127, 192, "Undersecretary for Local Government");
        $fpdf->text(127, 197, $barcodeHeading);
        if ($applicationForm->InitialToUsec) {
            $initial = App\config::where('configName', 'InitialToUsec')->get()->first()->contentOrLocation;
            $fpdf->Image($initial, 165, 190, 10);
        }
    }
}
$fpdf->Output();
exit;
?>

コード例 #6
0
ファイル: Reporte.php プロジェクト: ematul/proyectosSistemas2
// aca va la imagen
$fpdf->Image('images/cabeza-re.jpg', 18, 3, 165, 35, 'JPG', '', 0, 1, 'C');
$fpdf->Cell(170, 18, date('d/m/Y'), 0, 1, 'R');
$fpdf->Cell(170, 2, date('H:m:s'), 0, 1, 'R');
$fpdf->Cell(185, 20, 'Lista Total de Maestros', 0, 1, 'C');
// conexion base de datos
$enlace = mysqli_connect("localhost", "root", "", "caferedbd");
$frec = mysqli_query($enlace, "SELECT * FROM maestro");
//formato de la tabla
$fpdf->Ln(5);
$fpdf->SetFont('Arial', 'B', 10);
$fpdf->SetFillColor(67, 187, 70);
// fondo color verde
// titulos
$fpdf->Cell(15, 5, 'Codigo', 1, 0, 'C', True);
$fpdf->Cell(16, 5, 'Nombre', 1, 0, 'C', True);
$fpdf->Cell(20, 5, 'Apellido', 1, 0, 'C', True);
$fpdf->Cell(90, 5, 'Direccion', 1, 0, 'C', True);
$fpdf->Cell(50, 5, 'Correo', 1, 1, 'C', True);
// tipo de color y letra adentro de la consulta
$fpdf->SetFont('Arial', '', 9);
while ($frow = mysqli_fetch_row($frec)) {
    // las columnas que quiere que aparezca
    $fpdf->Cell(15, 5, $frow[1], 1, 0, 'C');
    $fpdf->Cell(16, 5, $frow[2], 1, 0, 'C');
    $fpdf->Cell(20, 5, $frow[3], 1, 0, 'C');
    $fpdf->Cell(90, 5, $frow[5], 1, 0, 'C');
    $fpdf->Cell(50, 5, $frow[6], 1, 1, 'C');
}
$fpdf->Output('Reporte_Maestro', 'D');
// solo funciona para descargar
コード例 #7
0
ファイル: Reporte.php プロジェクト: ematul/proyectosSistemas2
// aca va la imagen
$fpdf->Image('images/cabeza-re.jpg', 18, 3, 165, 35, 'JPG', '', 0, 1, 'C');
$fpdf->Cell(170, 18, date('d/m/Y'), 0, 1, 'R');
$fpdf->Cell(170, 2, date('H:m:s'), 0, 1, 'R');
$fpdf->Cell(185, 20, 'Lista Total de Estudiantes', 0, 1, 'C');
// conexion base de datos
$enlace = mysqli_connect("localhost", "root", "", "caferedbd");
$frec = mysqli_query($enlace, "SELECT * FROM estudiante");
//formato de la tabla
$fpdf->Ln(5);
$fpdf->SetFont('Arial', 'B', 10);
$fpdf->SetFillColor(67, 187, 70);
// fondo color verde
// titulos
$fpdf->Cell(15, 5, 'Codigo', 1, 0, 'C', True);
$fpdf->Cell(16, 5, 'Nombre', 1, 0, 'C', True);
$fpdf->Cell(20, 5, 'Apellido', 1, 0, 'C', True);
$fpdf->Cell(50, 5, 'Correo', 1, 0, 'C', True);
$fpdf->Cell(90, 5, 'Direccion', 1, 1, 'C', True);
// tipo de color y letra adentro de la consulta
$fpdf->SetFont('Arial', '', 9);
while ($frow = mysqli_fetch_row($frec)) {
    // las columnas que quiere que aparezca
    $fpdf->Cell(15, 5, $frow[1], 1, 0, 'C');
    $fpdf->Cell(16, 5, $frow[2], 1, 0, 'C');
    $fpdf->Cell(20, 5, $frow[3], 1, 0, 'C');
    $fpdf->Cell(50, 5, $frow[6], 1, 0, 'C');
    $fpdf->Cell(90, 5, $frow[5], 1, 1, 'C');
}
$fpdf->Output('Reporte_Estudiantes', 'D');
// solo funciona para descargar
コード例 #8
0
<?php

Fpdf::SetMargins(20, 20, 20);
Fpdf::AddPage();
Fpdf::SetFont('Times', '', 12);
// Header de la tabla
Fpdf::SetFont('Arial', 'B', 10);
Fpdf::Cell(10, 5, '#', 1);
Fpdf::Cell(30, 5, 'Cedula', 1);
Fpdf::Cell(50, 5, 'Nombres', 1);
Fpdf::Cell(40, 5, 'Telefono', 1);
Fpdf::Cell(40, 5, 'Cargo', 1);
Fpdf::Ln(5);
// contenido
Fpdf::SetFont('Arial', '', 10);
// consulto los empleados
foreach ($clientes as $row) {
    Fpdf::Cell(10, 5, $row->id, 1);
    Fpdf::Cell(30, 5, $row->cedula, 1);
    Fpdf::Cell(50, 5, utf8_decode($row->nombre . ' ' . $row->apellido), 1);
    Fpdf::Cell(40, 5, $row->telefono, 1);
    Fpdf::Cell(40, 5, $row->email, 1);
    Fpdf::Ln(5);
}
Fpdf::Output();
exit;
コード例 #9
0
 public function getViewResultsPdf($id)
 {
     $result = Performance::find($id);
     $perf = Performance::find($id);
     $user = Performance::find($id);
     $rating = Performance::find($id);
     $u = $perf->utilities;
     $qow = $perf->workQuality;
     $pffp = $perf->potential;
     $overall = number_format(($u + $qow + $pffp) / 3, 2);
     $rating = ParRatingsRef::where('upper_limit', '>=', $overall)->where('lower_limit', '<=', $overall)->first();
     $overpercent = number_format($overall / 6 * 100, 2);
     $department = Department::where('id', $perf->dept_id)->first();
     Fpdf::AddPage();
     Fpdf::PageNo();
     Fpdf::AliasNbPages('{nb}');
     Fpdf::Image('img/dap.jpg', 40, 0, 150);
     Fpdf::Ln(30);
     Fpdf::SetFont('Arial', 'B', 11);
     Fpdf::SetTextColor(0, 0, 0);
     Fpdf::Cell(300, 20, 'Date Generated: ' . date("F j, Y"), 0, 2, 'C', 0);
     Fpdf::SetFont('Arial', 'B', 15);
     Fpdf::Cell(0, 0, 'Performance Evaluation', 0, 1, 'L', 0);
     Fpdf::Ln(8);
     Fpdf::SetFont('Arial', 'B', 11);
     Fpdf::Cell(0, 0, 'Name: ' . $perf->user->formatName(':ln, :fn :mn'), 0, 1, 'L', 0);
     Fpdf::Ln(8);
     Fpdf::Cell(0, 0, 'Department: ' . $department->name, 0, 1, 'L', 0);
     Fpdf::Ln(8);
     Fpdf::Cell(0, 0, 'Semester: ' . $perf->semester, 0, 1, 'L', 0);
     Fpdf::Ln(10);
     Fpdf::SetFont('Arial', '', 20);
     Fpdf::SetDrawColor(224, 224, 224);
     Fpdf::SetFillColor(51, 51, 225);
     Fpdf::SetTextColor(255, 255, 255);
     Fpdf::Cell(110, 10, 'Utilities', 1, 1, 'C', true);
     Fpdf::SetFont('Arial', 'B', 7);
     Fpdf::SetFillColor(204, 229, 225);
     Fpdf::SetTextColor(96, 96, 96);
     Fpdf::Cell(50, 10, 'Intra-group Involvements', 1, 0, 'C', true);
     Fpdf::Cell(20, 10, $result->util1, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('util1')->adjectival, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('util1')->description, 1, 1, 'C', 0);
     Fpdf::Cell(50, 10, 'Inter-group Involvements', 1, 0, 'C', true);
     Fpdf::Cell(20, 10, $result->util2, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('util2')->adjectival, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('util2')->description, 1, 1, 'C', 0);
     Fpdf::Cell(50, 10, 'Committee Work', 1, 0, 'C', true);
     Fpdf::Cell(20, 10, $result->util3, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('util3')->adjectival, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('util3')->description, 1, 1, 'C', 0);
     Fpdf::SetTextColor(204, 0, 0);
     Fpdf::Cell(50, 10, 'Average Rating', 1, 0, 'C', true);
     Fpdf::Cell(20, 10, $result->util_overall, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('utilities')->adjectival, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('utilities')->description, 1, 1, 'C', 0);
     //Quality of work table
     Fpdf::Ln(10);
     Fpdf::SetFont('Arial', '', 20);
     Fpdf::SetDrawColor(224, 224, 224);
     Fpdf::SetFillColor(51, 51, 225);
     Fpdf::SetTextColor(255, 255, 255);
     Fpdf::Cell(110, 10, 'Quality of Work', 1, 2, 'C', true);
     Fpdf::SetFont('Arial', 'B', 7);
     Fpdf::SetFillColor(204, 229, 225);
     Fpdf::SetTextColor(96, 96, 96);
     Fpdf::Cell(50, 10, 'Relevance to Project/unit objectives', 1, 0, 'C', true);
     Fpdf::Cell(20, 10, $result->qow1, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('qow1')->adjectival, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('qow1')->description, 1, 1, 'C', 0);
     Fpdf::Cell(50, 10, 'Timeliness', 1, 0, 'C', true);
     Fpdf::Cell(20, 10, $result->qow2, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('qow2')->adjectival, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('qow2')->description, 1, 1, 'C', 0);
     Fpdf::Cell(50, 10, 'Thoroughness', 1, 0, 'C', true);
     Fpdf::Cell(20, 10, $result->qow3, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('qow3')->adjectival, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('qow3')->description, 1, 1, 'C', 0);
     Fpdf::Cell(50, 10, 'High-Rate', 1, 0, 'C', true);
     Fpdf::Cell(20, 10, $result->qow4, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('qow4')->adjectival, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('qow4')->description, 1, 1, 'C', 0);
     Fpdf::Cell(50, 10, 'Accuracy', 1, 0, 'C', true);
     Fpdf::Cell(20, 10, $result->qow5, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('qow5')->adjectival, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('qow5')->description, 1, 1, 'C', 0);
     Fpdf::Cell(50, 10, 'Foresight', 1, 0, 'C', true);
     Fpdf::Cell(20, 10, $result->qow6, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('qow6')->adjectival, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('qow6')->description, 1, 1, 'C', 0);
     Fpdf::Cell(50, 10, 'Neatness and Presentability', 1, 0, 'C', true);
     Fpdf::Cell(20, 10, $result->qow7, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('qow7')->adjectival, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('qow7')->description, 1, 1, 'C', 0);
     Fpdf::Cell(50, 10, 'Cost-effectiveness', 1, 0, 'C', true);
     Fpdf::Cell(20, 10, $result->qow8, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('qow8')->adjectival, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('qow8')->description, 1, 1, 'C', 0);
     Fpdf::SetTextColor(204, 0, 0);
     Fpdf::Cell(50, 10, 'Average Rating', 1, 0, 'C', true);
     Fpdf::Cell(20, 10, $result->qow_overall, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('qow_overall')->adjectival, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('qow_overall')->description, 1, 1, 'C', 0);
     //Potential for Future Performance table
     Fpdf::Ln(10);
     Fpdf::SetFont('Arial', '', 20);
     Fpdf::SetDrawColor(224, 224, 224);
     Fpdf::SetFillColor(51, 51, 225);
     Fpdf::SetTextColor(255, 255, 255);
     Fpdf::Cell(110, 10, 'Potential for Future Performance', 1, 2, 'C', true);
     Fpdf::SetFont('Arial', 'B', 7);
     Fpdf::SetFillColor(204, 229, 225);
     Fpdf::SetTextColor(96, 96, 96);
     Fpdf::Cell(50, 10, 'Appropriate Expertise', 1, 0, 'C', true);
     Fpdf::Cell(20, 10, $result->pffp1, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('pffp1')->adjectival, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('pffp1')->description, 1, 1, 'C', 0);
     Fpdf::Cell(50, 10, 'Professional Interest', 1, 0, 'C', true);
     Fpdf::Cell(20, 10, $result->pffp2, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('pffp2')->adjectival, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('pffp2')->description, 1, 1, 'C', 0);
     Fpdf::Cell(50, 10, 'Ability to Learn', 1, 0, 'C', true);
     Fpdf::Cell(20, 10, $result->pffp3, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('pffp3')->adjectival, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('pffp3')->description, 1, 1, 'C', 0);
     Fpdf::Cell(50, 10, 'Professional Integrity ', 1, 0, 'C', true);
     Fpdf::Cell(20, 10, $result->pffp4, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('pffp4')->adjectival, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('pffp4')->description, 1, 1, 'C', 0);
     Fpdf::Cell(50, 10, 'Work standards ', 1, 0, 'C', true);
     Fpdf::Cell(20, 10, $result->pffp5, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('pffp5')->adjectival, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('pffp5')->description, 1, 1, 'C', 0);
     Fpdf::Cell(50, 10, 'Innovativeness ', 1, 0, 'C', true);
     Fpdf::Cell(20, 10, $result->pffp6, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('pffp6')->adjectival, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('pffp6')->description, 1, 1, 'C', 0);
     Fpdf::Cell(50, 10, 'Maturity ', 1, 0, 'C', true);
     Fpdf::Cell(20, 10, $result->pffp7, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('pffp7')->adjectival, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('pffp7')->description, 1, 1, 'C', 0);
     Fpdf::Cell(50, 10, 'Collaboration ', 1, 0, 'C', true);
     Fpdf::Cell(20, 10, $result->pffp8, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('pffp8')->adjectival, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('pffp8')->description, 1, 1, 'C', 0);
     Fpdf::Cell(50, 10, 'Initiative', 1, 0, 'C', true);
     Fpdf::Cell(20, 10, $result->pffp9, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('pffp9')->adjectival, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('pffp9')->description, 1, 1, 'C', 0);
     Fpdf::Cell(50, 10, 'Responsiveness', 1, 0, 'C', true);
     Fpdf::Cell(20, 10, $result->pffp10, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('pffp10')->adjectival, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('pffp10')->description, 1, 1, 'C', 0);
     Fpdf::Cell(50, 10, 'Adaptability and Consistent track record ', 1, 0, 'C', true);
     Fpdf::Cell(20, 10, $result->pffp11, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('pffp11')->adjectival, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('pffp11')->description, 1, 1, 'C', 0);
     Fpdf::SetTextColor(204, 0, 0);
     Fpdf::Cell(50, 10, 'Average Rating', 1, 0, 'C', true);
     Fpdf::Cell(20, 10, $result->pffp_overall, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('pffp_overall')->adjectival, 1, 0, 'C', 0);
     Fpdf::Cell(20, 10, $perf->equivalent('pffp_overall')->description, 1, 1, 'C', 0);
     //Overall Rating table
     Fpdf::Ln(10);
     Fpdf::SetFont('Arial', '', 20);
     Fpdf::SetDrawColor(224, 224, 224);
     Fpdf::SetFillColor(51, 51, 225);
     Fpdf::SetTextColor(255, 255, 255);
     Fpdf::Cell(140, 10, 'Overall Rating', 1, 2, 'C', true);
     Fpdf::SetFont('Arial', 'B', 7);
     Fpdf::SetFillColor(204, 229, 225);
     Fpdf::SetTextColor(96, 96, 96);
     Fpdf::Cell(30, 10, 'Superior Remarks', 1, 0, 'C', true);
     Fpdf::Cell(110, 10, $perf->comments, 1, 1, 'C', 0);
     Fpdf::Cell(30, 10, 'Overall rating', 1, 0, 'C', true);
     Fpdf::Cell(30, 10, $result->overall, 1, 0, 'C', 0);
     Fpdf::Cell(30, 10, $rating->adjectival, 1, 0, 'C', 0);
     Fpdf::Cell(50, 10, $rating->description, 1, 0, 'C', 0);
     Fpdf::SetY(-35);
     Fpdf::AliasNbPages('{nb}');
     Fpdf::SetFont('Arial', 'I', 10);
     Fpdf::SetTextColor(0, 0, 0);
     Fpdf::Cell(0, 10, 'Page ' . Fpdf::PageNo() . '/{nb}', 0, 0, 'C');
     Fpdf::Output();
     exit;
 }
コード例 #10
0
ファイル: routes.php プロジェクト: abhikalotra/Samples1
             $cleanAction = str_replace("&nbsp;", " ", $cleanAction);
             Fpdf::MultiCell(0, 25, $cleanAction, 'LTR', 'L');
         } else {
             Fpdf::SetFont('Arial', '', 10);
             Fpdf::SetTextColor(0);
             $cleanAction2 = strip_tags($action->description);
             $cleanAction2 = str_replace("&nbsp;", " ", $cleanAction2);
             Fpdf::MultiCell(0, 25, $cleanAction2, 'LTR', 'L');
             $contacts_name = DB::table('contacts')->where('contactsID', '=', $action->type)->first(array('cName'));
             Fpdf::SetFont('Arial', 'I', 8);
             Fpdf::SetTextColor(153);
             Fpdf::MultiCell(0, 25, "Assigned To: " . $contacts_name->cName, 'LRB', 'L');
         }
     }
 }
 Fpdf::Output('../public/pdf/minitmeet' . $minute->mID . '.pdf', 'F');
 if ($view != "view") {
     $id = Input::get('id');
     $minute = DB::table('minutes')->where('mID', '=', $id)->join('users', 'id', '=', 'user_id_minutes')->first(array('mID', 'mTitle', 'mAgenda', 'username', 'email', 'first_name', 'last_name', 'selected_date', 'bgcolor', 'fontcolor', 'logo'));
     if (!isset($_GET['agenda'])) {
         $subject = 'Your Meeting Notes';
         $type = "minutes";
     } else {
         $subject = 'Your Meeting Agenda';
         $type = "agenda";
     }
     $mail = Mail::send('emails.pdf', array('minute' => $minute, 'type' => $type), function ($message) {
         $id = Input::get('id');
         $minute = DB::table('minutes')->where('mID', '=', $id)->join('users', 'id', '=', 'user_id_minutes')->first(array('mID', 'mTitle', 'mAgenda', 'username', 'email', 'first_name', 'last_name', 'selected_date', 'bgcolor', 'fontcolor', 'logo'));
         $attendees = DB::table('contacts')->join('attendee_Minutes', 'contacts.contactsID', '=', 'attendee_Minutes.a_id')->where('m_id', '=', $id)->lists('cEmail');
         if (!isset($_GET['agenda'])) {
コード例 #11
0
Fpdf::AddPage();
Fpdf::Cell(20, 5, utf8_decode('Las imagenes a continuación muestran cada uno de los procesos realizados a nuetros servicios'));
Fpdf::Ln(10);
Fpdf::SetFont('Arial', 'B', 10);
Fpdf::Cell(50, 5, 'Solicitado');
Fpdf::Cell(50, 5, 'Procesando');
Fpdf::Cell(50, 5, 'Finalizado');
$img1 = 'imagenes/servicios/servicio_0' . $servicio->id . '_img1.jpg';
$img2 = 'imagenes/servicios/servicio_0' . $servicio->id . '_img2.jpg';
$img3 = 'imagenes/servicios/servicio_0' . $servicio->id . '_img3.jpg';
$noExiste = 'imagenes/no_disponible.jpg';
// mostrar imagen 1
if (file_exists($img1)) {
    Fpdf::Image($img1, 20, 80, 40);
} else {
    Fpdf::Image($noExiste, 20, 80, 40);
}
// mostrar imagen 2
if (file_exists($img2)) {
    Fpdf::Image($img2, 65, 80, 40);
} else {
    Fpdf::Image($noExiste, 65, 80, 40);
}
// mostrar imagen 3
if (file_exists($img3)) {
    Fpdf::Image($img3, 115, 80, 40);
} else {
    Fpdf::Image($noExiste, 115, 80, 40);
}
Fpdf::Output('ES0' . $servicio->id . date('--d_m_Y-h:i:sa') . '.pdf', 'I');
exit;
コード例 #12
0
ファイル: ImpresionService.php プロジェクト: noyamn/GOA
 public static function imprimeListadoHistorico($incidencias)
 {
     Fpdf::AddPage();
     Fpdf::Image(App::make('url')->to('/dist/img/wu-header.gif'), 10, 5, 190, 25);
     Fpdf::Ln(25);
     $cabecera = array('NRO', 'TIPO', 'AGENTE', html_entity_decode('DESCRIPCIÓN'), 'MTCN', 'BENEFICIARIO', 'DESTINO', 'MONTO', 'OPERADOR');
     Fpdf::SetFont('Arial', '', 12);
     Fpdf::Cell(190, 8, html_entity_decode('Histórico de Incidencias'), 1, 0, 'C');
     Fpdf::Ln(13);
     // Anchuras de las columnas
     $w = array(10, 15, 30, 30, 20, 25, 25, 15, 20);
     // Cabeceras
     Fpdf::SetFont('Arial', 'B', 7);
     for ($j = 0; $j < count($cabecera); $j++) {
         Fpdf::Cell($w[$j], 8, $cabecera[$j], 1, 0, 'C');
     }
     Fpdf::Ln();
     // Datos
     Fpdf::SetFont('Arial', '', 7);
     foreach ($incidencias as $incidencia) {
         Fpdf::Cell($w[0], 8, $incidencia->codigo, 1, '', "C");
         Fpdf::Cell($w[1], 8, $incidencia->apertura->incidente->tipoIncidente->descripcion, 1, '', "L");
         $current_y = Fpdf::GetY();
         $current_x = Fpdf::GetX();
         if (strlen($incidencia->agente->nombre_fantasia) > 30) {
             Fpdf::MultiCell($w[2], 4, $incidencia->agente->nombre_fantasia, 1, 'L');
         } else {
             Fpdf::MultiCell($w[2], 8, $incidencia->agente->nombre_fantasia, 1, 'L');
         }
         Fpdf::SetXY($current_x + 30, $current_y);
         $current_y = Fpdf::GetY();
         $current_x = Fpdf::GetX();
         $descripcion = $incidencia->apertura->incidente->descripcion . ' -' . $incidencia->apertura->descripcion;
         if (strlen($descripcion) > 35) {
             Fpdf::MultiCell($w[3], 4, $descripcion, 1, 'L');
         } else {
             Fpdf::MultiCell($w[3], 8, $descripcion, 1, 'L');
         }
         Fpdf::SetXY($current_x + 30, $current_y);
         Fpdf::Cell($w[4], 8, $incidencia->mtcn, 1, 0, 'C');
         $current_y = Fpdf::GetY();
         $current_x = Fpdf::GetX();
         if (strlen($incidencia->beneficiario) > 25) {
             Fpdf::MultiCell($w[5], 4, $incidencia->beneficiario, 1, 'L');
         } else {
             Fpdf::MultiCell($w[5], 8, $incidencia->beneficiario, 1, 'L');
         }
         Fpdf::SetXY($current_x + 25, $current_y);
         $current_y = Fpdf::GetY();
         $current_x = Fpdf::GetX();
         if (strlen($incidencia->destino) > 25) {
             Fpdf::MultiCell($w[6], 4, $incidencia->destino, 1, 'L');
         } else {
             Fpdf::MultiCell($w[6], 8, $incidencia->destino, 1, 'L');
         }
         Fpdf::SetXY($current_x + 25, $current_y);
         Fpdf::Cell($w[7], 8, $incidencia->monto, 1, 0, 'C');
         $current_y = Fpdf::GetY();
         $current_x = Fpdf::GetX();
         if (strlen($incidencia->operador->nombre_apellido) > 20) {
             Fpdf::MultiCell($w[8], 4, $incidencia->operador->nombre_apellido, 1, 'L');
             Fpdf::SetXY($current_x - 190, $current_y + 4);
         } else {
             Fpdf::MultiCell($w[8], 8, $incidencia->operador->nombre_apellido, 1, 'L');
             Fpdf::SetXY($current_x - 190, $current_y);
         }
         Fpdf::Ln();
     }
     Fpdf::Output();
 }
コード例 #13
0
 public function getPerfReportsPdf()
 {
     $deptL = Session::get('deptpdf');
     $sem = Session::get('sempdf');
     $year = Session::get('yearpdf');
     if ($deptL == 'All') {
         $deptL = '*';
     }
     //------------------------------
     if ($sem == 'All') {
         $sem = '*';
     }
     $users = 'Performance';
     $matchThese = array();
     //If user chooses from dropdown
     if ($deptL != "*") {
         //If true insert this to variable
         $matchThese = array_add($matchThese, 'dept_id', $deptL);
         /***********Add Array*****************/
         //If user chooses from dropdown
         if ($sem != "*") {
             //If true insert this to variable
             $matchThese = array_add($matchThese, 'semester', $sem);
             if ($year != "All") {
                 $matchThese = array_add($matchThese, 'year', $year);
                 $query = $users::where($matchThese)->orderBy('overall', 'desc')->get();
             } else {
                 $query = $users::where($matchThese)->orderBy('overall', 'desc')->get();
             }
         } else {
             //===========Else of Semester
             if ($year != "All") {
                 $matchThese = array_add($matchThese, 'year', $year);
                 $query = $users::where($matchThese)->orderBy('overall', 'desc')->get();
             } else {
                 //===========Else of Year
                 $query = $users::where($matchThese)->orderBy('overall', 'desc')->get();
             }
             $query = $users::where($matchThese)->orderBy('overall', 'desc')->get();
         }
         /***********End Add Array*****************/
     } else {
         //===========Else of Department
         /*************Add Array***************/
         if ($sem != "*") {
             //If true insert this to variable
             $matchThese = array_add($matchThese, 'semester', $sem);
             if ($year != "All") {
                 $matchThese = array_add($matchThese, 'year', $year);
                 $query = $users::where($matchThese)->orderBy('overall', 'desc')->get();
             } else {
                 $query = $users::where($matchThese)->orderBy('overall', 'desc')->get();
             }
         } else {
             //===========Else of Semester
             if ($year != "All") {
                 $matchThese = array_add($matchThese, 'year', $year);
                 $query = $users::where($matchThese)->orderBy('overall', 'desc')->get();
             } else {
                 //===========Else of Year
                 $query = $users::all();
             }
         }
         /************End Add Array****************/
     }
     Fpdf::AddPage();
     Fpdf::PageNo();
     Fpdf::AliasNbPages();
     Fpdf::Image('img/dap.jpg', 10, 5, 150);
     Fpdf::Ln(5);
     Fpdf::SetFont('Arial', 'B', 8);
     Fpdf::Cell(300, 20, 'Date Generated: ' . date("Y/m/d"), 0, 2, 'C', 0);
     Fpdf::Cell(30, 10, 'Performance Results', 0, 2, 'C', 0);
     if ($deptL == '*') {
         Fpdf::Cell(22, 10, 'Department: All', 0, 2, 'C', 0);
     } else {
         $filterDepartment = Department::where('id', $deptL)->first();
         Fpdf::Cell(30, 10, 'Department: ' . $filterDepartment->name, 0, 2, 'C', 0);
     }
     //------------------------------
     if ($sem == '*') {
         Fpdf::Cell(22, 10, 'Semester: All', 0, 2, 'C', 0);
     } else {
         Fpdf::Cell(30, 10, 'Semester: ' . $sem, 0, 2, 'C', 0);
     }
     if ($year == 'All') {
         Fpdf::Cell(30, 10, 'Year: All', 0, 2, 'C', 0);
     } else {
         Fpdf::Cell(30, 10, 'Year: ' . $year, 0, 2, 'C', 0);
     }
     Fpdf::SetFont('Arial', 'B', 5.5);
     Fpdf::Cell(5, 5, 'Id', 1, 0, 'C', 0);
     Fpdf::Cell(24.5, 5, 'Employee Name', 1, 0, 'C', 0);
     Fpdf::Cell(24.5, 5, 'Department', 1, 0, 'C', 0);
     Fpdf::SetFillColor(51, 51, 225);
     Fpdf::SetTextColor(0, 0, 0);
     Fpdf::Cell(25, 5, 'Utilities', 1, 0, 'C', true);
     Fpdf::Cell(25, 5, 'Quality of Work', 1, 0, 'C', true);
     Fpdf::Cell(30, 5, 'Potential for future performance', 1, 0, 'C', true);
     Fpdf::SetFillColor(96, 96, 96);
     Fpdf::Cell(25, 5, 'Overall Rating', 1, 0, 'C', true);
     Fpdf::Cell(15, 5, 'Semester', 1, 0, 'C', 0);
     Fpdf::Cell(16, 5, 'Year', 1, 0, 'C', 0);
     Fpdf::Ln();
     foreach ($query as $perf) {
         Fpdf::Cell(5, 5, $perf->user->id, 1, 0, 'C', 0);
         Fpdf::Cell(24.5, 5, $perf->user->formatName(':ln, :fn :mi'), 1, 0, 'C', 0);
         $department = Department::where('id', $perf->dept_id)->first();
         Fpdf::Cell(24.5, 5, $department->name, 1, 0, 'C', 0);
         Fpdf::SetFillColor(204, 229, 225);
         Fpdf::Cell(5, 5, $perf->utilities, 1, 0, 'C', true);
         Fpdf::Cell(20, 5, $perf->equivalent('utilities')->description, 1, 0, 'C', true);
         Fpdf::Cell(5, 5, $perf->workQuality, 1, 0, 'C', true);
         Fpdf::Cell(20, 5, $perf->equivalent('workQuality')->description, 1, 0, 'C', true);
         Fpdf::Cell(5, 5, $perf->potential, 1, 0, 'C', true);
         Fpdf::Cell(25, 5, $perf->equivalent('potential')->description, 1, 0, 'C', true);
         $u = $perf->utilities;
         $qow = $perf->workQuality;
         $pffp = $perf->potential;
         $overall = number_format(($u + $qow + $pffp) / 3, 2);
         $rating = ParRatingsRef::where('upper_limit', '>=', $overall)->where('lower_limit', '<=', $overall)->first();
         $overpercent = number_format($overall / 6 * 100, 2);
         Fpdf::SetFillColor(192, 192, 192);
         Fpdf::Cell(20, 5, $overall, 1, 0, 'C', true);
         Fpdf::Cell(5, 5, $rating->adjectival, 1, 0, 'C', true);
         Fpdf::Cell(15, 5, $perf->semester, 1, 0, 'C', 0);
         Fpdf::Cell(16, 5, $perf->year, 1, 0, 'C', 0);
         Fpdf::Ln();
     }
     Fpdf::SetY(-30.5);
     Fpdf::SetFont('Arial', 'I', 6);
     Fpdf::SetTextColor(0, 0, 0);
     Fpdf::Cell(0, 10, 'Page ' . Fpdf::PageNo() . "/{nb}", 0, 0, 'C');
     Fpdf::Output();
     exit;
     Session::forget('deptpdf');
     Session::forget('sempdf');
     Session::forget('yearpdf');
 }
コード例 #14
0
 public function monthly($res, $id)
 {
     $dt = DateTime::createFromFormat('!m', $id);
     $fpdf = new Fpdf();
     $fpdf->AddPage('L');
     $fpdf->SetFont('Arial', 'B', 16);
     $fpdf->Cell(130);
     $fpdf->Cell(20, 10, Information::where('keyname', '=', 'name')->first()->value, 0, 1, 'C');
     $fpdf->Cell(130);
     $fpdf->SetFont('Arial', '', 14);
     $fpdf->Cell(20, 10, Information::where('keyname', '=', 'address')->first()->value, 0, 1, 'C');
     $header = array('ID', 'Date', 'Pax', 'Status', 'Amount', 'Payment Method', 'Duration');
     $fpdf->SetFont('Arial', 'B', 16);
     $fpdf->Cell(130);
     $fpdf->Cell(20, 10, 'Monthly Report for the Month of: ' . $dt->format('F'), 0, 1, 'C');
     // Colors, line width and bold font
     $fpdf->SetFillColor(255, 0, 0);
     $fpdf->SetTextColor(255);
     $fpdf->SetDrawColor(128, 0, 0);
     $fpdf->SetLineWidth(0.3);
     $fpdf->SetFont('', '');
     // Header
     $fpdf->Ln();
     $fpdf->Cell(10);
     $w = array(35, 25, 25, 45, 23, 50, 55);
     for ($i = 0; $i < count($header); $i++) {
         $fpdf->Cell($w[$i], 7, $header[$i], 1, 0, 'C', true);
     }
     $fpdf->Ln();
     // Color and font restoration
     $fpdf->SetFillColor(224, 235, 255);
     $fpdf->SetTextColor(0);
     $fpdf->SetFont('Arial', '', 12);
     // Data
     $fill = false;
     $total = 0;
     foreach ($res as $row) {
         $fpdf->Cell(10);
         $fpdf->Cell($w[0], 6, $row->id, 'LR', 0, 'L', $fill);
         $fpdf->Cell($w[1], 6, $row->date_request, 'LR', 0, 'L', $fill);
         $fpdf->Cell($w[2], 6, $row->pax, 'LR', 0, 'R', $fill);
         $fpdf->Cell($w[3], 6, $row->status, 'LR', 0, 'R', $fill);
         $fpdf->Cell($w[4], 6, $row->net_total, 'LR', 0, 'R', $fill);
         if ($row->payment_mode != '') {
             $fpdf->Cell($w[5], 6, $row->payment_mode . " (" . $row->payment_method . ")", 'LR', 0, 'L', $fill);
         } else {
             $fpdf->Cell($w[5], 6, 'Payment Method not set', 'LR', 0, 'L', $fill);
         }
         $fpdf->Cell($w[6], 6, $row->reservation_start . ' to ' . $row->reservation_end, 'LR', 0, 'L', $fill);
         $fpdf->Ln();
         $fill = !$fill;
         $total = +$row->net_total;
     }
     // Closing line
     $fpdf->Cell(10);
     $fpdf->Cell(array_sum($w), 0, '', 'T');
     $fpdf->Ln();
     $fpdf->Cell(190);
     $fpdf->SetFont('Arial', 'B', 13);
     $fpdf->Cell(40, 7, 'Total:', '', 0, 'R');
     $fpdf->SetFont('Arial', '', 13);
     $fpdf->Cell(40, 7, "{$total}", 0);
     $fpdf->Output();
     exit;
 }
コード例 #15
0
 public function getLeavesListPdf($id)
 {
     $audit = AuditTrail::create(['user_id' => Auth::id(), 'role' => 'Employee Management Admin', 'action' => 'printed Leave balances of All employees.']);
     if ($id == "*") {
         $users = User::all();
     } else {
         $users = User::where('department_id', $id)->get();
     }
     Fpdf::AddPage();
     Fpdf::Image('img/dap.jpg', 40, 0, 150);
     Fpdf::Ln(35);
     Fpdf::SetFont('Arial', 'B', 11);
     Fpdf::SetTextColor(0, 0, 0);
     Fpdf::Cell(300, 20, 'Date Generated: ' . date("F j, Y"), 0, 2, 'C', 0);
     Fpdf::Cell(18, 7, 'Leave List', 0, 2, 'C', 0);
     Fpdf::SetFont('Arial', 'B', 7);
     Fpdf::SetTextColor(0, 0, 0);
     Fpdf::Cell(18, 7, 'ID', 1);
     Fpdf::Cell(24, 7, 'Name', 1);
     Fpdf::Cell(30, 7, 'Department', 1);
     Fpdf::Cell(9, 7, 'VL', 1);
     Fpdf::Cell(9, 7, 'SL', 1);
     Fpdf::Cell(9, 7, 'PL', 1);
     Fpdf::Cell(9, 7, 'ML', 1);
     Fpdf::Cell(9, 7, 'BL', 1);
     Fpdf::Ln();
     Fpdf::SetFont('Arial', '', 7);
     foreach ($users as $user) {
         Fpdf::Cell(18, 7, $user->id, 1);
         Fpdf::Cell(24, 7, $user->firstname, 1);
         Fpdf::Cell(30, 7, $user->department->name, 1);
         $leaves = LeaveBalance::where('user_id', $user->id)->get();
         foreach ($leaves as $leave) {
             Fpdf::Cell(9, 7, $leave->balance, 1);
         }
         Fpdf::Ln();
     }
     Fpdf::SetY(-35);
     Fpdf::AliasNbPages('{nb}');
     Fpdf::SetFont('Arial', 'I', 10);
     Fpdf::SetTextColor(0, 0, 0);
     Fpdf::Cell(0, 10, 'Page ' . Fpdf::PageNo() . '/{nb}', 0, 0, 'C');
     Fpdf::Output();
     exit;
 }
コード例 #16
0
 public function getListPropReportsPdf()
 {
     $cat = Session::get('catid');
     if ($cat == "*") {
         $props = Properties::all();
         $catid = "*";
     } else {
         $props = Properties::where('prop_category', $cat)->get();
         $catid = PropertyCategory::where('id', $cat)->pluck('id');
     }
     Fpdf::AddPage();
     Fpdf::Image('img/dap.jpg', 10, 5, 150);
     Fpdf::SetFont('Arial', 'B', 12);
     Fpdf::Ln(20.6);
     Fpdf::Cell(40, 27, 'List of Properties', 0, 2, 'C', 0);
     Fpdf::SetFont('Arial', 'B', 9.5);
     Fpdf::Cell(27, 5, 'Property ID', 1, 0, 'C', 0);
     Fpdf::Cell(27, 5, 'Serial No', 1, 0, 'C', 0);
     Fpdf::Cell(27, 5, 'Property Name', 1, 0, 'C', 0);
     Fpdf::Cell(27, 5, 'Category', 1, 0, 'C', 0);
     Fpdf::Cell(27, 5, 'Status', 1, 0, 'C', 0);
     Fpdf::Cell(27, 5, 'Cost', 1, 0, 'C', 0);
     Fpdf::Cell(27, 5, 'Date Acquired', 1, 0, 'C', 0);
     Fpdf::Ln();
     foreach ($props as $prop) {
         Fpdf::SetFont('Arial', 'B', 6);
         Fpdf::Cell(27, 4, $prop->propname, 1, 0, 'C', 0);
         Fpdf::Cell(27, 4, $prop->serialno, 1, 0, 'C', 0);
         Fpdf::Cell(27, 4, $prop->propname, 1, 0, 'C', 0);
         $category = PropertyCategory::find($prop->prop_category);
         Fpdf::Cell(27, 4, $category->catname, 1, 0, 'C', 0);
         Fpdf::Cell(27, 4, $prop->propstatus, 1, 0, 'C', 0);
         Fpdf::Cell(27, 4, $prop->propcost, 1, 0, 'C', 0);
         Fpdf::Cell(27, 4, $prop->formatDateAcquired(), 1, 0, 'C', 0);
         Fpdf::Ln();
     }
     Fpdf::Output();
     exit;
 }
コード例 #17
0
ファイル: ImpresionService.php プロジェクト: noyamn/host
 public static function imprimeIncidencia($incidencia)
 {
     Fpdf::AddPage();
     Fpdf::Image(App::make('url')->to('/dist/img/wu-header.gif'), 10, 5, 190, 25);
     Fpdf::Ln(25);
     Fpdf::Rect(10, 32, 190, 70);
     Fpdf::SetFont('Arial', 'B', 11);
     Fpdf::SetX(13);
     Fpdf::Cell(35, 10, "Datos de la incidencia");
     Fpdf::Ln(10);
     Fpdf::SetFont('Arial', '', 10);
     Fpdf::SetX(13);
     Fpdf::Cell(35, 8, "Nro. Incidencia:");
     Fpdf::Cell(60, 8, $incidencia->codigo);
     Fpdf::Cell(35, 8, "Fecha:");
     $fecha = date('d/m/Y H:i', strtotime($incidencia->fecha_alta));
     Fpdf::Cell(60, 8, $fecha);
     Fpdf::ln();
     Fpdf::SetX(13);
     Fpdf::Cell(35, 8, "Incidente:");
     Fpdf::Cell(60, 8, html_entity_decode($incidencia->apertura->incidente->descripcion));
     Fpdf::Cell(35, 8, "Beneficiario:");
     Fpdf::Cell(60, 8, $incidencia->beneficiario);
     Fpdf::ln();
     Fpdf::SetX(13);
     Fpdf::Cell(35, 8, "Apertura:");
     Fpdf::Cell(60, 8, html_entity_decode($incidencia->apertura->descripcion));
     Fpdf::Cell(35, 8, "Monto principal:");
     Fpdf::Cell(60, 8, $incidencia->monto);
     Fpdf::ln();
     Fpdf::SetX(13);
     Fpdf::Cell(35, 8, "MTCN:");
     Fpdf::Cell(60, 8, html_entity_decode($incidencia->mtcn));
     Fpdf::Cell(35, 8, "Destino:");
     Fpdf::Cell(60, 8, $incidencia->destino);
     Fpdf::ln();
     Fpdf::SetX(13);
     Fpdf::Cell(35, 8, html_entity_decode("Observaciones:"));
     Fpdf::ln();
     Fpdf::SetX(13);
     $observaciones = str_replace('<p>', '', $incidencia->observaciones);
     $observaciones = str_replace('</p>', '', $observaciones);
     Fpdf::Multicell(170, 5, $observaciones);
     Fpdf::Ln(10);
     Fpdf::Rect(10, 105, 190, 50);
     Fpdf::Ln(4);
     Fpdf::SetFont('Arial', 'B', 11);
     Fpdf::SetX(13);
     Fpdf::Cell(35, 8, "Datos del agente");
     Fpdf::Ln(10);
     Fpdf::SetX(13);
     Fpdf::SetFont('Arial', '', 10);
     Fpdf::Cell(35, 8, html_entity_decode("Código:"));
     Fpdf::Cell(60, 8, html_entity_decode($incidencia->agente->codigo));
     Fpdf::Cell(35, 8, html_entity_decode("Código Postal:"));
     Fpdf::Cell(60, 8, html_entity_decode($incidencia->agente->codigo_postal));
     Fpdf::Ln();
     Fpdf::SetX(13);
     Fpdf::Cell(35, 8, html_entity_decode("Razón Social:"));
     Fpdf::Cell(60, 8, html_entity_decode($incidencia->agente->razon_social));
     Fpdf::Cell(35, 8, html_entity_decode("Localidad:"));
     Fpdf::Cell(60, 8, html_entity_decode($incidencia->agente->localidad->descripcion));
     Fpdf::Ln();
     Fpdf::SetX(13);
     Fpdf::Cell(35, 8, "Domicilio:");
     Fpdf::Cell(60, 8, html_entity_decode($incidencia->agente->domicilio));
     Fpdf::Cell(35, 8, html_entity_decode("Provincia:"));
     Fpdf::Cell(60, 8, html_entity_decode($incidencia->agente->localidad->provincia->descripcion));
     Fpdf::Output();
     exit;
 }
コード例 #18
0
 public function getComprovante()
 {
     $emprestimo = DB::table('emprestimo')->max('id_emprestimo');
     // DB::table('users')
     //             ->join('contacts', 'users.id', '=', 'contacts.user_id')
     //             ->join('orders', 'users.id', '=', 'orders.user_id')
     //             ->select('users.id', 'contacts.phone', 'orders.price')
     //             ->get();
     $v2 = DB::table('emprestimo')->join('cliente', 'emprestimo.id_clientedois', '=', 'cliente.id_cliente')->select('emprestimo.id_emprestimo', 'cliente.nome', 'emprestimo.data_provavel_devolucao', 'emprestimo.data_emprestimo')->where('emprestimo.id_emprestimo', '=', $emprestimo)->get();
     $v3 = DB::table('usu-emp')->join('usuario', 'usu-emp.usuario', '=', 'usuario.id')->select('usu-emp.emprestimo', 'usu-emp.cliente', 'usuario.nome')->where('usu-emp.emprestimo', '=', $emprestimo)->get();
     $resultado = DB::table('exem-emp')->where('emprestimo', '=', $emprestimo)->get();
     foreach ($resultado as $key => $value) {
         $exem[$key] = $value->exemplar;
     }
     for ($i = 0; $i < count($exem); $i++) {
         $v4[$i] = TabelaExemEmp::join('livro', 'exem-emp.livro', '=', 'id_livro')->select('exem-emp.*', 'nome_livro')->where('exemplar', '=', $exem[$i])->get();
     }
     //foreach ($resultado as $key => $result) {
     $v2 = $v2[0];
     $v3 = $v3[0];
     $data = $v2->data_provavel_devolucao;
     $data2 = $v2->data_emprestimo;
     $data = date("d-m-Y", strtotime(str_replace('/', '-', $data)));
     $data2 = date("d-m-Y", strtotime(str_replace('/', '-', $data2)));
     $fpdf = new Fpdf('P', 'mm', array(140, 80));
     $fpdf->AddPage();
     $fpdf->SetFont('Arial', '', 8);
     $fpdf->Cell(0, 10, '*****************************************************', '', '', 'C');
     $fpdf->Ln();
     $fpdf->Image('vendor\\anouar\\fpdf\\src\\Anouar\\Fpdf\\bibliogest-pdf.png', 18, 19, 45);
     $fpdf->Ln();
     $fpdf->Cell(0, 10, 'COMPROVANTE DE EMPRESTIMO', '', '', 'C');
     $fpdf->Ln();
     $fpdf->Cell(0, 0, 'Data:' . $data2);
     $fpdf->Ln(1);
     $fpdf->Cell(0, 0, '_____________________________________', '', '', 'C');
     $fpdf->Ln();
     $fpdf->Cell(15, 10, 'COD.');
     $fpdf->Cell(30, 10, 'DESCR.');
     $fpdf->Cell(10, 10, 'DEVOL.');
     $fpdf->Ln(7);
     $fpdf->Cell(0, 0, '_____________________________________', '', '', 'C');
     $fpdf->Ln(5);
     // dd($v4);
     for ($i = 0; $i < count($v4); $i++) {
         //echo '<pre>';
         //die(print_r($v4[0][0]->nome_livro));
         //echo '</pre>';
         $fpdf->Cell(15, 5, $v4[$i][0]->exemplar);
         $fpdf->Cell(0, 5, $v4[$i][0]->nome_livro);
         $fpdf->Cell(0, 5, $data, '', '', 'R');
         $fpdf->Ln();
     }
     $fpdf->Ln(5);
     $fpdf->Cell(0, 10, '______________________________', '', '', 'C');
     $fpdf->Ln();
     $fpdf->Cell(0, 0, $v2->nome, '', '', 'C');
     $fpdf->Ln(15);
     $fpdf->Cell(0, 0, 'Usuario: ' . $v3->nome);
     $fpdf->Ln(10);
     $fpdf->Cell(0, 0, '*****************************************************', '', '', 'C');
     $fpdf->Output();
     exit;
 }