} $fpdf->SetFont('Times', 'B', 12); //body $fpdf->SetXY(20, 90); $fpdf->SetFont('Times', '', 12); $datefrom = date("F d, Y", strtotime($applicationForm->flightinfo_datefrom)); $dateto = date("F d, Y", strtotime($applicationForm->flightinfo_dateto)); $purpose = $applicationForm->flightinfo_purpose; $province = strtoupper($applicationForm->province); $content = " Pursuant to DILG Memorandum Circular No. 2006-163 dated November 30, 2006, {$name}, PROVINCE OF {$province}, (whose picture appears below), is hereby authorized to travel to the {$applicationForm->flightinfo_country}, from {$applicationForm->flightinfo_datefrom} to {$applicationForm->flightinfo_dateto}, to {$applicationForm->flightinfo_purpose}"; $content .= "\n\n"; $content .= " {$name2} is authorized to claim for entitlements, "; //check if has no entitlements if it has, include it (ie. (a) payment of international airfare (economy), meal expenses for dinner only, and 20% travel allowance representing incidental expenses ) $content .= $applicationForm->entitlements; $content .= " Further, this authorization shall likewise be subject to the pertinent provisions of all other applicable laws, rules and regulations."; $fpdf->MultiCell(170, 5, $content, 0, 'B'); //closing $fpdf->SetFont('Times', '', 12); //bottom // $fpdf->SetFont('Times','',07); // $fpdf->text(21,250,"copy furnished:"); // $fpdf->SetXY(20,252); // $fpdf->MultiCell(300,3,($applicationForm->copyFurnished) . "\n" . date("mdY",strtotime($applicationForm->created_at))); $match = ['categories' => 'updated picture', 'travelApplication_id' => $applicationForm->id]; $updatedTwoByTwoPicture = App\attachedDocuments::where($match)->first() ? App\attachedDocuments::where($match)->first()->location : ""; if ($updatedTwoByTwoPicture) { $fpdf->Image($updatedTwoByTwoPicture, 20, 170, -350); } else { $fpdf->Image($applicationForm->picture, 20, 170, -350); } //signature
$fpdf->SetFont('Times', 'B', 12); $fpdf->text(30, 110, $name); //body $fpdf->SetXY(20, 120); $fpdf->SetFont('Times', '', 12); $datefrom = date("F d, Y", strtotime($applicationForm->flightinfo_datefrom)); $dateto = date("F d, Y", strtotime($applicationForm->flightinfo_dateto)); $purpose = $applicationForm->flightinfo_purpose; $content = " This refers to your proposed travel to {$applicationForm->flightinfo_country}, from {$datefrom} to {$dateto}, to {$purpose}"; $content .= "\n\n"; $content .= " Relative to the above, please be informed that the request is hereby approved, "; //check if has no entitlements if it has, include it (ie. (a) payment of international airfare (economy), meal expenses for dinner only, and 20% travel allowance representing incidental expenses ) $content .= $applicationForm->entitlements; $content .= "\n\n"; $content .= " It is further understood that this approval shall likewise be subject to the pertinent provisions of all other applicable laws, rules and regulations."; $fpdf->MultiCell(170, 5, $content, 0); //closing $fpdf->SetFont('Times', '', 12); $fpdf->text(128, 210, "Very truly yours,"); //bottom // $fpdf->SetFont('Times','',07); // $fpdf->text(21,250,"copy furnished:"); // $fpdf->SetXY(20,252); // $fpdf->MultiCell(300,3,($applicationForm->copyFurnished) . "\n" . date("mdY",strtotime($applicationForm->created_at))); //signature if (strtolower($applicationForm->applicationstatus) == "approved") { if (strtolower($applicationForm->position) == "governor") { $fpdf->SetFont('Times', '', 11); $fpdf->Image('mar_roxas.png', 120, 210, 50); $fpdf->text(137, 232, "Secretary"); } else {
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(); }
if ($action->type == '0') { Fpdf::SetFont('Arial', '', 10); Fpdf::SetTextColor(0); $cleanAction = strip_tags($action->description); $cleanAction = str_replace(" ", " ", $cleanAction); Fpdf::MultiCell(0, 25, $cleanAction, 'LTR', 'L'); } else { Fpdf::SetFont('Arial', '', 10); Fpdf::SetTextColor(0); $cleanAction2 = strip_tags($action->description); $cleanAction2 = str_replace(" ", " ", $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) {
<?php $fpdf = new Fpdf(); $fpdf->AddPage(); $fpdf->SetFont('Arial', 'B', 16); $fpdf->SetAutoPageBreak(false); $fpdf->image(public_path() . '/img/logo.png', 11, 11, 25, 11); $fpdf->Cell(140, 8, 'Frizelo Frigorificos Ltda', 'LTR', 0, 'C'); $fpdf->SetFont('Arial', '', 9); $fpdf->MultiCell(50, 8, utf8_decode('Numeração: ') . $aso->id, 'TR', 1); $fpdf->SetFont('Arial', '', 6); $fpdf->Cell(140, 5, 'ROD. BR-262 - KM 375, ZONA SUBURBANA, TERENOS-MS FONE: (67) - 3246-8100', 'BLR', 0, 'C', 0); $fpdf->SetFont('Arial', '', 9); $fpdf->MultiCell(50, 5, 'Data: ' . $aso->data, 'BR', 1); $fpdf->SetFont('Arial', 'B', 12); $fpdf->MultiCell(190, 9, utf8_decode('Medicina e Consultoria em Segurança do Trabalho'), 'BLR', 'L'); $fpdf->SetFont('Arial', '', 9); $fpdf->MultiCell(190, 9, utf8_decode('Em cumprimento ao disposto no item 7.4.1 da NR 7 e Portaria N 24 de 24/14/84'), 'LRT', 'C'); $fpdf->SetFont('Arial', 'B', 12); $fpdf->SetTextColor(150); $fpdf->MultiCell(190, 9, utf8_decode('A.S.O. - Atestado de Saúde Ocupacional'), 'LRB', 'C'); $fpdf->SetTextColor(0); $fpdf->SetFont('Arial', '', 9); $fpdf->Cell(33, 7, utf8_decode('Matrícula: ' . $aso->colaborador_matricula), 'LTR', 0, 'L'); $fpdf->Cell(97, 7, utf8_decode('Nome: ' . $aso->colaborador_nome), 'LTR', 0, 'L'); $fpdf->Cell(60, 7, utf8_decode('RG: ' . $aso->colaborador_rg . ' ' . $aso->colaborador_orgao_emissor), 'LTR', 0, 'L'); $fpdf->Ln(); $fpdf->Cell(30, 7, 'Sexo: ' . $aso->colaborador_sexo_descricao, 'LTR', 0, 'L'); $fpdf->Cell(60, 7, 'Data de Nascimento: ' . $aso->colaborador_data_nascimento, 'LTR', 0, 'L'); $fpdf->Cell(30, 7, 'Idade: ' . $aso->colaborador_idade, 'LTR', 0, 'L'); $fpdf->Cell(70, 7, utf8_decode('Setor: ' . $aso->setor), 'LTR', 0, 'L');