function PrintTickets($bean, $event, $arguments) { if ($bean->print_tickets_c == 1) { $sql = $GLOBALS['db']->query("SELECT c.first_name,c.last_name, cc.account_code_c,c.primary_address_state, e.name,e.ticket_type\n FROM e_enrolments e, e_events_e_enrolments_1_c ee,\n contacts_e_enrolments_1_c ce, contacts c, contacts_cstm cc\n WHERE (e.status = 'confirmed' OR e.status='PartPaid') AND e.id=ee.e_events_e_enrolments_1e_enrolments_idb\n AND ee.e_events_e_enrolments_1e_events_ida='{$bean->id}'\n and e.deleted=0 AND ce.deleted=0 AND c.deleted = 0\n AND ce.contacts_e_enrolments_1contacts_ida=c.id AND ce.contacts_e_enrolments_1e_enrolments_idb=e.id\n AND c.id=cc.id_c\n order by e.ticket_type"); $pdf = new FPDF(); while ($row = $GLOBALS['db']->fetchByAssoc($sql)) { $gt = ''; if ($row['ticket_type'] == 'Resit') { $gt = 'Graduate'; } elseif ($row['ticket_type'] == 'Elite') { $gt = 'Elite'; } $pdf->AddPage(); $pdf->SetAutoPageBreak(false); $pdf->SetFont('Arial', '', 16); $pdf->Code39(110, 5, $row['account_code_c']); $pdf->ln(15); $pdf->Cell(0, 0, $bean->name, 0, 1, 'R'); $pdf->SetFont('Arial', 'B', 8); $pdf->ln(10); $pdf->Cell(0, 0, 'Participant Agreement and Release Form - ' . $row['first_name'] . ' ' . $row['last_name'], 0, 1, 'L'); $pdf->ln(4); $pdf->SetFont('Arial', '', 8); $pdf->MultiCell(0, 4, 'Read the terms and conditions outlined below carefully. You may only proceed to enter the room where the training seminar is being held if you fully accept and agree to these terms and conditions in addition to the original terms and conditions which you signed upon purchasing the product.', 0, 'J'); $pdf->ln(3); $pdf->MultiCell(0, 4, 'By signing the below I accept and agree to the following terms and conditions', 0, 'J'); $pdf->ln(3); $pdf->Cell(5); $pdf->Cell(5, 4, '1.', 0, 0, 'L'); $pdf->MultiCell(0, 4, 'You warrant that you have purchased this product for the sole purpose of self-education. You acknowledge that the nominated Training Package and (if applicable) other additional products are based on example or demonstration trades only. You warrant and represent that you will not engage in live trading based on any information or examples provided and that if you do so you indemnify Pumpkin Pty Ltd and its associated companies in relation to all claims and losses suffered by you or anyone else in relation to that trade.', 0, 'J'); $pdf->ln(3); $pdf->Cell(20); $pdf->Cell(20, 8, 'Signature', 0, 0, 'R'); $pdf->Cell(50, 8, '', 1, 0, 'L'); $pdf->Cell(30, 8, 'Date', 0, 0, 'R'); $pdf->Cell(30, 8, '', 1, 0, 'L'); $pdf->ln(20); $pdf->SetFont('Arial', '', 30); $pdf->Cell(105, 0, $row['first_name'], 0, 0, 'L'); $pdf->Cell(0, 0, $row['first_name'], 0, 0, 'L'); $pdf->ln(15); $pdf->Cell(105, 0, $row['last_name'], 0, 0, 'L'); $pdf->Cell(0, 0, $row['last_name'], 0, 0, 'L'); $pdf->ln(10); $pdf->Cell(60); $pdf->SetFont('Arial', '', 16); $pdf->Cell(105, 0, $row['primary_address_state'], 0, 0, 'L'); $pdf->Cell(0, 0, $row['primary_address_state'], 0, 0, 'L'); $pdf->Code39(5, 265, $row['account_code_c']); $pdf->Code39(110, 265, $row['account_code_c']); $pdf->ln(25); $pdf->Cell(60); $pdf->SetFont('Arial', '', 14); $pdf->Cell(105, 0, $gt, 0, 0, 'L'); $pdf->Cell(0, 0, $gt, 0, 0, 'L'); } $pdf->Output('cache/EventRef' . $bean->event_ref . 'Tickets.pdf', 'F'); $bean->print_tickets_c = 0; if (!empty($bean->note_id_c)) { $pdf = file_get_contents('cache/EventRef' . $bean->event_ref . 'Tickets.pdf'); file_put_contents('upload/' . $bean->note_id_c, $pdf); } else { $Notes = BeanFactory::getBean('Notes'); $Notes->name = 'EventRef' . $bean->event_ref . 'Tickets.pdf'; $Notes->file_mime_type = 'pdf'; $Notes->filename = 'EventRef' . $bean->event_ref . 'Tickets.pdf'; $Notes->parent_type = 'E_Events'; $Notes->parent_id = $bean->id; $Notes->save(); $pdf = file_get_contents('cache/EventRef' . $bean->event_ref . 'Tickets.pdf'); file_put_contents('upload/' . $Notes->id, $pdf); } $bean->note_id_c = $Notes->id; } }
$pdf->Cell(70, 5, "ASSUNTO", 1, 0, 'C'); $pdf->Cell(15, 5, "AUTUACAO", 1, 1, 'C'); foreach (Tramite::getProcessosGuiaRecibo() as $key => $processo) { try { $stmt = Controlador::getInstance()->getConnection()->connection->prepare("SELECT NUMERO_PROCESSO,I.INTERESSADO AS INTERESSADO,A.ASSUNTO AS ASSUNTO, DT_AUTUACAO\r\n FROM TB_PROCESSOS_CADASTRO PC\r\n INNER JOIN TB_PROCESSOS_ASSUNTO A ON A.ID = PC.ASSUNTO\r\n INNER JOIN TB_PROCESSOS_INTERESSADOS I ON I.ID = PC.INTERESSADO\r\n WHERE NUMERO_PROCESSO = ? LIMIT 1"); $stmt->bindParam(1, $processo, PDO::PARAM_INT); $stmt->execute(); $out = $stmt->fetch(PDO::FETCH_ASSOC); if (!empty($out)) { $pdf->SetFont("Arial", "", 6); $pdf->Cell(5, 5, ++$cont, 1, 'C'); $pdf->Cell(30, 5, $processo, 1, 0, 'C'); $pdf->Cell(70, 5, $out['INTERESSADO'], 1, 0, 'C'); $pdf->Cell(70, 5, $out['ASSUNTO'], 1, 0, 'C'); $pdf->SetFont("Arial", "", 5); $pdf->Cell(15, 5, Util::formatDate($out['DT_AUTUACAO']), 1, 1, 'C'); } } catch (PDOException $e) { throw new Exception($e); } } $pdf->Ln(10); $pdf->Cell(5, 5, "", 0, 0, 'C'); $pdf->SetFont("Arial", "B", 6); $pdf->Cell(180, 5, "COMPROVANTE DE RECEBIMENTO", 0, 0, 'C'); $pdf->Cell(5, 5, "", 0, 1, 'L'); $pdf->ln(5); $pdf->SetFont("Arial", "", 7); $pdf->Cell(95, 20, "ASSINATURA: _____________________________________________________", 0, 0, 'C'); $pdf->Cell(95, 20, utf8_decode("DATA: ________/ _______/ ________ HORÁRIO: ____ : ____ "), 0, 1, 'C'); $pdf->Output("Guia de Recibo.pdf", "I");
$pdf->SetFont('Times', 'B', 11); $pdf->Image('../logo/malasngoding.png', 1, 1, 2, 2); $pdf->SetX(4); $pdf->MultiCell(19.5, 0.5, 'KIOS MALASNGODING', 0, 'L'); $pdf->SetX(4); $pdf->MultiCell(19.5, 0.5, 'Telpon : 0038XXXXXXX', 0, 'L'); $pdf->SetFont('Arial', 'B', 10); $pdf->SetX(4); $pdf->MultiCell(19.5, 0.5, 'JL. KIOS MALASNGODING', 0, 'L'); $pdf->SetX(4); $pdf->MultiCell(19.5, 0.5, 'website : www.malasngoding.com email : malasngoding@gmail.com', 0, 'L'); $pdf->Line(1, 3.1, 28.5, 3.1); $pdf->SetLineWidth(0.1); $pdf->Line(1, 3.2, 28.5, 3.2); $pdf->SetLineWidth(0); $pdf->ln(1); $pdf->SetFont('Arial', 'B', 14); $pdf->Cell(0, 0.7, 'Laporan Data Penjualan Barang', 0, 0, 'C'); $pdf->ln(1); $pdf->SetFont('Arial', 'B', 10); $pdf->Cell(5, 0.7, "Di cetak pada : " . date("D-d/m/Y"), 0, 0, 'C'); $pdf->ln(1); $pdf->Cell(6, 0.7, "Laporan Penjualan pada : " . $_GET['tanggal'], 0, 0, 'C'); $pdf->ln(1); $pdf->Cell(1, 0.8, 'NO', 1, 0, 'C'); $pdf->Cell(3, 0.8, 'Tanggal', 1, 0, 'C'); $pdf->Cell(6, 0.8, 'Nama Barang', 1, 0, 'C'); $pdf->Cell(3, 0.8, 'Jumlah', 1, 0, 'C'); $pdf->Cell(4, 0.8, 'harga', 1, 0, 'C'); $pdf->Cell(4.5, 0.8, 'Total harga', 1, 0, 'C'); $pdf->Cell(4, 0.8, 'laba', 1, 1, 'C');
$pdf->SetFont('', 'B', 12); $pdf->Cell('', 2, 'NÃO EMITIMOS E NEM VENDEMOS CERTIDÕES E SIM PRAZOS E SOLUÇÕES', '', 1, 'C'); $pdf->SetFont('', 'B', 14); $pdf->Cell('', 2, 'Declaração de Busca', '', 1, 'C'); $pdf->SetFont('', '', 12); $pdf->Write(1, $topo, ''); $pdf->SetFont('', '', 12); $pdf->Cell('', 1, '', '', 1, 'C'); $pdf->Cell('', 1, '', '', 1, 'C'); $pdf->Cell('', 1, '', '', 1, 'C'); $pdf->Cell('', 1, '', '', 1, 'C'); $pdf->Cell('', 1, '', '', 1, 'C'); $pdf->Cell('', 1, '', '', 1, 'C'); $pdf->Cell('', 1, $data_atual, '', 1, 'C'); $pdf->Cell('', 1, $impressao_ordem, '', 1, 'R'); $pdf->ln(); $pdf->ln(); $pdf->ln(); $pdf->ln(); $pdf->Cell('', 1, $responsavel_empresa, '', 1, 'C'); $pdf->ln(); $pdf->ln(); $pdf->Write(0.5, $sub, ''); $pdf->Line(1, 25, 20, 25); $pdf->Ln(); $pdf->Cell('', 0.5, $rodape, '', 1, 'C'); $rodape = $responsavel_endereco . ', ' . $responsavel_cidade . '-' . $responsavel_estado . ' CEP: ' . $responsavel_cep; $pdf->Cell('', 0.5, $rodape, '', 1, 'C'); $rodape = 'Tel/Fax: ' . $responsavel_tel . '/' . $responsavel_fax . ' E-mail:' . $responsavel_email; $pdf->Cell('', 0.5, $rodape, '', 1, 'C'); $rodape = 'www.cartoriopostal.com.br';
$pdf->Cell(5, 10, '', 0); $pdf->Cell(70, 10, 'Universidad Nacional Autonoma de Honduras', 0); $pdf->Ln(8); $pdf->Cell(18, 10, '', 0); $pdf->SetFont('Arial', '', 16); $pdf->Cell(35, 10, '', 0); $pdf->Cell(70, 10, 'Facultad de ciencias Juridicas', 0); $pdf->Ln(13); $pdf->SetFont('Arial', 'U', 14); $pdf->Cell(30, 8, ' ', 0, 0, "C"); $pdf->Cell(125, 8, 'Plan operativo Anual', 0, 0, "C"); //$pdf->Rect(6, 45, 200, 230 ,'D'); $pdf->SetFont('Arial', '', 12); $pdf->Ln(10); $pdf->cell(5, 8, ''); $pdf->ln(10); $pdf->SetFont('Arial', 'B', 12); $pdf->cell(5, 8, ''); $pdf->Cell(70, 10, 'Actividades Faltantes', 0); $pdf->SetFont('Arial', '', 12); $pdf->Ln(20); $pdf->cell(10, 8, ''); $pdf->cell(20, 8, 'Codigo', 1); $pdf->cell(30, 8, 'Correlativo', 1); $pdf->cell(30, 8, 'Fecha Inicio', 1); $pdf->cell(30, 8, 'Fecha Fin', 1); $pdf->cell(70, 8, 'Descripcion', 1); $pdf->ln(10); $contador = 0; while ($row = mysql_fetch_array($query)) { $pdf->cell(10, 8, '');
$pdf->SetFont('Arial', '', 10); $pdf->Cell(0, 0, utf8_decode("Teléfono: 2232-2290"), 0, 1, 'R'); $pdf->Ln(4.1); $pdf->Cell(0, 0, utf8_decode("Edificio A-2"), 0, 1, 'R'); $pdf->Ln(4.1); $pdf->Cell(0, 0, utf8_decode("Ciudad Universitaria"), 0, 1, 'R'); $pdf->Ln(4.1); $pdf->Cell(0, 0, utf8_decode("Tegucigalpa, Honduras"), 0, 1, 'R'); $pdf->SetRightMargin(10); $pdf->SetLeftMargin(10); $pdf->Cell(18, 10, '', 0); //$pdf->Ln(20); //$pdf->SetFont('Arial', 'U', 14); //$pdf->Cell(30, 8, ' ', 0,0,"C"); //$pdf->Cell(130, 8, ' Reporte de Estudiantes', 0,0,"C"); $pdf->ln(20); $pdf->SetFont('Cambria', 'BI', 16); $pdf->Cell(0, 0, utf8_decode("Reporte de Estudiantes"), 0, 1, 'C'); $pdf->Rect(5, 55, 206, 200, 'D'); $pdf->SetFont('Arial', '', 12); $pdf->Ln(15); $pdf->Cell(115, 15, 'Fecha: ' . date('Y-m-d'), 0); $pdf->Ln(7); $pdf->Ln(5); $pdf->SetFont('Arial', 'B', 8); $pdf->Cell(25, 8, 'Cuenta', 1, 0, "C"); $pdf->Cell(30, 8, 'Identidad', 1, 0, "C"); $pdf->Cell(45, 8, 'Estudiante', 1, 0, "C"); $pdf->Cell(40, 8, 'Correo', 1, 0, "C"); $pdf->Cell(10, 8, 'Indice', 1, 0, "C"); $pdf->Cell(33, 8, utf8_decode('Mención Horifica'), 1, 0, "C");
function boletinSantaTeresita($idSalon, $periodo) { $area = new Area(); $areas = $area->leerAreas(); $pensum = new Pensum(); $pens = $pensum->leerPensum($idSalon); $persona = new Persona(); $estudiantes = $persona->leerPorSalon($idSalon); $nots = new Nota(); if ($periodo == "PRIMERO") { $puestos = $nots->leerPromedios($idSalon, "primerP"); } elseif ($periodo == "SEGUNDO") { $puestos = $nots->leerPromedios($idSalon, "segundoP"); } elseif ($periodo == "TERCERO") { $puestos = $nots->leerPromedios($idSalon, "tercerP"); } elseif ($periodo == "CUARTO") { $puestos = $nots->leerPromedios($idSalon, "cuartoP"); } elseif ($periodo == "FINAL") { $puestos = $nots->leerPromediosFinal($idSalon); } $pdf = new FPDF('P', 'cm', 'Legal'); $pdf->SetMargins(0, 0, 0); $puest = 0; foreach ($puestos as $puesto) { foreach ($estudiantes as $estudiante) { if ($puesto["idPersona"] == $estudiante->getIdPersona()) { $matricula = new Matricula(); $matr = $matricula->leerMatriculaPorId($estudiante->getIdPersona()); $salon = new Salon(); $sal = $salon->leerSalonePorId($idSalon); $grado = new Grado(); $grad = $grado->leerGradoPorId($sal->getIdGrado()); $pdf->AddPage(); $pdf->SetFont("Arial", "B", 14); $pdf->SetXY(1, 0); $pdf->cell(18.5, 1, 'COLEGIO "SANTA TERESITA"', 0, 0, "C"); $pdf->ln(); $pdf->cell(4, 4, "", 0); $pdf->Image('utiles/imagenes/escudoSantaTeresita.jpg', 1, 0, 2.5); $pdf->SetFont("Arial", "", 10); //CAbecera $pdf->SetXY(1, 1); $pdf->Cell(18.5, 1, utf8_decode('"EDUCAMOS PARA HACER POSIBLE LA VIDA Y LA FELICIDAD"'), 0, 1, "C"); $pdf->SetXY(1, 1.5); $pdf->Cell(18.5, 1, "INFORME EVALUATIVO", 0, 1, "C"); $pdf->SetXY(16, 0); $pdf->SetFont("Arial", "", 10); $pdf->Cell(4, 1, "Bajo(Db): 10 - 69 ", 0, 0, "C"); $pdf->SetXY(16, 0.5); $pdf->Cell(4, 1, "Basico(DB): 70 - 79 ", 0, 0, "C"); $pdf->SetXY(16, 1); $pdf->Cell(4, 1, "Alto(DA): 80 - 94 ", 0, 0, "C"); $pdf->SetXY(16, 1.5); $pdf->Cell(4, 1, "Superior(DS): 95 - 100", 0, 0, "C"); $pdf->SetXY(16, 0); $pdf->Cell(4, 2.5, "", 1, 0, "C"); if ($periodo == "PRIMERO") { $periodo3 = "1"; } if ($periodo == "SEGUNDO") { $periodo3 = "2"; } if ($periodo == "TERCERO") { $periodo3 = "3"; } if ($periodo == "CUARTO") { $periodo3 = "4"; } if ($periodo == "FINAL") { $periodo3 = "F"; } $x = 1; $y = 2.75; $pdf->SetXY($x, $y); $pdf->SetFont("Arial", "", 10); $pdf->Cell(3.3, 0.5, "Apellidos y Nombre:", 0, 0, "L"); $pdf->SetFont("Arial", "B", 10); $pdf->Cell(8, 0.5, utf8_decode(strtoupper($estudiante->getPApellido() . " " . $estudiante->getSApellido() . " " . $estudiante->getNombres())), 0, 0, "L"); $pdf->SetXY($x, $y); $pdf->Cell(12.8, 0.5, "", 1, 0, "L"); $pdf->SetFont("Arial", "", 10); $pdf->Cell(1.2, 0.5, "Grado:", 0, 0, "L"); $pdf->SetFont("Arial", "B", 10); $pdf->Cell(0.8, 0.5, $idSalon, 0, 0, "L"); $pdf->SetXY($x + 12.8, $y); $pdf->Cell(2.2, 0.5, "", 1, 0, "L"); $pdf->SetFont("Arial", "", 10); $pdf->Cell(1.5, 0.5, "Periodo:", 0, 0, "L"); $pdf->SetFont("Arial", "B", 10); $pdf->Cell(0.5, 0.5, $periodo3, 0, 0, "L"); $pdf->SetXY($x + 15, $y); $pdf->Cell(2, 0.5, "", 1, 0, "L"); $pdf->SetFont("Arial", "", 10); $pdf->Cell(1, 0.5, utf8_decode("Año:"), 0, 0, "L"); $pdf->SetFont("Arial", "B", 10); $pdf->Cell(1, 0.5, $matr->getAnoLectivo(), 0, 0, "L"); $pdf->SetXY($x + 17, $y); $pdf->Cell(2, 0.5, "", 1, 0, "L"); $pdf->SetFont("Arial", "B", 9); $y += 0.5; $pdf->SetXY($x, $y); $pdf->SetFont("Arial", "B", 9); $pdf->Cell(5.5, 0.5, "AREAS Y ASIGNATURAS", 1, 0, "L"); $pdf->SetFont("Arial", "B", 8); $pdf->Cell(0.5, 0.5, "I.H", 1, 0, "L"); $pdf->SetFont("Arial", "B", 9); $pdf->Cell(12, 0.5, "FORTALEZAS Y/O DIFICULTADES", 1, 0, "C"); $pdf->Cell(1, 0.5, "NOTA", 1, 0, "C"); $y += 0.5; $c = 0; $suma = 0; $cont = 0; for ($i = 0; $i < count($areas); $i++) { $c++; foreach ($areas as $a) { $g = intval($grad->getIdGrado()); if ($a->getIdArea() == "FIL") { if ($g > 5) { if ($a->getOrden() == $c) { $pdf->SetXY($x, $y); $pdf->SetFont("Arial", "BU", 9); if ($a->getIdArea() == "EF" || $a->getIdArea() == "EA" || $a->getIdArea() == "ER" || $a->getIdArea() == "EVD" || $a->getIdArea() == "FIL") { $pdf->Cell(5.5, 1.25, utf8_decode($a->getNombreArea()), 1, 0, "L"); } else { $pdf->Cell(5.5, 0.5, utf8_decode($a->getNombreArea()), 1, 0, "L"); $pdf->Cell(0.5, 0.5, utf8_decode(""), 1, 0, "L"); $pdf->Cell(12, 0.5, utf8_decode(""), 1, 0, "L"); $pdf->Cell(1, 0.5, utf8_decode(""), 1, 0, "L"); } $mate = new Materia(); $band = 0; foreach ($pens as $p) { $materias = $mate->leerMateriaPorId($p->getIdMateria()); foreach ($materias as $materia) { $idMateria = $materia->getIdMateria(); $nombreMateria = $materia->getNombreMateria(); $horas = $materia->getHoras(); $idArea = $materia->getIdArea(); if ($idArea == $a->getIdArea()) { $nota = new Nota(); $not = $nota->leerNotaEstudiante($estudiante->getIdPersona(), $idMateria); $falla = new Falla(); $fal = $falla->leerFallaEstudiante($estudiante->getIdPersona(), $idMateria); $logro = new Logro(); if ($periodo == "FINAL") { $log = $logro->leerLogro("CUARTO", $grad->getIdGrado(), $idMateria); } else { $log = $logro->leerLogro($periodo, $grad->getIdGrado(), $idMateria); } $desempeño = ""; $cadena = ""; $band = 0; $y += 0.5; $pdf->SetXY($x, $y); $pdf->SetFont("Arial", "B", 9); if ($nombreMateria == "ARTISTICA" || $nombreMateria == "ETICA" || $nombreMateria == "RELIGION" || $nombreMateria == "EDUCACION FISICA" || $nombreMateria == "FILOSOFIA") { //$pdf->MultiCell(5.5,1.25, utf8_decode($a->getNombreArea()),1,"L"); $band = 1; } else { $pdf->MultiCell(5.5, 1.25, utf8_decode($nombreMateria), 1, "L"); } if ($band == 1) { $pdf->SetXY($x + 5.5, $y - 0.5); } else { $pdf->SetXY($x + 5.5, $y); } $pdf->MultiCell(0.5, 1.25, $horas, 1, "L"); if ($log != NULL) { if ($periodo == "PRIMERO") { // $pdf->Cell(1, 1.5, $not->getPrimerP(), 1, 0, "C"); $suma = $suma + $not->getPrimerP(); $n = $not->getPrimerP(); if ($not->getPrimerP() <= 69) { $cadena = $log->getBajo(); $desempeño = "Db"; } if ($not->getPrimerP() <= 79 && $not->getPrimerP() > 69) { $cadena = $log->getBasico(); $desempeño = "DB"; } if ($not->getPrimerP() <= 94 && $not->getPrimerP() > 79) { $cadena = $log->getAlto(); $desempeño = "DA"; } if ($not->getPrimerP() > 94) { $cadena = $log->getSuperior(); $desempeño = "DS"; } } elseif ($periodo == "SEGUNDO") { //$pdf->Cell(1, 1.5, $not->getSegundoP(), 1, 0, "C"); $suma = $suma + $not->getSegundoP(); $n = $not->getSegundoP(); if ($not->getSegundoP() <= 69) { $cadena = $log->getBajo(); $desempeño = "Db"; } if ($not->getSegundoP() <= 79 && $not->getSegundoP() > 69) { $cadena = $log->getBasico(); $desempeño = "DB"; } if ($not->getSegundoP() <= 94 && $not->getSegundoP() > 79) { $cadena = $log->getAlto(); $desempeño = "DA"; } if ($not->getSegundoP() > 94) { $cadena = $log->getSuperior(); $desempeño = "DS"; } } elseif ($periodo == "TERCERO") { //$pdf->Cell(1, 1.5, $not->getTercerP(), 1, 0, "C"); $suma = $suma + $not->getTercerP(); $n = $not->getTercerP(); if ($not->getTercerP() <= 69) { $cadena = $log->getBajo(); $desempeño = "Db"; } if ($not->getTercerP() <= 79 && $not->getTercerP() > 69) { $cadena = $log->getBasico(); $desempeño = "DB"; } if ($not->getTercerP() <= 94 && $not->getTercerP() > 79) { $cadena = $log->getAlto(); $desempeño = "DA"; } if ($not->getTercerP() > 94) { $cadena = $log->getSuperior(); $desempeño = "DS"; } } elseif ($periodo == "CUARTO") { //$pdf->Cell(1, 1.5, $not->getCuartoP();, 1, 0, "C"); $suma = $suma + $not->getCuartoP(); $n = $not->getCuartoP(); if ($not->getCuartoP() <= 69) { $cadena = $log->getBajo(); $desempeño = "Db"; } if ($not->getCuartoP() <= 79 && $not->getCuartoP() > 69) { $cadena = $log->getBasico(); $desempeño = "DB"; } if ($not->getCuartoP() <= 94 && $not->getCuartoP() > 79) { $cadena = $log->getAlto(); $desempeño = "DA"; } if ($not->getCuartoP() > 94) { $cadena = $log->getSuperior(); $desempeño = "DS"; } } elseif ($periodo == "FINAL") { $def = $nota->calcularDef2($not->getPrimerP(), $not->getSegundoP(), $not->getTercerP(), $not->getCuartoP()); //$pdf->Cell(1, 1.5, $def, 1, 0, "C"); $n = $def; $suma = $suma + $def; if ($def < 69) { $cadena = $log->getBajo(); $desempeño = "Db"; } if ($def <= 79 && $def > 69) { $cadena = $log->getBasico(); $desempeño = "DB"; } if ($def <= 94 && $def > 79) { $cadena = $log->getAlto(); $desempeño = "DA"; } if ($def > 94) { $cadena = $log->getSuperior(); $desempeño = "DS"; } } $cont++; $pdf->SetFont("Arial", "", 7); if ($band == 1) { $pdf->SetXY($x + 6, $y - 0.5); } else { $pdf->SetXY($x + 6, $y); } $pdf->MultiCell(12, 0.417, strtoupper(utf8_decode($desempeño . ": " . $cadena)), 0, "L"); if ($band == 1) { $pdf->SetXY($x + 6, $y - 0.5); } else { $pdf->SetXY($x + 6, $y); } $pdf->MultiCell(12, 1.25, "", 1, "L"); if ($band == 1) { $pdf->SetXY($x + 18, $y - 0.5); } else { $pdf->SetXY($x + 18, $y); } $pdf->SetFont("Arial", "B", 7); //MODIFICAR ESTA LINEA DE ACUERDO AL PERIODO $pdf->MultiCell(12, 1.25, utf8_decode($n), 0, "L"); if ($band == 1) { $pdf->SetXY($x + 18, $y - 0.5); } else { $pdf->SetXY($x + 18, $y); } $pdf->MultiCell(1, 1.25, "", 1, "L"); } if ($band == 1) { $y += 0.25; } else { $y += 0.75; } } } } $y += 0.5; } } } elseif ($a->getIdArea() == "ET") { if ($grad->getIdGrado() != "P" && $grad->getIdGrado() != "J") { if ($a->getOrden() == $c) { $pdf->SetXY($x, $y); $pdf->SetFont("Arial", "BU", 9); if ($a->getIdArea() == "EF" || $a->getIdArea() == "EA" || $a->getIdArea() == "ER" || $a->getIdArea() == "EVD" || $a->getIdArea() == "FIL") { $pdf->Cell(5.5, 1.25, utf8_decode($a->getNombreArea()), 1, 0, "L"); } else { $pdf->Cell(5.5, 0.5, utf8_decode($a->getNombreArea()), 1, 0, "L"); $pdf->Cell(0.5, 0.5, utf8_decode(""), 1, 0, "L"); $pdf->Cell(12, 0.5, utf8_decode(""), 1, 0, "L"); $pdf->Cell(1, 0.5, utf8_decode(""), 1, 0, "L"); } $mate = new Materia(); $band = 0; foreach ($pens as $p) { $materias = $mate->leerMateriaPorId($p->getIdMateria()); foreach ($materias as $materia) { $idMateria = $materia->getIdMateria(); $nombreMateria = $materia->getNombreMateria(); $horas = $materia->getHoras(); $idArea = $materia->getIdArea(); if ($idArea == $a->getIdArea()) { $nota = new Nota(); $not = $nota->leerNotaEstudiante($estudiante->getIdPersona(), $idMateria); $falla = new Falla(); $fal = $falla->leerFallaEstudiante($estudiante->getIdPersona(), $idMateria); $logro = new Logro(); if ($periodo == "FINAL") { $log = $logro->leerLogro("CUARTO", $grad->getIdGrado(), $idMateria); } else { $log = $logro->leerLogro($periodo, $grad->getIdGrado(), $idMateria); } $desempeño = ""; $cadena = ""; $band = 0; $y += 0.5; $pdf->SetXY($x, $y); $pdf->SetFont("Arial", "B", 9); if ($nombreMateria == "ARTISTICA" || $nombreMateria == "ETICA" || $nombreMateria == "RELIGION" || $nombreMateria == "EDUCACION FISICA" || $nombreMateria == "FILOSOFIA") { //$pdf->MultiCell(5.5,1.25, utf8_decode($a->getNombreArea()),1,"L"); $band = 1; } else { $pdf->MultiCell(5.5, 1.25, utf8_decode($nombreMateria), 1, "L"); } if ($band == 1) { $pdf->SetXY($x + 5.5, $y - 0.5); } else { $pdf->SetXY($x + 5.5, $y); } $pdf->MultiCell(0.5, 1.25, $horas, 1, "L"); if ($log != NULL) { if ($periodo == "PRIMERO") { // $pdf->Cell(1, 1.5, $not->getPrimerP(), 1, 0, "C"); $suma = $suma + $not->getPrimerP(); $n = $not->getPrimerP(); if ($not->getPrimerP() <= 69) { $cadena = $log->getBajo(); $desempeño = "Db"; } if ($not->getPrimerP() <= 79 && $not->getPrimerP() > 69) { $cadena = $log->getBasico(); $desempeño = "DB"; } if ($not->getPrimerP() <= 94 && $not->getPrimerP() > 79) { $cadena = $log->getAlto(); $desempeño = "DA"; } if ($not->getPrimerP() > 94) { $cadena = $log->getSuperior(); $desempeño = "DS"; } } elseif ($periodo == "SEGUNDO") { //$pdf->Cell(1, 1.5, $not->getSegundoP(), 1, 0, "C"); $suma = $suma + $not->getSegundoP(); $n = $not->getSegundoP(); if ($not->getSegundoP() <= 69) { $cadena = $log->getBajo(); $desempeño = "Db"; } if ($not->getSegundoP() <= 79 && $not->getSegundoP() > 69) { $cadena = $log->getBasico(); $desempeño = "DB"; } if ($not->getSegundoP() <= 94 && $not->getSegundoP() > 79) { $cadena = $log->getAlto(); $desempeño = "DA"; } if ($not->getSegundoP() > 94) { $cadena = $log->getSuperior(); $desempeño = "DS"; } } elseif ($periodo == "TERCERO") { //$pdf->Cell(1, 1.5, $not->getTercerP(), 1, 0, "C"); $suma = $suma + $not->getTercerP(); $n = $not->getTercerP(); if ($not->getTercerP() <= 69) { $cadena = $log->getBajo(); $desempeño = "Db"; } if ($not->getTercerP() <= 79 && $not->getTercerP() > 69) { $cadena = $log->getBasico(); $desempeño = "DB"; } if ($not->getTercerP() <= 94 && $not->getTercerP() > 79) { $cadena = $log->getAlto(); $desempeño = "DA"; } if ($not->getTercerP() > 94) { $cadena = $log->getSuperior(); $desempeño = "DS"; } } elseif ($periodo == "CUARTO") { //$pdf->Cell(1, 1.5, $not->getCuartoP();, 1, 0, "C"); $suma = $suma + $not->getCuartoP(); $n = $not->getCuartoP(); if ($not->getCuartoP() <= 69) { $cadena = $log->getBajo(); $desempeño = "Db"; } if ($not->getCuartoP() <= 79 && $not->getCuartoP() > 69) { $cadena = $log->getBasico(); $desempeño = "DB"; } if ($not->getCuartoP() <= 94 && $not->getCuartoP() > 79) { $cadena = $log->getAlto(); $desempeño = "DA"; } if ($not->getCuartoP() > 94) { $cadena = $log->getSuperior(); $desempeño = "DS"; } } elseif ($periodo == "FINAL") { $def = $nota->calcularDef2($not->getPrimerP(), $not->getSegundoP(), $not->getTercerP(), $not->getCuartoP()); //$pdf->Cell(1, 1.5, $def, 1, 0, "C"); $suma = $suma + $def; $n = $def; if ($def < 69) { $cadena = $log->getBajo(); $desempeño = "Db"; } if ($def <= 79 && $def > 69) { $cadena = $log->getBasico(); $desempeño = "DB"; } if ($def <= 94 && $def > 79) { $cadena = $log->getAlto(); $desempeño = "DA"; } if ($def > 94) { $cadena = $log->getSuperior(); $desempeño = "DS"; } } $cont++; $pdf->SetFont("Arial", "", 7); if ($band == 1) { $pdf->SetXY($x + 6, $y - 0.5); } else { $pdf->SetXY($x + 6, $y); } $pdf->MultiCell(12, 0.417, strtoupper(utf8_decode($desempeño . ": " . $cadena)), 0, "L"); if ($band == 1) { $pdf->SetXY($x + 6, $y - 0.5); } else { $pdf->SetXY($x + 6, $y); } $pdf->MultiCell(12, 1.25, "", 1, "L"); if ($band == 1) { $pdf->SetXY($x + 18, $y - 0.5); } else { $pdf->SetXY($x + 18, $y); } $pdf->SetFont("Arial", "B", 7); //MODIFICAR ESTA LINEA DE ACUERDO AL PERIODO $pdf->MultiCell(12, 1.25, utf8_decode($n), 0, "L"); if ($band == 1) { $pdf->SetXY($x + 18, $y - 0.5); } else { $pdf->SetXY($x + 18, $y); } $pdf->MultiCell(1, 1.25, "", 1, "L"); } if ($band == 1) { $y += 0.25; } else { $y += 0.75; } } } } $y += 0.5; } } } else { if ($a->getOrden() == $c) { $pdf->SetXY($x, $y); $pdf->SetFont("Arial", "BU", 9); if ($a->getIdArea() == "EF" || $a->getIdArea() == "EA" || $a->getIdArea() == "ER" || $a->getIdArea() == "EVD" || $a->getIdArea() == "FIL") { $pdf->Cell(5.5, 1.25, utf8_decode($a->getNombreArea()), 1, 0, "L"); } else { $pdf->Cell(5.5, 0.5, utf8_decode($a->getNombreArea()), 1, 0, "L"); $pdf->Cell(0.5, 0.5, utf8_decode(""), 1, 0, "L"); $pdf->Cell(12, 0.5, utf8_decode(""), 1, 0, "L"); $pdf->Cell(1, 0.5, utf8_decode(""), 1, 0, "L"); } $mate = new Materia(); $band = 0; foreach ($pens as $p) { $materias = $mate->leerMateriaPorId($p->getIdMateria()); foreach ($materias as $materia) { $idMateria = $materia->getIdMateria(); $nombreMateria = $materia->getNombreMateria(); $horas = $materia->getHoras(); $idArea = $materia->getIdArea(); if ($idArea == $a->getIdArea()) { $nota = new Nota(); $not = $nota->leerNotaEstudiante($estudiante->getIdPersona(), $idMateria); $falla = new Falla(); $fal = $falla->leerFallaEstudiante($estudiante->getIdPersona(), $idMateria); $logro = new Logro(); if ($periodo == "FINAL") { $log = $logro->leerLogro("CUARTO", $grad->getIdGrado(), $idMateria); } else { $log = $logro->leerLogro($periodo, $grad->getIdGrado(), $idMateria); } $desempeño = ""; $cadena = ""; $band = 0; $y += 0.5; $pdf->SetXY($x, $y); $pdf->SetFont("Arial", "B", 9); if ($nombreMateria == "ARTISTICA" || $nombreMateria == "ETICA" || $nombreMateria == "RELIGION" || $nombreMateria == "EDUCACION FISICA" || $nombreMateria == "FILOSOFIA") { //$pdf->MultiCell(5.5,1.25, utf8_decode($a->getNombreArea()),1,"L"); $band = 1; } else { $pdf->MultiCell(5.5, 1.25, utf8_decode($nombreMateria), 1, "L"); } if ($band == 1) { $pdf->SetXY($x + 5.5, $y - 0.5); } else { $pdf->SetXY($x + 5.5, $y); } $pdf->MultiCell(0.5, 1.25, $horas, 1, "L"); if ($log != NULL) { if ($periodo == "PRIMERO") { // $pdf->Cell(1, 1.5, $not->getPrimerP(), 1, 0, "C"); $suma = $suma + $not->getPrimerP(); $n = $not->getPrimerP(); if ($not->getPrimerP() <= 69) { $cadena = $log->getBajo(); $desempeño = "Db"; } if ($not->getPrimerP() <= 79 && $not->getPrimerP() > 69) { $cadena = $log->getBasico(); $desempeño = "DB"; } if ($not->getPrimerP() <= 94 && $not->getPrimerP() > 79) { $cadena = $log->getAlto(); $desempeño = "DA"; } if ($not->getPrimerP() > 94) { $cadena = $log->getSuperior(); $desempeño = "DS"; } } elseif ($periodo == "SEGUNDO") { //$pdf->Cell(1, 1.5, $not->getSegundoP(), 1, 0, "C"); $suma = $suma + $not->getSegundoP(); $n = $not->getSegundoP(); if ($not->getSegundoP() <= 69) { $cadena = $log->getBajo(); $desempeño = "Db"; } if ($not->getSegundoP() <= 79 && $not->getSegundoP() > 69) { $cadena = $log->getBasico(); $desempeño = "DB"; } if ($not->getSegundoP() <= 94 && $not->getSegundoP() > 79) { $cadena = $log->getAlto(); $desempeño = "DA"; } if ($not->getSegundoP() > 94) { $cadena = $log->getSuperior(); $desempeño = "DS"; } } elseif ($periodo == "TERCERO") { //$pdf->Cell(1, 1.5, $not->getTercerP(), 1, 0, "C"); $suma = $suma + $not->getTercerP(); $n = $not->getTercerP(); if ($not->getTercerP() <= 69) { $cadena = $log->getBajo(); $desempeño = "Db"; } if ($not->getTercerP() <= 79 && $not->getTercerP() > 69) { $cadena = $log->getBasico(); $desempeño = "DB"; } if ($not->getTercerP() <= 94 && $not->getTercerP() > 79) { $cadena = $log->getAlto(); $desempeño = "DA"; } if ($not->getTercerP() > 94) { $cadena = $log->getSuperior(); $desempeño = "DS"; } } elseif ($periodo == "CUARTO") { //$pdf->Cell(1, 1.5, $not->getCuartoP();, 1, 0, "C"); $suma = $suma + $not->getCuartoP(); $n = $not->getCuartoP(); if ($not->getCuartoP() <= 69) { $cadena = $log->getBajo(); $desempeño = "Db"; } if ($not->getCuartoP() <= 79 && $not->getCuartoP() > 69) { $cadena = $log->getBasico(); $desempeño = "DB"; } if ($not->getCuartoP() <= 94 && $not->getCuartoP() > 79) { $cadena = $log->getAlto(); $desempeño = "DA"; } if ($not->getCuartoP() > 94) { $cadena = $log->getSuperior(); $desempeño = "DS"; } } elseif ($periodo == "FINAL") { $def = $nota->calcularDef2($not->getPrimerP(), $not->getSegundoP(), $not->getTercerP(), $not->getCuartoP()); //$pdf->Cell(1, 1.5, $def, 1, 0, "C"); $n = $def; $suma = $suma + $def; if ($def < 69) { $cadena = $log->getBajo(); $desempeño = "Db"; } if ($def <= 79 && $def > 69) { $cadena = $log->getBasico(); $desempeño = "DB"; } if ($def <= 94 && $def > 79) { $cadena = $log->getAlto(); $desempeño = "DA"; } if ($def > 94) { $cadena = $log->getSuperior(); $desempeño = "DS"; } } $cont++; $pdf->SetFont("Arial", "", 7); if ($band == 1) { $pdf->SetXY($x + 6, $y - 0.5); } else { $pdf->SetXY($x + 6, $y); } $pdf->MultiCell(12, 0.417, strtoupper(utf8_decode($desempeño . ": " . $cadena)), 0, "L"); if ($band == 1) { $pdf->SetXY($x + 6, $y - 0.5); } else { $pdf->SetXY($x + 6, $y); } $pdf->MultiCell(12, 1.25, "", 1, "L"); if ($band == 1) { $pdf->SetXY($x + 18, $y - 0.5); } else { $pdf->SetXY($x + 18, $y); } $pdf->SetFont("Arial", "B", 7); //MODIFICAR ESTA LINEA DE ACUERDO AL PERIODO $pdf->MultiCell(12, 0.417, utf8_decode($n), 0, "L"); if ($band == 1) { $pdf->SetXY($x + 18, $y - 0.5); } else { $pdf->SetXY($x + 18, $y); } $pdf->MultiCell(1, 1.25, "", 1, "L"); } if ($band == 1) { $y += 0.25; } else { $y += 0.75; } } } } $y += 0.5; } //FIN IF } } //FOREACH AREAS } $prom = round($suma / $cont, 1); $pdf->SetXY($x + 17.5, $y); $pdf->Cell(1.5, 0.5, utf8_decode("PROM: " . $prom), 1, 0, "L"); $pdf->SetXY($x + 17.5, $y + 0.5); $puest++; $pdf->Cell(1.5, 0.5, utf8_decode("POS: " . $puest), 1, 0, "L"); $pdf->SetXY($x, $y); $pdf->Cell(17.5, 1, "", 1, 0, "L"); $pdf->SetXY($x, $y); $pdf->Cell(17.5, 0.5, "Observaciones:", 0, 0, "L"); $y += 1.5; $pdf->SetXY($x, $y); $pdf->SetFont("Arial", "B", 9); $pdf->Cell(10, 0.5, "DIRECTOR DE GRUPO______________________", 0, 0, "C"); $pdf->Cell(10, 0.5, "RECTOR______________________", 0, 0, "C"); break; } } //FIn Estudiantes } $pdf->Output("Boletin " . $grad->getIdGrado(), "I"); }
$pdf=new FPDF(); $pdf->AddFont('ArialMT','','arial.php'); $pdf->AddFont('Arial-BoldMT','','arialbd.php'); $pdf->AddFont('Arial-BoldItalicMT','','arialbi.php'); $pdf->AddPage(); $pdf->SetFont('Arial-BoldMT','',14); // задаем шрифт и его размер $reportName="НАКЛАДНАЯ /ОБРАЗЦЫ /"; $pdf->Cell( 0, 15, $reportName, 0, 0, 'C' ); $pdf->SetFont('Arial-BoldMT','',8); // задаем шрифт и его размер $pdf->Cell(10,20,'',0,1,'l'); $pdf->ln(0); $pdf->Cell(10,5,'',0,0,'l'); $pdf->SetTextColor(214,3,0); // красный $pdf->Cell(50,5,'Дата составления заявки',1,0,'l'); $pdf->SetTextColor(22,50,255); // синий $pdf->Cell(90,5,date("d-m-Y",time()),1,0,'l'); $pdf->ln(5); $pdf->Cell(10,30,'',0,0,'l'); $pdf->SetTextColor(214,3,0); // красный $pdf->Cell(50,25,'Название фирмы',1,0,'l'); $pdf->Image('logo.jpg',80,37,'70',''); $pdf->Cell(90,25,'',1,0,'l'); $pdf->ln(20);
/** * @param mixed $id The entity id * @Template() * * @Route("/etatfinancier", name="etatfinancier") */ public function etatFinancierAction() { $date = new \DateTime(); $etatfinancier = $this->get("alb_inscriptions.alb_manager")->getEtatFinancierApplication(); $nomfichier = 'tresorerie/EF_' . $date->format('YmdHis') . '.pdf'; $pdf = new \FPDF(); $pdf->Open(); $pdf->AddPage(); $pdf->SetFont('Arial', 'B', 20); $pdf->Cell(0, 8, utf8_decode('Amicale Laïque de Billère'), 0, 1, 'C'); $pdf->ln(4); $pdf->SetFont('Arial', '', 16); $pdf->Cell(0, 8, utf8_decode('Etat financier au ' . $date->format('d/m/Y')), 0, 1); $pdf->ln(4); $pdf->SetFont('Arial', '', 8); $pdf->Cell(5, 4, '', 1, 0, 'C'); $pdf->Cell(45, 4, utf8_decode('Nom'), 1, 0, 'C'); $pdf->Cell(31, 4, utf8_decode('Prénom'), 1, 0, 'C'); $pdf->Cell(15, 4, utf8_decode('Montant'), 1, 1, 'C'); $i = 0; $total = 0; foreach ($etatfinancier as $etatfinancier0) { foreach ($etatfinancier0 as $etat) { if ($etat['montant'] != 0) { $i++; $total = $total + $etat['montant']; $pdf->Cell(5, 4, $i, 1, 0, 'C'); $pdf->Cell(45, 4, utf8_decode($etat['nom']), 1, 0, ''); $pdf->Cell(31, 4, utf8_decode($etat['prenom']), 1, 0, ''); $pdf->Cell(15, 4, number_format($etat['montant'], 2, ',', ' '), 1, 1, 'R'); } } } $pdf->ln(4); $pdf->SetFont('Arial', '', 9); $pdf->Cell(45, 6, utf8_decode('Total : '), 0, 0, 'R'); $pdf->Cell(20, 6, number_format($total, 2, ',', ' '), 0, 1, 'R'); $pdf->Output($nomfichier, 'F'); $response = new Response(); $response->setContent(file_get_contents($nomfichier)); $response->headers->set('Content-Type', 'application/force-download'); $response->headers->set('Content-disposition', 'filename=' . $nomfichier); return $response; }
$pdf->Cell(25, 5, trim(db_formatar($vd1, 'f')), 1, 0, "R", 0); $pdf->Cell(25, 5, trim(db_formatar($vb1, 'f')), 1, 0, "R", 0); $pdf->Cell(10, 5, "", 1, 0, "C", 0); $pdf->Cell(25, 5, db_formatar($vi1, 'f'), 1, 0, "R", 0); $pdf->Cell(10, 5, "", 1, 0, "C", 0); $pdf->Cell(25, 5, db_formatar($vt1, 'f'), 1, 1, "R", 0); } //###################################################################### //total $qtotal = @$qT + @$qP; $vb2 = @$vb + $vb1; $vd2 = @$vd + $vd1; $vs2 = @$vs + $vs1; $vt2 = @$vt + $vt1; $vi2 = @$vi + $vi1; $pdf->ln(10); $pdf->Setx(5); $pdf->Cell(137, 5, "QUANTIDADE DE ITENS: " . $qtotal, 1, 0, "L", 0); $pdf->Cell(29, 5, trim(db_formatar($vs2, 'f')), 1, 0, "R", 0); $pdf->Cell(25, 5, trim(db_formatar($vd2, 'f')), 1, 0, "R", 0); $pdf->Cell(25, 5, trim(db_formatar($vb2, 'f')), 1, 0, "R", 0); $pdf->Cell(10, 5, "", 1, 0, "C", 0); $pdf->Cell(25, 5, db_formatar($vi2, 'f'), 1, 0, "R", 0); $pdf->Cell(10, 5, "", 1, 0, "C", 0); $pdf->Cell(25, 5, db_formatar($vt2, 'f'), 1, 1, "R", 0); $y = $pdf->GetY(); $pdf->SetY($y + 3); $pdf->Setx(5); // if(!isset($DB_mens1)){ // $DB_mens1 = ""; // }
function ybuy_do_pdf($id) { global $wpdb, $ybuy_country_list; $query = 'SELECT * FROM ' . $wpdb->prefix . 'ybuy_purchase yp LEFT JOIN ' . $wpdb->prefix . 'ybuy_purchase_download_assoc pda ON yp.id = pda.purchase_id LEFT JOIN ' . $wpdb->prefix . 'ybuy_purchase_product_assoc ppa ON ppa.purchase_id = yp.id LEFT JOIN ' . $wpdb->prefix . 'ybuy_product prod ON prod.id = ppa.product_id LEFT JOIN ' . $wpdb->prefix . 'ybuy_purchase_attribute attr ON attr.purchase_id = yp.id WHERE yp.id = ' . $id . ' AND attr.attribute_id = 2'; $rows = $wpdb->get_results($query); $row = $rows[0]; if ($row->current_status_id != 2) { // payment not complete return FALSE; } $user_data = get_userdata($row->user_id); include YBUY_INCLUDES_DIR . 'fpdf/fpdf.php'; $pdf = new FPDF(); $pdf->AddPage(); $font = 10; $pdf->SetFont('Arial', '', $font); $pdf->SetFont('Arial', 'B', $font); $cell = 45; $cell_1 = 10; $cell_2 = 50; $cell_3 = 150; $line_h = $font / 3 + 1; $pdf->Image('http://www.codingfutures.co.uk/wp-content/themes/codingfutures/images/logo-small.jpg', 10, 10, 60, 40); $pdf->Cell($cell, $line_h); $pdf->ln(); $pdf->Cell($cell); $pdf->Cell($cell); $pdf->Cell($cell); $pdf->Cell(1, $line_h, 'Coding Futures'); $pdf->SetFont('Arial', '', $font); $pdf->ln(); $pdf->Cell($cell); $pdf->Cell($cell); $pdf->Cell($cell); $pdf->Cell(1, $line_h, '91 Kirkstall Road'); $pdf->ln(); $pdf->Cell($cell); $pdf->Cell($cell); $pdf->Cell($cell); $pdf->Cell(1, $line_h, 'The Tannery'); $pdf->ln(); $pdf->Cell($cell); $pdf->Cell($cell); $pdf->Cell($cell); $pdf->Cell(1, $line_h, 'Leeds'); $pdf->ln(); $pdf->Cell($cell); $pdf->Cell($cell); $pdf->Cell($cell); $pdf->Cell(1, $line_h, 'LS3 1HS'); $pdf->ln(); $pdf->ln(); $pdf->ln(); $pdf->ln(); $pdf->ln(); $pdf->ln(); $pdf->SetFont('Arial', 'b', $font); $pdf->Cell(1, $line_h, $user_data->ybuy_company); $pdf->Cell($cell); $pdf->Cell($cell); $pdf->Cell($cell); $pdf->Cell(1, $line_h, 'Invoice: ybuy_' . $id); $pdf->SetFont('Arial', '', $font); $pdf->ln(); $pdf->Cell(1, $line_h, $user_data->ybuy_address_1); $pdf->ln(); $pdf->Cell(1, $line_h, $user_data->ybuy_address_2); $pdf->Cell($cell); $pdf->Cell($cell); $pdf->Cell($cell); $pdf->Cell(1, $line_h, date('d/m/Y', time())); $pdf->ln(); $pdf->Cell(1, $line_h, $user_data->ybuy_city); $pdf->ln(); $pdf->Cell(1, $line_h, $user_data->ybuy_region); $pdf->Cell($cell); $pdf->Cell($cell); $pdf->Cell($cell); $pdf->Cell(1, $line_h, 'Payment Made On: ' . date('d/m/Y', time())); $pdf->ln(); $pdf->Cell(1, $line_h, $ybuy_country_list[$user_data->ybuy_country]); $pdf->ln(); $pdf->Cell(1, $line_h, $user_data->ybuy_post_code); $pdf->ln(); $pdf->ln(); $pdf->ln(); $pdf->ln(); $pdf->ln(); $pdf->ln(); $pdf->ln(); $pdf->ln(); $char = 163; $cur = 'GBP'; $vat = 20; if ($row->currency_id == 2) { $char = 36; $cur = 'USD'; $vat = 0; } $pdf->SetFont('Arial', 'b', $font); $pdf->SetTextColor(255); $pdf->Cell(20, $line_h, 'Quantity', 0, 0, 'C', true); $pdf->Cell(80, $line_h, 'Details', 0, 0, 'C', true); $pdf->Cell(40, $line_h, 'Unit Price ' . chr($char), 0, 0, 'C', true); $pdf->Cell(20, $line_h, 'VAT', 0, 0, 'C', true); $pdf->Cell(30, $line_h, 'Net Subtotal ' . chr($char), 0, 0, 'C', true); $pdf->ln(); $pdf->SetFont('Arial', '', $font); $pdf->SetTextColor(0); $row->price = $row->price / 100; $pdf->Cell(20, $line_h, '1', 0, 0, 'C'); $pdf->Cell(80, $line_h, $row->name, 0, 0, 'C'); $pdf->Cell(40, $line_h, number_format($row->price, 2), 0, 0, 'C'); if ($vat) { $pdf->Cell(20, $line_h, $vat . '%', 0, 0, 'C'); } else { $pdf->Cell(20, $line_h, 'N/A', 0, 0, 'C'); } $pdf->Cell(30, $line_h, number_format($row->price, 2), 0, 0, 'C'); $pdf->ln(); $pdf->Cell(140); $pdf->Cell(20, $line_h, 'Net Total', 0, 0, 'R'); $pdf->Cell(30, $line_h, number_format($row->price, 2), 0, 0, 'C'); $pdf->ln(); $pdf->Cell(140); $pdf->Cell(20, $line_h, 'VAT', 0, 0, 'R'); $add = $row->price * ($vat / 100); $vat = $vat + 100; $total = $row->price * ($vat / 100); if ($add == $total) { $pdf->Cell(30, $line_h, 'N/A', 0, 0, 'C'); } else { $pdf->Cell(30, $line_h, number_format($add, 2), 0, 0, 'C'); } $pdf->ln(); $pdf->Cell(140); $pdf->Cell(20, $line_h, $cur . ' Total', 0, 0, 'R'); $pdf->Cell(30, $line_h, number_format($total, 2), 0, 0, 'C'); $pdf->ln(); $pdf->ln(); $pdf->ln(); $pdf->ln(); $pdf->SetFont('Arial', 'b', $font); $pdf->Cell(1, $line_h, 'Payment Details'); $pdf->Cell($cell); $pdf->Cell($cell); $pdf->Cell($cell); $pdf->Cell('60'); $pdf->Cell(1, $line_h, 'Other Information', 0, 9, 'R'); $pdf->SetFont('Arial', '', $font); $pdf->ln(); $pdf->Cell(1, $line_h, 'Paid with thanks'); $pdf->Cell($cell); $pdf->Cell($cell); $pdf->Cell($cell); $pdf->Cell('60'); $pdf->Cell(1, $line_h, 'Company Registration Number: 07350515', 0, 0, 'R'); $pdf->ln(); $pdf->Cell(1, $line_h, 'PayPal Transaction ID' . $row->value); $pdf->Cell($cell); $pdf->Cell($cell); $pdf->Cell($cell); $pdf->Cell('60'); $pdf->Cell(1, $line_h, 'VAT Registration Number: 107 6226 45', 0, 0, 'R'); $pdf->Output(YBUY_PLUGIN_DIR_PATH . '../../uploads/pdf/ybuy_' . $id . '.pdf'); //echo '<iframe src="/wp-content/uploads/pdf/ybuy_' . $id . '.pdf" style="width: 1000px; height: 800px"></iframe>'; //$r = wp_mail('*****@*****.**', 'test', 'test', '', YBUY_PLUGIN_DIR_PATH . '../../uploads/pdf/ybuy_' . $id . '.pdf'); //print_r($r); return YBUY_PLUGIN_DIR_PATH . '../../uploads/pdf/ybuy_' . $id . '.pdf'; }
/* конец нижней части */ /*начало шапки*/ $pdf=new FPDF(); $pdf->AddFont('ArialMT','','arial.php'); $pdf->AddFont('Arial-BoldMT','','arialbd.php'); $pdf->AddFont('Arial-BoldItalicMT','','arialbi.php'); $pdf->AddPage(); $pdf->SetFont('Arial-BoldMT','',14); // задаем шрифт и его размер $reportName="НАКЛАДНАЯ /ОБРАЗЦЫ /"; $pdf->Cell( 0, 15, $reportName, 0, 0, 'C' ); $pdf->SetFont('Arial-BoldMT','',8); // задаем шрифт и его размер $pdf->Cell(10,20,'',0,1,'l'); $pdf->ln(0); $pdf->Cell(10,5,'',0,0,'l'); $pdf->SetTextColor(214,3,0); // красный $pdf->Cell(50,5,'Дата составления заявки',1,0,'l'); $pdf->SetTextColor(22,50,255); // синий $pdf->Cell(90,5,date("d-m-Y",time()),1,0,'l'); $pdf->ln(5); $pdf->Cell(10,30,'',0,0,'l'); $pdf->SetTextColor(214,3,0); // красный $pdf->Cell(50,25,'Название фирмы',1,0,'l'); $pdf->Image('logo.jpg',80,37,'70',''); $pdf->Cell(90,25,'',1,0,'l'); $pdf->ln(20);
/** * @Template() * * @Route("/statistique-participations/", name="statistiqueparticipations") */ public function statistiqueParticipationsAction(Request $request) { $em = $this->getDoctrine()->getManager(); if (!$this->get('security.authorization_checker')->isGranted('ROLE_SUPER_ADMIN')) { $user = $this->getUser(); $id = $user->getId(); $activites = $this->get("alb_inscriptions.alb_manager")->getActivitesAdherent($id); $bureau = $this->get("alb_inscriptions.alb_manager")->isBureau($id, $activites); if ($bureau) { $groupes = $this->get("alb_inscriptions.alb_manager")->getGroupesAdherent($id); $activitesgroupe = $em->getRepository('ALBInscriptionsBundle:Activites')->findByIdgroupes($groupes); foreach ($activitesgroupe as $activite) { $activites[] = $activite->getId(); } } $activites = $this->get("alb_inscriptions.alb_manager")->getListeActivites($activites); } else { $activites = $em->getRepository('ALBInscriptionsBundle:Activites')->findAll(); $groupes = $em->getRepository('ALBInscriptionsBundle:Groupes')->findAll(); } if ('POST' === $request->getMethod()) { $activite = $request->get('activite'); $groupe = $request->get('groupe'); if ($activite > 0) { $nomactivite = $em->getRepository('ALBInscriptionsBundle:Activites')->find($activite)->getActivite(); } elseif ($groupe > 0) { $nomactivite = $em->getRepository('ALBInscriptionsBundle:groupes')->find($groupe)->getGroupe(); } else { $nomactivite = 'Toutes'; } $datedebut = $request->get('datedebut'); $datefin = $request->get('datefin'); $nb = 0; if ($activite > 0) { $participants = $this->get("alb_inscriptions.alb_manager")->getListeParticipantsActivite($activite); } else { $participants = $this->get("alb_inscriptions.alb_manager")->getListeParticipants($groupe); } $nomfichier = 'statistiques/' . $activite . '.pdf'; $pdf = new \FPDF(); $pdf->Open(); $pdf->SetTopMargin(5); $pdf->AddPage(); $pdf->SetFont('Arial', 'B', 14); $pdf->Cell(0, 5, utf8_decode('Amicale Laïque de Billère'), 0, 1, 'C'); $pdf->ln(2); $pdf->SetFont('Arial', '', 12); $pdf->Cell(0, 5, utf8_decode('Liste des présences aux sorties ' . $nomactivite . ' entre le ' . substr($datedebut, 8, 2) . '/' . substr($datedebut, 5, 2) . '/' . substr($datedebut, 0, 4) . ' et le ' . substr($datefin, 8, 2) . '/' . substr($datefin, 5, 2) . '/' . substr($datefin, 0, 4)), 0, 1); $pdf->ln(2); $pdf->SetFont('Arial', '', 8); $pdf->SetFont('Arial', 'B', 8); $pdf->Cell(5, 4, '', 1, 0, 'C'); $pdf->Cell(50, 4, utf8_decode('Nom Prénom'), 1, 0, 'C'); //$pdf->Cell(20,4,utf8_decode('Activité'),1,0,'C'); $pdf->Cell(30, 4, utf8_decode('Nb de présence'), 1, 1, 'C'); $pdf->SetFont('Arial', '', 8); $i = 0; $encadrement = false; foreach ($participants as $participant) { if ($participant->getAidemeneur() and !$encadrement) { $pdf->Cell(55, 4, 'TOTAL', 1, 0, 'R'); $pdf->Cell(30, 4, $nb, 1, 1, 'C'); $nb = 0; $encadrement = true; $i = 0; $pdf->SetFont('Arial', 'B', 8); $pdf->Cell(85, 5, 'ENCADREMENT', 0, 1, 'C'); $pdf->SetFont('Arial', '', 8); $pdf->Cell(5, 4, '', 1, 0, 'C'); $pdf->Cell(50, 4, utf8_decode('Nom Prénom'), 1, 0, 'C'); //$pdf->Cell(20,4,utf8_decode('Activité'),1,0,'C'); $pdf->Cell(30, 4, utf8_decode('Nb de présence'), 1, 1, 'C'); } $i++; $pdf->Cell(5, 4, $i, 1, 0, 'C'); $pdf->Cell(50, 4, utf8_decode($participant->getIdadherent()->getNom() . ' ' . $participant->getIdadherent()->getPrenom()), 1, 0, ''); $id = $participant->getId(); if ($activite > 0) { $nbparticipation = $this->get("alb_inscriptions.alb_manager")->getNbParticipationActivite($activite, $id, $datedebut, $datefin); } else { $nbparticipation = $this->get("alb_inscriptions.alb_manager")->getNbParticipationGroupe($groupe, $id, $datedebut, $datefin); } $pdf->Cell(30, 4, $nbparticipation, 1, 1, 'C'); $nb = $nb + $nbparticipation; } $pdf->Cell(55, 4, 'TOTAL', 1, 0, 'R'); $pdf->Cell(30, 4, $nb, 1, 1, 'C'); $pdf->Output($nomfichier, 'F'); $response = new Response(); $response->setContent(file_get_contents($nomfichier)); $response->headers->set('Content-Type', 'application/force-download'); $response->headers->set('Content-disposition', 'filename=' . $nomfichier); return $response; } return array('activites' => $activites, 'groupes' => $groupes); }
<?php include '../conexion/db.php'; require '../fpdf17/fpdf.php'; $pdf = new FPDF(); $pdf->AddPage(); $pdf->SetFont('Arial', '', 16); $pdf->Image("../dist/img/ICONO2.png", 10, 8, 10, 10, 'PNG'); $pdf->Cell(60, 10, '', 0); $pdf->Cell(90, 10, 'Efood - Administracion', 0); $pdf->ln(15); $pdf->SetFont('Arial', '', 12); $pdf->Cell(70, 10, '', 0); $pdf->Cell(90, 10, 'Ventas realizadas', 0); $pdf->ln(30); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(30, 10, 'N. Venta', 0); $pdf->Cell(70, 10, 'Cliente', 0); $pdf->Cell(30, 10, 'Fecha', 0); $pdf->Cell(30, 10, 'Total C.', 0); $pdf->ln(8); //Consulta a la BD /*$pdf->SetFont('Arial','',12); $ventas=pg_query("Select * form ventas ") while ($ventas2=pg_fetch_row($ventas)) { $pdf->Cell(30,10,$ventas2['id'],0); $pdf->Cell(70,10,$ventas2['cliente'],0); $pdf->Cell(30,10,$ventas2['fecha'],0); $pdf->Cell(30,10,$ventas2['totalp'],0); $pdf->ln(8);
function createpdf($id_gr) { require '../fpdf/fpdf.php'; //permite criar uma font a partir das font do windows //require('../fpdf/makefont/makefont.php'); //MakeFont('../fpdf/arial.ttf','iso-8859-1', true); if (strpos($id_gr, '-') !== false) { $grepdb = grepGetByGrNumber($id_gr); } else { $grepdb = grepGetById($id_gr); } //$grepdb = grepGetById($id_gr); $pdf = new FPDF('P', 'mm', 'A4'); $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->SetFont('arial', '', 12); $pdf->Cell(0, 10, $pdf->Image('../images/eleclerc.jpg', 6, 10, 50), 0, 0, 'L'); //$pdf->Cell(0,10,utf8_decode('Guia de Reparação nº19') ,0 ,0 ,'R'); if ($grepdb['gr_number'] == "") { $pdf->Cell(0, 10, utf8_decode('Guia de Reparação nº' . $grepdb['id']), 0, 0, 'R'); } else { $pdf->Cell(0, 10, utf8_decode('Guia de Reparação nº' . $grepdb['gr_number']), 0, 0, 'R'); } $pdf->Ln(15); $pdf->Cell(155, 10, utf8_decode($_SESSION['morada_leclerc_pdf']), 0, 0, 'L'); $pdf->Cell(2, 10, utf8_decode('Data: ' . invertedatasemhora($grepdb['date_in'])), 0, 0, 'L'); $pdf->Ln(6); $pdf->Cell(0, 10, utf8_decode($_SESSION['cod_postal_leclerc_pdf']), 0, 0, 'L'); $pdf->Ln(6); $pdf->Cell(0, 10, utf8_decode('Tel: ' . $_SESSION['telefone_leclerc_pdf'] . ' Fax: ' . $_SESSION['fax_leclerc_pdf']), 0, 0, 'L'); $pdf->Ln(6); $pdf->Cell(0, 10, utf8_decode($_SESSION['mail_leclerc_pdf']), 0, 0, 'L'); $pdf->Ln(6); $pdf->Cell(0, 10, utf8_decode('NIF: ' . $_SESSION['nif_leclerc_pdf']), 0, 0, 'L'); //cliente $pdf->Ln(15); $pdf->SetFont('arial', '', 20); $pdf->Cell(0, 10, utf8_decode('Cliente'), 0, 0, 'L'); $pdf->Ln(2); $pdf->Cell(0, 10, utf8_decode('_______________________________________________'), 0, 0, 'L'); $pdf->Ln(10); $pdf->SetFont('arial', '', 12); $pdf->Cell(0, 10, utf8_decode('Nome: ' . $grepdb['cl_name']), 0, 0, 'L'); $pdf->Ln(10); $pdf->Cell(0, 10, utf8_decode('Morada: ' . $grepdb['cl_morada']), 0, 0, 'L'); $pdf->Ln(10); //o multicell permite ser só uma linha ou caso acaba a linha cria logo uma por baixo $pdf->Cell(80, 10, utf8_decode('Localidade: ' . $grepdb['cl_localidade'])); $pdf->Cell(2, 10, utf8_decode('Cod. Postal: ' . codpostalToForm($grepdb['cl_codpostal']))); $pdf->Ln(10); $pdf->Cell(0, 10, utf8_decode('Contacto: ' . $grepdb['cl_telefone']), 0, 0, 'L'); $pdf->Ln(15); $pdf->SetFont('arial', '', 20); //artigo $pdf->Cell(0, 10, utf8_decode('Artigo'), 0, 0, 'L'); $pdf->Ln(2); $pdf->Cell(0, 10, utf8_decode('_______________________________________________'), 0, 0, 'L'); $pdf->Ln(10); $pdf->SetFont('arial', '', 12); $pdf->Cell(80, 10, utf8_decode('Marca: ' . $grepdb['art_marca'])); $pdf->Cell(2, 10, utf8_decode('Tipo: ' . $grepdb['art_type'])); $pdf->ln(10); $pdf->Cell(80, 10, utf8_decode('Modelo: ' . $grepdb['art_modelo'])); $pdf->Cell(2, 10, utf8_decode('EAN: ' . $grepdb['art_ean'])); $pdf->ln(10); $pdf->MultiCell(0, 10, utf8_decode('Nº Série: ' . $grepdb['art_numserie'])); $pdf->MultiCell(0, 10, utf8_decode('Anomalia: ' . $grepdb['art_anomalia'])); $pdf->MultiCell(0, 10, utf8_decode('Acessórios: ' . $grepdb['art_acessor'])); $pdf->MultiCell(0, 10, utf8_decode('Estética: ' . $grepdb['art_estetic'])); //$image_photo = $pdf->Image('../images/euro.jpg',$pdf->GetX(), $pdf->GetY(), 'R'); $pdf->Cell(80, 10, utf8_decode('Talão: ' . $grepdb['art_numtalao'])); $pdf->Cell(2, 10, utf8_decode('Valor: ' . $grepdb['art_valor'])); $pdf->Ln(10); if ($grepdb['art_garantie'] == 1) { $pdf->Cell(80, 10, utf8_decode('Garantia: Sim')); $pdf->Cell(2, 10, utf8_decode('Data: ' . $grepdb['art_dategar'])); } else { $pdf->Cell(0, 10, utf8_decode('Garantia: Não'), 0, 0, 'L'); } $pdf->Ln(10); if ($grepdb['art_orcamento'] == 1) { $pdf->Cell(0, 10, utf8_decode('Orçamento: Sim'), 0, 0, 'L'); } else { $pdf->Cell(0, 10, utf8_decode('Orçamento: Não'), 0, 0, 'L'); } $pdf->Ln(20); $pdf->Cell(20, 10, utf8_decode(' ')); $pdf->Cell(80, 10, utf8_decode('Assinatura Cliente:')); $pdf->Cell(2, 10, utf8_decode('Assinatura Funcionário:')); $pdf->Ln(20); $pdf->Cell(20, 10, utf8_decode(' ')); $pdf->Cell(80, 10, utf8_decode('________________')); $pdf->Cell(2, 10, utf8_decode('____________________')); return $pdf; }
$fechaanio = date("Y", $fecha2); $fecha_ahora = date('Y-m-d'); $fecha_hoy_dia = $fechadia . "/" . $fechames . "/" . $fechaanio; if (isset($_GET['fecha_hoy'])) { $fecha_hoy_dia = $_GET['fecha_hoy']; $fecha_ahora = DateToIso($_GET['fecha_hoy']); } $horapago = date("G", $fecha2); $horapago = $horapago; $minutopago = date("i", $fecha2); $horapago = $horapago . ":" . $minutopago; /** INICIO HEADER **/ $ruta = MAIN_PATH . 'images/' . $_SESSION['path'] . '/logo.jpg'; $pdf->Image($ruta, 195, 5, 10, 10); $pdf->Cell(193, 4, 'Libro Diario ' . $fecha_hoy_dia, 0, 1, 'C'); $pdf->ln(); /** FIN HEADER **/ $pdf->Cell(1, 4, '', 0, 0, 'C', $fill); $pdf->Cell(115, 4, 'Descripción', 1, 0, 'C'); $fill = 0; $pdf->Cell(1, 4, '', 0, 0, 'C', $fill); $pdf->Cell(50, 4, ' Entradas ', 1, 0, 'C', $fill); $pdf->Cell(1, 4, '', 0, 0, 'C', $fill); $pdf->Cell(25, 4, ' Salidas ', 1, 1, 'C', $fill); $pdf->Cell(115, 4, ' ', 0, 0); $fill = 0; $pdf->Cell(1, 4, '', 0, 0, 'C', $fill); $pdf->Cell(1, 4, '', 0, 0, 'C', $fill); $pdf->Cell(25, 4, ' Caja ', 1, 0, 'C', $fill); $pdf->Cell(25, 4, ' Banco ', 1, 0, 'C', $fill); $pdf->Cell(25, 4, ' ', 0, 1, 'C', $fill);
function geraCertificado($Data, $NomeAluno, $Evento, $orador, $CargaHoraria, $organizadorEvento, $caminhoServidor) { //CRIA O PDF $pdf = new FPDF(); $pdf->SetTitle('Certificado de ' . utf8_decode($NomeAluno)); // ABRE O PDF PARA EDIÇÃO $pdf->Open(); // ADICIONA UMA PÁGINA AO ARQUIVO $pdf->AddPage('L', 'A4'); $pdf->AddFont('Century', '', 'Century.php'); // ADICIONA IMAGEM (CABEÇALHO) $pdf->Image('resources/images/header.png', 0, 5); $pdf->SetY(67); $pdf->SetX(20); $pdf->SetTextColor(0, 0, 0); $pdf->SetFont('Century', '', 18); if ($orador != "") { $pdf->MultiCell(220, 10, utf8_decode("Certifico para os devidos fins que {$NomeAluno} participou, como ouvinte, do evento \"{$Evento}\" apresentado por \"{$orador}\" organizado pelo(a) {$organizadorEvento}, {$Data} com carga horária de {$CargaHoraria} horas."), 0, "J", false); } else { $pdf->MultiCell(220, 10, utf8_decode("Certifico para os devidos fins que {$NomeAluno} participou, como ouvinte, do evento \"{$Evento}\" organizado pelo(a) {$organizadorEvento}, {$Data} com carga horária de {$CargaHoraria} horas."), 0, "J", false); } //ADICIONA A ASSINATURA $pdf->Image('resources/images/assinaturaFulano.gif', 125, 130, 43, 16); //NOME DO ASSINANTE $pdf->SetFont('Century', '', 12); $pdf->SetY(157); $pdf->SetX(73); $pdf->Cell(145, 0, 'Sr. Fulano da Silva', 0, 0, 'C'); //TITULO OU FUNCAO DO ASSINANTE $pdf->ln(7); $pdf->SetX(73); $pdf->Cell(145, 0, utf8_decode("Título/Função de Fulano da Silva"), 0, 0, 'C'); //ENDEREÇO DO LOCAL A DESEJAR $pdf->SetY(175); $pdf->ln(4); $pdf->SetX(73); $pdf->Cell(145, 0, utf8_decode("Avenida Meu Endereço, São Paulo - SP"), 0, 0, 'C'); //RODAPE COM DEMAIS INFORMACOES $pdf->ln(7); $pdf->SetX(73); $pdf->Cell(145, 0, '(11) 5555-5555 - www.seusite.com.br', 0, 0, 'C'); //GERA O ARQUIVO PDF COM O NOME DO ALUNO E SALVA NO SERVIDOR EM PASTA ESPECIFICA DO EVENTO $NomeAlunoSemAcent = remove_acentuacao($NomeAluno, true); $EventoSemAcent = remove_acentuacao($Evento, true); $pdf->Output($caminhoServidor . "/{$EventoSemAcent}/" . $NomeAlunoSemAcent . ".pdf", "F"); }
$pdf->Cell(80, 10, ''); $pdf->Cell(70, 10, 'Debito em Conta Prefeitura de XXXXXXXXXX', 1, 0, 'C'); $pdf->Cell(40, 10, 'Debito em Conta', 1, 0, 'C'); $pdf->Ln(10); $pdf->Cell(190, 10, 'Local de Pagamento: Em qualquer Agencia Bancaria ou Casas Lotericas.', 1, 0, 'C'); $pdf->Ln(10); $pdf->SetFont('Arial', '', 8); $pdf->Cell(140, 5, 'Nome Do Contribuinte', L, 0, 'L'); $pdf->Cell(49, 5, 'CNPJ/CPF', L, 0, 'L'); $pdf->Cell(1, 10, '', R, 0, 'L'); $pdf->Ln(5); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(140, 10, $row['nome'], L, 0, 'L'); $pdf->Cell(49, 10, $row['cpf'], L, 0, 'L'); $pdf->Cell(1, 10, '', R, 0, 'L'); $pdf->ln(9); $pdf->Cell(190, 1, '', B, 0, 'L'); $pdf->Ln(1); $pdf->SetFont('Arial', '', 8); $pdf->Cell(189, 5, 'Endereco', L, 0, 'L'); $pdf->Cell(1, 5, '', R, 0, 'L'); $pdf->Ln(5); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(189, 10, $row['endereco'], L, 0, 'L'); $pdf->Cell(1, 10, '', R, 0, 'L'); $pdf->Ln(9); $pdf->Cell(190, 1, '', B, 0, 'L'); $pdf->SetFont('Arial', 'B', 9); $pdf->Ln(1); $pdf->Cell(20, 10, 'Parcela', 1, 0, 'C'); $pdf->Cell(25, 10, 'Data Venc.', 1, 0, 'C');
/** * valida email * @param string $email */ public function geraProcessosDetran($orgao, $resultado, $anexar, $id_empresa, $id_usuario, $id_pedido, $ordem, $res_oficio) { if ($orgao == '') { $orgao = 'Detran'; } if ($resultado == '') { $resultado = 'Nada Constou'; } // Variaveis de Tamanho $mesq = "10"; // Margem Esquerda (mm) $msup = "10"; // Margem Superior (mm) margem mínima dois pois ficou cortando) /*Uma dica: estes tamanhos você pode verificar com uma régua ou na própria caixa da etiqueta, seja bem preciso e sugiro que faça o teste na impressora que vai ser utilizada, pois pode acontecer de na impressão começar a subir ou descer, portanto, você deverá aumentar ou diminuir a altura da etiqueta. */ $m = date(m); $mes = traduzMes($m); $anexoDAO = new AnexoDAO(); $impressoDAO = new ImpressoDAO(); $atividadeDAO = new AtividadeDAO(); $res = $impressoDAO->buscaPorId(28); $imprimir_topo = $res->topo; $id_impresso = $res->id_impresso; $imprimir_timbre = $res->timbre; $imprimir_sub = $res->sub; $imprimir_linha = $res->linhas; $frase = ''; #if($anexar!='on'){ $pdf = new FPDF('P', 'cm', 'A4'); //papel personalizado $pdf->Open(); $pdf->SetMargins(1, 2); //seta as margens do documento $pdf->SetAuthor('Softfox 2011'); $pdf->SetFont('times', '', 7); $pdf->SetDisplayMode(100, 'continuous'); //define o nivel de zoom do documento PDF $coluna = 0; $linha = 0; $posicaoH = 0; $posicaoV = 0; #} $impressao_ordem = ''; $linha = 0; $frase .= $imprimir_topo; $bloco = ''; if ($res_oficio->id_pedido != '') { $linha_bloco = 1; $orgao_regiao = $res_oficio->certidao_cidade; $orgao_regiao .= '-' . $res_oficio->certidao_estado; $impressao_ordem = '#' . $res_oficio->id_pedido . '/' . $res_oficio->ordem . ' '; $responsavel_endereco = $res_oficio->endereco . ' ' . $res_oficio->numero . ' ' . $res_oficio->complemento; $data_atual = $res_oficio->cidade . ', ' . date(d) . ' de ' . $mes . ' de 20' . date(y) . '.'; $topo = str_replace('<certidao_nome>', $res_oficio->certidao_nome, $imprimir_topo); $topo = str_replace('<certidao_cnpj>', $res_oficio->certidao_cnpj, $topo); $topo = str_replace('<certidao_cpf>', $res_oficio->certidao_cpf, $topo); $topo = str_replace('<orgao>', $orgao, $topo); $topo = str_replace("<resultado>", $resultado, $topo); $topo = str_replace("<orgao_regiao>", $orgao_regiao, $topo); $topo = str_replace('<responsavel_empresa>', $res_oficio->fantasia, $topo); $topo = str_replace('<responsavel_endereco>', $responsavel_endereco, $topo); $topo = str_replace('<responsavel_cidade>', $res_oficio->cidade, $topo); $topo = str_replace('<responsavel_estado>', $res_oficio->estado, $topo); $topo = str_replace("<data>", $data_atual, $topo); $topo = str_replace('<impressao_ordem>', $impressao_ordem, $topo); $sub = str_replace('<responsavel_empresa>', $res_oficio->fantasia, $imprimir_sub); $sub = str_replace('<responsavel_endereco>', $responsavel_endereco, $sub); $sub = str_replace('<responsavel_cidade>', $res_oficio->cidade, $sub); $sub = str_replace('<responsavel_estado>', $res_oficio->estado, $sub); $sub = str_replace('<responsavel_cep>', $res_oficio->cep, $sub); $sub = str_replace('<responsavel_tel>', $res_oficio->tel, $sub); $sub = str_replace('<responsavel_fax>', $res_oficio->fax, $sub); $sub = str_replace('<responsavel_email>', $res_oficio->email, $sub); $pdf->AddPage(); $pdf->Image('../images/header.jpg', '0', '0', '19', '3,04', 'JPG'); $pdf->SetFont('', 'B', 12); $pdf->Cell('', 2, 'NÃO EMITIMOS E NEM VENDEMOS CERTIDÕES E SIM PRAZOS E SOLUÇÕES', '', 1, 'C'); $pdf->SetFont('', 'B', 14); $pdf->Cell('', 2, 'Declaração de Busca', '', 1, 'C'); $pdf->SetFont('', '', 12); $pdf->Write(1, $topo, ''); $pdf->SetFont('', '', 12); $pdf->Cell('', 1, '', '', 1, 'C'); $pdf->Cell('', 1, '', '', 1, 'C'); $pdf->Cell('', 1, '', '', 1, 'C'); $pdf->Cell('', 1, '', '', 1, 'C'); $pdf->Cell('', 1, '', '', 1, 'C'); $pdf->Cell('', 1, '', '', 1, 'C'); $pdf->Cell('', 1, $data_atual, '', 1, 'C'); $pdf->Cell('', 1, $impressao_ordem, '', 1, 'R'); $pdf->ln(); $pdf->ln(); $pdf->ln(); $pdf->ln(); $pdf->Cell('', 1, $res_oficio->fantasia, '', 1, 'C'); $pdf->ln(); $pdf->ln(); $pdf->Write(0.5, $sub, ''); $pdf->Line(1, 25, 20, 25); $pdf->Ln(); $pdf->Cell('', 0.5, $rodape, '', 1, 'C'); $rodape = $responsavel_endereco . ', ' . $res_oficio->cidade . '-' . $res_oficio->estado . ' CEP: ' . $res_oficio->cep; $pdf->Cell('', 0.5, $rodape, '', 1, 'C'); $rodape = 'Tel/Fax: ' . $res_oficio->tel . '/' . $res_oficio->fax . ' E-mail:' . $res_oficio->email; $pdf->Cell('', 0.5, $rodape, '', 1, 'C'); $rodape = 'www.cartoriopostal.com.br'; $pdf->Cell('', 0.5, $rodape, '', 1, 'C'); if ($anexar == 'on' and $res_oficio->id_servico == '16') { $pdf->Close(); //imprime a saida $num_a = $anexoDAO->listaAnexoPedidoNome($res_oficio->id_pedido_item, 'Declaração de Busca'); if (COUNT($num_a) == 0) { $file_path = "../anexosnovos/" . date('m') . '' . date('Y') . '/'; #alterado => "../anexos/" if (!is_dir($file_path)) { mkdir($file_path, 0777); } #alterado $arq_anexo = $file_path . 'decla_busca_' . $res_oficio->id_pedido_item . '_' . time() . '.pdf'; $pdf->Output($arq_anexo, 'F'); //imprime a saida $anexo->anexo = $arq_anexo; $anexo->anexo_nome = 'Declaração de Busca'; $anexo->id_pedido_item = $res_oficio->id_pedido_item; $anexo->id_usuario = $id_usuario; $anexoDAO->inserir($anexo); $ativ = $atividadeDAO->inserir('209', '', $id_usuario, $res_oficio->id_pedido_item); return 'Declaração anexada para ' . $impressao_ordem . '<br>'; } else { return 'Declaração não pode ser anexada para ' . $impressao_ordem . ' porque o anexo já existe<br>'; } } else { if ($anexar == 'on' and $res_oficio->id_servico != '16') { return '<b>Declaração não pode ser anexada para ' . $impressao_ordem . ' porque o serviço não é "Pesquisa Detran</b>"<br>'; } } } if ($anexar != 'on') { return $pdf->Output(); //imprime a saida } else { return 1; } }