Пример #1
0
 function relatorioCursoPorPolo()
 {
     $pdf = new PDF("P", "pt", "A4");
     $relatorio = $this->read();
     $cabeçalhoTabela = array('Curso', 'Tipo');
     $polo = "";
     $array = array();
     foreach ($relatorio as $value) {
         if ($polo == "") {
             $polo = $value->getPolo()->getId();
             $pdf->setVendedor($value->getPolo()->getNome());
             $pdf->AddPage();
         }
         if ($polo != $value->getPolo()->getId()) {
             $pdf->BasicTable($cabeçalhoTabela, $array);
             $array = array();
             $polo = $value->getPolo()->getId();
             $pdf->setVendedor($value->getPolo()->getNome());
             $pdf->AddPage();
             array_push($array, array($value->getNome(), $value->getTipo()['descricao']));
         } else {
             array_push($array, array($value->getNome(), $value->getTipo()['descricao']));
         }
     }
     $pdf->BasicTable($cabeçalhoTabela, $array);
     $pdf->Output();
 }
Пример #2
0
 function relatorioDisciplinasPorCurso($id)
 {
     $pdf = new PDF("P", "pt", "A4");
     $pdf->AddPage();
     $pdf->SetFont('Arial', 'B', 16);
     $polo = new Polo();
     $polo->setId($id);
     $polo = $polo->getById();
     $pdf->Cell(40, 10, $polo->getNome());
     $cabeçalhoTabela = array('Disciplina', 'Nome Tutor', 'Sobrenome Tutor');
     $curso = new Curso();
     $cursos = $curso->read();
     foreach ($cursos as $curso) {
         if ($curso->getPolo()->getId() != $id) {
             continue;
         }
         $pdf->setVendedor($curso->getNome() . " - " . $curso->getTipo()['descricao']);
         $pdf->AddPage();
         $disciplinaDao = new DisciplinaDao();
         $array = $disciplinaDao->listDisciplinasTutoresByCurso($curso);
         $pdf->BasicTable($cabeçalhoTabela, $array);
     }
     $pdf->Output();
 }
Пример #3
0
        // Move to the right
        $this->Cell(150);
        // Title
        $this->Cell(90, 10, 'DEPARTAMENTO ALMACEN DE INSUMOS', 0, 0, 'C');
        // Line break
        $this->Ln(10);
        // Move to the right
        $this->Cell(180);
        // Title
        $this->Cell(30, 10, 'CONTROL DE EXISTENCIA', 0, 0, 'C');
        // Line break
        $this->Ln(10);
        // Move to the right
        $this->Cell(180);
        // Title
        $this->Cell(30, 10, 'PLANTA :  EL CENTINELA', 0, 0, 'C');
        // Line break
        $this->Ln(10);
    }
}
$pdf = new PDF('L');
// Column headings
$header = array('Codigo', 'Nombre', 'U/M', 'Inv. Inicial', 'Entrada Mercancia', 'Salida Mercancia', 'Inv. Final');
// Data loading
//$data = $pdf->LoadData('countries.txt');
$modelo = new Producto();
$data = $modelo->listadoMes();
$pdf->SetFont('Arial', '', 14);
$pdf->AddPage();
$pdf->BasicTable($header, $data);
$pdf->Output();
    }
} elseif ($_GET['code'] == 3) {
    $pdf->Cell(40, 8, utf8_decode('Médicos por banda horaria'), 0);
    $header = array('Medico', 'dia', 'desde', 'hasta');
    $c1 = 0;
    foreach ($_GET as $n) {
        $consulta = 'select id, nombre, apellido, dia, min(desde) desde, max(hasta) hasta, id_med from horario
            inner join medico on (horario.id_med = medico.idmedico) where id = ' . $n . ' group by id_med, dia';
        $result = $db->query($consulta);
        if ($result->rowCount() > 0) {
            $valor = $result->fetch(PDO::FETCH_ASSOC);
            if ($c1 >= 0) {
                $medico = $valor['nombre'] . ' ' . $valor['apellido'];
                $c2 = 0;
                $matriz[$c1][$c2] = $medico;
                $c2++;
                $matriz[$c1][$c2] = $valor['dia'];
                $c2++;
                $matriz[$c1][$c2] = $valor['desde'];
                $c2++;
                $matriz[$c1][$c2] = $valor['hasta'];
            }
            $c1++;
        }
    }
}
//$pdf->SetFont('Arial', 'B', 15);
//$pdf->Cell(40, 8, 'Medicos', 0);
$pdf->Ln(20);
$pdf->BasicTable($header, $matriz);
$pdf->Output();
Пример #5
0
                        break;
                    case "1":
                        $estadoIMG = "img/info_bautizado.png";
                        break;
                }
                $this->SetFont('Arial', '', 8);
                $this->Cell($w[0], 7, $this->CompletaCaracteres($data[$z]['ReferenciaInfante']), 1, 0, 'C');
                $this->Cell($w[1], 7, $loFuncion->fDameFechaEscrita(substr($data[$z]['FechaBautizo'], 0, 10)), 1, 0, 'C');
                $this->Cell($w[3], 7, $this->CompletaCaracteres($data[$z]['NombresBau'] . " " . $data[$z]['ApellidosBau']), 1, 0, 'C');
                $this->Cell($w[4], 7, $this->CompletaCaracteres($data[$z]['SexoBauDescrip']), 1, 0, 'C');
                $this->Cell($w[2], 7, $this->CompletaCaracteres($data[$z]['NombreFullRepre']), 1, 0, 'C');
                $da = $this->getY();
                $this->Cell($w[5], 7, $this->Image($estadoIMG, 171.3, $da + 0.6, 0, 0, '', '../bautismo.php?bautiRef=' . $data[$z]['ReferenciaInfante']), 1, 0, 'C');
                $this->Ln(7);
            }
        }
        $this->Ln(10);
        $this->SetFont('Arial', 'I', 8);
        $this->setX(20);
        $this->Cell(40, 10, 'Usuario: ' . $_SESSION["nombreUsuario"] . " (" . $_SESSION["rolNombre"] . ")", 0, 0, 'L');
    }
}
$objC = new claBautismo();
$objC->asFechaInicioR = $_POST["f_Inicio"];
$objC->asFechaFinR = $_POST["f_Fin"];
$arregloCl = $objC->faListarBautizos();
$header = array('Ref', ' Fecha Bautizo', ' Infante', 'Sexo', 'Representante', 'Estado');
$pdf = new PDF();
$pdf->AddPage();
$pdf->BasicTable($header, $arregloCl);
$pdf->Output();
Пример #6
0
            $this->Cell($width[$i], 10, $header[$i], 1, 0, 'C', true);
        }
        $this->Ln();
        $this->SetFont('Arial', '', '11');
        $this->SetFillColor(132, 210, 143);
        $zebreado = false;
        $total = 0.0;
        while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
            $this->Cell($width[0], 10, utf8_decode($line['nombre']), 0, 'LR', 'L', $zebreado);
            //utf8_decode -> Solucionar problemas con Ñ
            $this->Cell($width[1], 10, number_format($line['unidad']), 0, 'LR', 'C', $zebreado);
            $this->Cell($width[2], 10, $line['precio'] . EURO, 0, 'LR', 'C', $zebreado);
            $this->Cell($width[3], 10, $line['precioTotal'] . EURO, 0, 'LR', 'C', $zebreado);
            $this->Ln();
            $zebreado = !$zebreado;
            $total = $total + doubleval($line['precioTotal']);
        }
        //Linea de cierre
        $this->Cell(array_sum($width), 0, '', 'T');
        //$this->Ln();
        $this->SetX(110);
        $this->SetFont('Arial', 'B');
        $this->Cell(50, 10, 'TOTAL:', 'RB', 0, 'C', $zebreado);
        $this->Cell(40, 10, $total . EURO, 'LB', 0, 'C', $zebreado);
    }
}
$pdf = new PDF();
$pdf->AddPage();
$header = array('Articulos', 'Unidades', 'Precio Unidades', 'Total Articulo');
$pdf->BasicTable($header);
$pdf->Output('F', './pdf/pedidoNo-' . $_GET['id'] . '.pdf');
        $subY = $this->y;
        $this->SetXY($subX, $subY + $subOffset);
        // restore font size
        $this->SetFontSize($subFontSizeold);
    }
}
// --------------------------- Get current date
$dt = new DateTime();
$dt = $dt->format('Y-M-d');
// --------------------------- Get current date
$pdf = new PDF();
$pdf->AliasNbPages();
// Column headings
$header = array('Account Title', 'Date', 'Income', 'Expense');
$pdf->SetFont('Arial', '', 9);
$pdf->SetMargins(5, 5, 5);
$pdf->AddPage();
$pdf->subWrite(4, 'E', '', 20);
$pdf->Write(4, 'xpense');
$pdf->Ln();
$pdf->Ln();
$pdf->SetX(10);
$pdf->subWrite(4, 'M', '', 20);
$pdf->Write(4, 'anager');
$pdf->SetX(5);
$pdf->Cell(0, 4, 'Income - Expense Report', 0, 1, 'C');
$pdf->Cell(0, 4, $ReportTitle, 0, 1, 'C');
$pdf->Cell(0, 4, "As Of: " . $dt, 0, 1, 'C');
$pdf->Cell(0, 4, '--------------------------------------------------------------------------------------------------------------------------------------------------------------------------', 0, 1, 'C');
$pdf->BasicTable($header, $decoded);
$pdf->Output();
Пример #8
0
        $this->Cell(190, 5, "Total Pagos " . $abonosTotales, 0, 0, 'R');
        $this->Ln();
        $this->Ln();
        $this->Cell(190, 5, "Total Pendiente " . ($deudaTotal - $abonosTotales), 0, 0, 'R');
        mysql_close($dbLink);
    }
}
//verificamos si introdujeron un valor para la cedula (a veces ese valor no representa una cedula sino un localizador)
//a efectos del reporte no importa lo que implica el valor de cedula, sigue siendo un query sobre ese campo
if (isset($_POST["cedula"])) {
    $pdf = new PDF();
    $sql1 = "SELECT lvpc.nro_inscripcion FROM linea_ventas_paquetes_credito lvpc" . " WHERE lvpc.ci = '" . $_POST["cedula"] . "'" . " AND lvpc.ci != '0'";
    $dbLink = getConnection();
    $consulta1 = mysql_query($sql1, $dbLink);
    $haveRecords = false;
    while (list($localizador) = mysql_fetch_array($consulta1)) {
        $haveRecords = true;
        $pdf->AddPage();
        $pdf->BasicTable($localizador);
    }
    if (!$haveRecords) {
        $pdf->AddPage();
        $pdf->SetY(80);
        $pdf->SetFont('Arial', 'B', 14);
        $pdf->MultiCell(200, 5, "Disculpe, no se encontró información para la cedula: " . $_POST["cedula"]);
    }
    $pdf->Output();
    mysql_close($dbLink);
} else {
    echo "No se tiene un valor de cedula o localizador para hacer la busqueda";
}
Пример #9
0
    }
    public function BasicTable($header, $content_list)
    {
        //header
        foreach ($header as $col) {
            $this->Cell(40, 5, $col, 1);
        }
        $this->Ln();
        //data
        foreach ($content_list['items'] as $parent_value) {
            foreach ($parent_value['child_label']['items'] as $child_value) {
            }
            // foreach($parent_value['child_label'] as $child_value) {
            // }
        }
    }
}
$pdf = new PDF();
//table header
$header = array('No.', 'Particular', 'Unit', 'Unit Label', 'Unit(Price)', 'Unit Price(Php)', '');
$pdf->AddPage();
$pdf->Ln(10);
$pdf->SetFont('Arial', '', 7);
$pdf->Cell(10, 5, 'To: ');
$pdf->Ln();
$pdf->SetFont('Arial', '', 7);
$pdf->Cell(5, 5, 'Address: ');
$pdf->Ln(10);
$pdf->Header();
$pdf->BasicTable($header, $content_list);
$pdf->Output();
Пример #10
0
        $this->Cell(10, 5, utf8_decode($this->CompletaCaracteres($Bauti->asNumero_registro, 12)), 0, 0, 'L');
        $this->ln();
        $this->ln();
        $this->Cell(15);
        $this->MultiCell(38, 5, utf8_decode($this->CompletaCaracteres($Bauti->asNotaMarginal, 135)), 0, 'L');
        $this->SetY(174);
        $this->Cell(15);
        $this->MultiCell(37, 5, utf8_decode($this->CompletaCaracteres($Bauti->asPrefectuDe, 30)), 0, 'L');
        $this->SetY(194);
        $this->Cell(15);
        $this->Cell(10, 5, utf8_decode($loFuncion->fDameFechaEscrita($Bauti->asPresentadoEl)), 0, 0, 'L');
        $this->SetY(204);
        $this->Cell(15);
        $this->Cell(10, 5, utf8_decode($this->CompletaCaracteres($Bauti->asNumPartidaNac, 19)), 0, 0, 'L');
        $this->ln();
    }
}
$loPadrinos = new claPadrinos();
$objC = new claBautismo();
$objC->asReferenciaInfante = $_GET["ReFinfante"];
$objC->fbBuscarBauti();
if ($objC->asEstatusBau == 1) {
    $header = array('Ref', ' Fecha Bautizo', ' Infante', 'Sexo', 'Representante', 'Estado');
    $pdf = new PDF();
    $pdf->AddPage();
    $pdf->BasicTable($header, $objC, $loPadrinos);
    $pdf->Output();
} else {
    $_SESSION["message"] = "No se pudo imprimir el Certificado.";
    header("location: ../../index.php");
}
            $totaldebit = $totaldebit + $amt;
        } else {
            $creditamt = $amt * -1;
            $totalcredit = $totalcredit + $amt * -1;
        }
        $balanceamt = number_format($totaldebit - $totalcredit, 2);
        $i++;
        if (getBpartner($accounts_id) != "") {
            $accounts_name .= " - " . getBpartner($accounts_id);
        }
        $data[] = array($i, $accountcode_full, $accounts_name, number_format($debitamt, 2), number_format($creditamt, 2), $balanceamt, $batchno, $document_no);
    }
    $data[] = array("", "", "Total:", number_format($totaldebit, 2), number_format($totalcredit, 2), number_format($totaldebit - $totalcredit, 2), "", "");
    $pdf->AddPage();
    //$pdf->MultiCell(0,5,$sql,0,'C');
    $pdf->BasicTable($data);
    //display pdf
    //$pdf->Output("doc.pdf","D");
    $pdf->Output("Accounts.pdf", "I");
    exit(1);
} else {
    include_once "menu.php";
    include_once 'class/Log.php';
    include_once 'class/SelectCtrl.php';
    include_once "../../class/datepicker/class.datepicker.php";
    $dp = new datepicker("{$tableprefix}");
    $dp->dateFormat = 'Y-m-d';
    error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
    $ctrl = new SelectCtrl();
    $accountsctrlfrom = $ctrl->getSelectAccounts(0, 'Y', "", "accounts_codefrom");
    $accountsctrlto = $ctrl->getSelectAccounts(0, 'Y', "", "accounts_codeto");
Пример #12
0
				</tr>
				<tr align="left">
					<td style="width:500px;"><strong>Tercera proclama: ' . $lsFechaProclamaTres . '</strong></td>
					<td style="width:400px;" align="center"><strong>Hora: ' . $lsHoraProclamaTres . '</strong></td>
				</tr>
				 <tr>
				 	<td colspan="10" align="center"><button type="button" onclick="history.go(-1);" id="volver">Volver</button><button type="button" onclick="imprimir()" id="impri">Imprimir</button></td>
				 </tr>
			</table></center><br><br><br><br><b>
			<center><div style="width:800px;">Quien(es) conozca(n) algún impedimento que pueda hacer inválido este matrimonio tiene(n) la obligación de manifestarlo al Párroco.</div></center>
			<br><br><br><br><br><div align="center">_____________________________&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_____________________________</div>
			<div align="center">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Los contrayentes&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>

	<br><br><br><br><div align="center" style="float:right; margin-right:100px;">_____________________________<br>
			Párroco</div>
			
			<div id="usuario">Elaborado por:
				' . $_SESSION["nombreUsuario"] . '
			</div>
		</div>
	</body>
	</html>');
        $this->WriteHTML($html);
    }
}
$arregloCl = "";
$header = array('Cedula', ' Nombre', 'Apellido', 'Sexo', 'Fecha Nacimiento', 'Direccion');
$pdf = new PDF();
$pdf->AddPage();
$pdf->BasicTable($header, $arregloCl, $lsNombreNovio);
$pdf->Output();
 public function generarPDFporEntidad()
 {
     Session::tienePermiso('estadistica');
     if (isset($_POST['fechaInicio2']) && isset($_POST['fechaFin2'])) {
         $fechaInicio = DateTime::createFromFormat('d/m/Y', $_POST['fechaInicio2'])->format('Y-m-d');
         $fechaFin = DateTime::createFromFormat('d/m/Y', $_POST['fechaFin2'])->format('Y-m-d');
         $pdf = new PDF();
         // Titulos de las columnas
         $header = array('Entidad', 'Kgs entregados');
         $estadisticas = Estadisticas::nuevo();
         $datos = $estadisticas->pesoPorEntidadEntre($fechaInicio, $fechaFin);
         $pdf->setTitulo('Kgs entregados a cada Entidad Receptora');
         $pdf->setFont('Arial', '', 14);
         $pdf->AddPage();
         $pdf->BasicTable($header, $datos);
         $pdf->Output();
     }
 }
Пример #14
0
    $result = mysql_fetch_array($objQuery);
    array_push($resultData, $result);
}
//************************//
//*** Table 1 ***//
$pdf->AddPage();
$pdf->SetFont('Helvetica', '', 14);
$pdf->Cell(68);
$pdf->Write(5, 'Veggies24x7.com');
$pdf->Ln();
$pdf->Cell(22);
$pdf->SetFontSize(8);
$pdf->Cell(57);
$result = mysql_query("select date_format(now(), '%W, %M %d, %Y') as date");
while ($row = mysql_fetch_array($result)) {
    $pdf->Write(5, $row['date']);
}
$pdf->Ln();
//count total numbers of visitors
$result = mysql_query("Select * from products") or die("Database query failed: {$query}" . mysql_error());
$count = mysql_num_rows($result);
$pdf->Cell(0);
$pdf->Write(5, '             Total Price: ' . $count . '');
$pdf->Ln();
$pdf->Ln(5);
$pdf->Ln(0);
$pdf->Cell(10);
$pdf->BasicTable($header, $resultData);
//forme();
//$pdf->Output("$d.pdf","F");
$pdf->Output();
Пример #15
0
<?php

session_start();
require "../fpdf.php";
include "../controller/api_connect_db.php";
class PDF extends FPDF
{
    function BasicTable($data)
    {
        foreach (['Nom', 'Quantité', 'Matière'] as $col) {
            $this->Cell(55, 7, utf8_decode($col), 1);
        }
        $this->Ln();
        foreach ($data as $row) {
            $this->Cell(55, 6, utf8_decode($row[0]), 1);
            $this->Cell(55, 6, utf8_decode($row[1]), 1);
            $this->Cell(55, 6, utf8_decode($row[2]), 1);
            $this->Ln();
        }
    }
}
$result = $bdd->query("SELECT f.nom as nom, MAX(l.quantite) as quantite, m.nom as matiere\n                            FROM fourniture f, liste l, link_eleve le, link_prof lp, matiere m\n                            WHERE f.id = l.fourniture_id\n                            AND lp.classe_id = le.classe_id\n                            AND l.prof_id = lp.prof_id\n                            AND f.matiere_id = m.id\n                            AND le.eleve_id = " . $_SESSION['id'] . "\n                            GROUP BY m.id,f.id");
$pdf = new PDF();
$pdf->AddPage();
$pdf->SetFont('Arial', 'B', 16);
$pdf->BasicTable($result);
$pdf->Output();
Пример #16
0
    }
    if ($found) {
        $legacyDataArray[$legacyIndex] = -1;
    }
}
foreach ($legacyDataArray as $legacyIndex => $legacyDataRow) {
    //var_dump( preg_match( '/;;;;;;;;;;;;$/', trim( $legacyDataRow ) ) );
    if ($legacyDataRow != -1 && preg_match('/;;;;;;;;;;;;$/', trim($legacyDataRow)) !== 1) {
        $legacyDataRow = split(';', trim($legacyDataRow));
        foreach ($legacyDataRow as $legacyCellIndex => $legacyCell) {
            if (trim($legacyCell) === '') {
                $legacyDataRow[$legacyCellIndex] = 0;
                //prevent empty cells
            }
        }
        $pdfDataTable[] = $legacyDataRow;
    }
}
//echo count( $pdfDataTable );
//sort by surname
function pdfReportComparator($row1, $row2)
{
    return $row1[0] > $row2[0];
}
usort($pdfDataTable, "pdfReportComparator");
$pdf = new PDF();
$pdf->SetFont('Arial', '', 9);
$pdf->SetFillColor(255, 255, 255);
$pdf->AddPage();
$pdf->BasicTable($pdfDataTable);
$pdf->Output();