if ($printPage === TRUE) {
         $pdf->AddPage();
         $printPage = FALSE;
     } else {
         $pdf->ReportHeader();
     }
     $pdf->AddCol('party', '78', 'Party Name', 'L');
     $pdf->AddCol("t{$prevYear}", '13', "{$prevYear}", 'R');
     $pdf->AddCol("t{$year}", '13', "{$year}", 'R');
     $pdf->AddCol("t{$comp}", '13', "% +/-", 'R');
     for ($k = 1; $k <= 4; $k++) {
         $pdf->AddCol("{$k}{$prevYear}", '13', "{$prevYear}", 'R');
         $pdf->AddCol("{$k}{$year}", '13', "{$year}", 'R');
         $pdf->AddCol("{$k}{$comp}", '13', "% +/-", 'R');
     }
     $pdf->Table($d['data'], $prop);
     $totals = $d['totals'];
     $pdf->SetFont('Arial', 'B', 8);
     $pdf->SetX(12);
     $pdf->Cell(78, 6, "Total", 'LBR', 0, 'C', false);
     $pdf->Cell(13, 6, $totals["t{$prevYear}"], 'LBR', 0, 'C', false);
     $pdf->Cell(13, 6, $totals["t{$year}"], 'LBR', 0, 'C', false);
     $pdf->Cell(13, 6, $totals["t{$comp}"], 'LBR', 0, 'C', false);
     for ($k = 1; $k <= 4; $k++) {
         $pdf->Cell(13, 6, $totals["{$k}{$prevYear}"], 'LBR', 0, 'C', false);
         $pdf->Cell(13, 6, $totals["{$k}{$year}"], 'LBR', 0, 'C', false);
         $pdf->Cell(13, 6, $totals["{$k}{$comp}"], 'LBR', 0, 'C', false);
     }
     $pdf->Ln();
 }
 $pdf->Output("sales_comp.pdf", "D");
Exemple #2
0
     $prop = array('HeaderColor' => array(0, 0, 0), 'HeaderTextColor' => array(255, 255, 255), 'color1' => array(217, 217, 217), 'color2' => array(255, 255, 255), 'textcolor1' => array(0, 0, 0), 'textcolor2' => array(0, 0, 0), 'padding' => 1, 'formatNumber' => TRUE, 'formatNumberDecimal' => 0, 'font' => array('Arial', '', 8), 'thfont' => array('Arial', 'B', 10));
     foreach ($data as $vid => $d) {
         $vehicle = $d['vehicle'];
         $pdf->AddPage();
         $pdf->AddCol('cno', '5%', '', 'L');
         if ($vendor == 'TIK') {
             $pdf->AddCol('description', '25%', '', 'L');
             $pdf->AddCol('fix_rate', '15%', '', 'R');
         } else {
             $pdf->AddCol('description', '40%', '', 'L');
         }
         $pdf->AddCol('model', '15%', '', 'L');
         $pdf->AddCol('oem', '15%', '', 'L');
         $pdf->AddCol('rate', '15%', '', 'R');
         $pdf->AddCol('unit', '10%', '', 'L');
         $pdf->Table($d['data'], $prop, TRUE, FALSE);
     }
     $pdf->Output("circular.pdf", "D");
 } else {
     if ($_GET['report'] == 'xls') {
         require_once '../../Classes/PHPExcel.php';
         $padding = 0.71;
         $objPHPExcel = new PHPExcel();
         $objPHPExcel->getProperties()->setCreator("*****@*****.**")->setLastModifiedBy("Imran Zahid")->setTitle("MM Circular")->setSubject("MM Circular")->setDescription("MM Circular")->setKeywords("MM Circular")->setCategory("Reports");
         $activeSheet = $objPHPExcel->getActiveSheet();
         $activeSheet->getHeaderFooter()->setOddHeader('&C&18&B' . $_title . '&R&U&D');
         $activeSheet->getHeaderFooter()->setOddFooter('&LPlease consider the environment before printing this report&C&IPage &P/&N&RReport generated by nexexcel.com');
         $activeSheet->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_PORTRAIT);
         $activeSheet->getPageSetup()->setPaperSize(PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4);
         $objPHPExcel->getActiveSheet()->getPageSetup()->setRowsToRepeatAtTopByStartAndEnd(1, 3);
         $activeSheet->getColumnDimension('A')->setWidth(12 + $padding);
Exemple #3
0
     }
     $pdf = new PDF('L', $unit = 'mm', $format = 'A4');
     $pdf->AliasNbPages();
     $pdf->SetAuthor("*****@*****.**");
     $pdf->SetSubject("Daily Sales");
     $pdf->SetTitle("Daily Sales");
     $pdf->SetCreator("Imran Zahid");
     $prop = array('color1' => array(255, 255, 255), 'color2' => array(255, 255, 255), 'color3' => array(128, 128, 128), 'padding' => 2, 'font' => array('Arial', '', 10), 'thfont' => array('Arial', 'B', 10));
     $pdf->AddPage();
     $pdf->AddCol('party_name', "20%", 'Party', 'L');
     $pdf->AddCol('vendor', "20%", 'Vendor', 'L');
     $pdf->AddCol('cat_name', "20%", 'Category', 'L');
     $pdf->AddCol('description', "20%", 'Item', 'L');
     $pdf->AddCol("cs", "10%", 'CS', 'R');
     $pdf->AddCol("pc", "10%", 'PC', 'R');
     $pdf->Table($data, $prop);
     $_cMargin = $pdf->cMargin;
     $pdf->cMargin = $prop['padding'];
     $pdf->SetFont('Arial', 'B', 10);
     $pdf->Cell(221.59806666667, 6, "Total", 1, 0, 'C');
     $pdf->Cell(27.69975833333, 6, $totals['cs'], 1, 0, 'R');
     $pdf->Cell(27.69975833333, 6, $totals['pc'], 1, 0, 'R');
     $pdf->cMargin = $_cMargin;
     $pdf->Ln();
     $pdf->Output("daily_sales_{$_GET['date_start']}.pdf", "D");
 } else {
     if ($_GET['report'] == 'xls') {
         require_once '../../Classes/PHPExcel.php';
         $padding = 0.71;
         $objPHPExcel = new PHPExcel();
         $objPHPExcel->getProperties()->setCreator("*****@*****.**")->setLastModifiedBy("Imran Zahid")->setTitle("Daily Sales")->setSubject("Daily Sales")->setDescription("Daily Sales")->setKeywords("Daily Sales")->setCategory("Reports");
Exemple #4
0
        {
            //Title
            $this->SetFont('Arial', '', 18);
            $this->Cell(0, 6, 'Statistika korisnika po broju poslanih paketa', 0, 1, 'C');
            $this->Ln(10);
            //Ensure table header is output
            parent::Header();
        }
    }
    //Connect to database
    mysql_connect('localhost', 'WebDiP2013_086', 'admin_kggK');
    mysql_select_db('WebDiP2013_086');
    $pdf = new PDF();
    $pdf->AddPage();
    //First table: put all columns automatically
    $pdf->Table("SELECT count(*) as 'Broj poslanih paketa',ime_prezime as 'Ime i prezime',korisnicko_ime as 'Korisnicko ime' from zahtjevi z  left join kurirske_sluzbe ks on(z.idkurirske_sluzbe=ks.idkurirske_sluzbe) left join korisnici k on(z.posiljatelj=k.korisnicko_ime) WHERE 1=1 and z.idkurirske_sluzbe={$idkurirske} " . $dodatak . " group by posiljatelj order by count(*) desc");
    $pdf->Output();
}
include "header.php";
include "izbornik.php";
require_once 'baza.class.php';
$baza = new baza();
?>

<style>
	@media print
  {
      #popis_info { display: none;}
        #popis_paginate { display: none;}
        #popis_filter { display: none;}
	#forma { display: none; }
    $pdf = new PDF('L');
    $pdf->AliasNbPages();
    $pdf->SetAuthor("*****@*****.**");
    $pdf->SetSubject("Sales Comparision");
    $pdf->SetTitle("Sales Comparision");
    $pdf->SetCreator("Imran Zahid");
    foreach ($regionals as $city => $regional) {
        $prop = array('HeaderColor' => array(0, 0, 0), 'HeaderTextColor' => array(255, 255, 255), 'color1' => array(217, 217, 217), 'color2' => array(255, 255, 255), 'textcolor1' => array(0, 0, 0), 'textcolor2' => array(0, 0, 0), 'padding' => 1, 'formatNumber' => TRUE, 'font' => array('Arial', '', 8), 'thfont' => array('Arial', 'B', 10));
        $ndata = $regional['data'];
        $totals = $regional['totals'];
        $pdf->AddPage();
        $pdf->AddCol('vendor', '16%', 'Vendor', 'L');
        foreach ($months as $month) {
            $pdf->AddCol($month, '7%', $month, 'R');
        }
        $pdf->Table($ndata, $prop);
        $prop['font'] = array('Arial', 'B', 10);
        $ndata = array();
        $ndata[] = $totals;
        $pdf->AddCol('vendor', '16%', 'Vendor', 'L');
        foreach ($months as $month) {
            $pdf->AddCol($month, '7%', $month, 'R');
        }
        $pdf->Table($ndata, $prop, TRUE, FALSE);
    }
    $pdf->Output("sales_comparision.pdf", "D");
} else {
    if ($_GET['report'] == 'xls') {
        require_once '../../Classes/PHPExcel.php';
        $padding = 0.71;
        $objPHPExcel = new PHPExcel();
Exemple #6
0
<?php

require 'access.php';
$conn = odbc_connect('COFFEE', '', '');
if (!$conn) {
    die('Connection failed');
}
$pdf = new PDF();
$pdf->AddPage();
$pdf->SetFont('Arial', '', 14);
$sql = 'SELECT COFFEE_NAME, ROAST_TYPE, QUANTITY FROM COFFEE_INVENTORY ORDER BY QUANTITY DESC';
$col = array('COFFEE_NAME' => 50, 'ROAST_TYPE' => 40, 'QUANTITY' => 100);
$pdf->Table($sql, $col);
$pdf->Output();
}
//Connect to database
mysql_connect("{$db_hostname}", "{$db_username}", "{$db_password}");
mysql_select_db('remsdb');
$pdf = new PDF("L", "mm", array(400, 200));
$pdf->AddPage();
$pdf->SetTextColor(0, 0, 0);
$pdf->SetFont('Times', 'B', 16);
$pdf->SetTextColor(0, 0, 0);
$pdf->SetFont('Times', 'B', 14);
$pdf->SetY(8);
$pdf->SetX(10);
$pdf->Cell(0, 3, $pdfAgencyName, 0, 1, 'L');
$pdf->Ln(5);
$pdf->SetFont('Times', 'B', 12);
$pdf->SetTextColor(131, 130, 139);
$pdf->Cell(0, 3, "Powered by Getchs;", 0, 1, 'L');
$pdf->tdheight = 5;
$pdf->Ln(30);
$pdf->SetFont('Times', 'B', 24);
$pdf->SetTextColor(64, 64, 64);
$pdf->Cell(0, 3, "LIST OF ALL ENDORSED APPLICANT", 0, 1, 'C');
$pdf->Ln(10);
$pdf->AddCol("Name", 80, 'Applicant Name', 'L');
$pdf->AddCol('clientName', 70, 'Client Name', 'L');
$pdf->AddCol('endorsementDate', 60, 'Application Date', 'L');
$pdf->AddCol('endorsementStatus', 50, 'Applicant Status', 'L');
$prop = array('HeaderColor' => array(89, 201, 145), 'color1' => array(224, 235, 255), 'color2' => array(255, 255, 240));
$pdf->SetFont('Times', 'B', 24);
$pdf->Table("SELECT CONCAT (basicLastName , ',' , basicFirstName , ' ', basicMiddleName) AS Name, clientName, endorsementDate, endorsementStatus\n\t\t\tFROM tbl_endorsement a, tbl_applicant b, tbl_basic_info c, tbl_client d, tbl_job_posting e\n\t\t\tWHERE a.applicantId = b.applicantId \n\t\t\t\t\tAND c.basicId = b.basicId\n\t\t\t\t\tAND a.clientId = d.clientId\n\t\t\t\t\tAND a.jobPostingId = e.jobPostingId", $prop);
$pdf->Output();
<?php

include 'view/reportes/CabezaReport.php';
$pdf = new PDF();
if ($resultRep != "") {
    $pdf->Carton = "";
    $pdf->Titulo = "Reporte de Documentos por SubCategorías";
    $pdf->AddPage();
    //$pdf->Header('Reporte de Categorías del Sistema');
    $pdf->AddCol('nombre_subcategorias', 50, utf8_decode('Nombre de SubCategoría'), 'L');
    $pdf->AddCol('lecturas_documentos', 50, utf8_decode('Cantidad de Documentos'), 'C');
    $pdf->AddCol('paginas_documentos', 50, 'Cantidad Hojas', 'C');
    $prop = array('HeaderColor' => array(246, 31, 66), 'color1' => array(255, 255, 255), 'color2' => array(255, 255, 210), 'padding' => 2);
    $pdf->SetY(40);
    $format = 1;
    $pdf->Table($resultRep, $prop, $format);
    $pdf->AddCol('totales', 50, utf8_decode(''), 'L');
    $pdf->AddCol('total_documentos', 50, utf8_decode('Total Documentos'), 'C');
    $pdf->AddCol('total_paginas', 50, utf8_decode('Total de Páginas'), 'C');
    $prop2 = array('HeaderColor' => array(246, 31, 66), 'color1' => array(232, 237, 233), 'color2' => array(255, 255, 210), 'padding' => 2);
    //$pdf->SetY(40);
    $format = 0;
    $pdf->Table($resultRep2, $prop2, $format);
}
$pdf->Output();
<?php

require 'mysql_table.php';
class PDF extends PDF_MySQL_Table
{
    function Header()
    {
        //Title
        $this->SetFont('Arial', '', 18);
        $this->Cell(0, 6, 'Mieteruebersicht', 0, 1, 'C');
        $this->Ln(10);
        //Ensure table header is output
        parent::Header();
    }
}
//Connect to database
mysql_connect('mysql.hostinger.de', 'u947198430_user', 'yes123');
mysql_select_db('u947198430_db');
$pdf = new PDF('L');
$pdf->AddPage();
$mieter = 'SELECT * FROM Mieter';
//First table: put all columns automatically
$pdf->Table($mieter);
$pdf->Output($downloadfilename . ".pdf");
header('Location: ' . $downloadfilename . ".pdf");
Exemple #10
0
                                $count++;
                            }
                        }
                    } elseif ($width + $wordwidth <= $maxwidth) {
                        $width += $wordwidth + $space;
                        $text .= $word . ' ';
                    } else {
                        $width = $wordwidth + $space;
                        $text = rtrim($text) . "\n" . $word . ' ';
                        $count++;
                    }
                }
                $text = rtrim($text) . "\n";
                $count++;
            }
            $text = rtrim($text);
            return $count;
        }
    }
    $pdf = new PDF('L', 'cm', 'A4');
    $pdf->AliasNbPages();
    $pdf->SetLeftMargin(1);
    $pdf->SetRightMargin(1);
    $pdf->AddPage();
    $pdf->Table();
    $filename = "Laporan Proyek " . $ProjectName . ".pdf";
    $pdf->Output($filename, "D");
}
?>
 
Exemple #11
0
<?php

require 'mysql_table.php';
class PDF extends PDF_MySQL_Table
{
    function Header()
    {
        //Title
        $this->SetFont('Arial', '', 18);
        $this->Cell(0, 6, 'World populations', 0, 1, 'C');
        $this->Ln(10);
        //Ensure table header is output
        parent::Header();
    }
}
//Connect to database
mysql_connect('localhost', 'root', 'vlab');
mysql_select_db('cell');
$pdf = new PDF();
$pdf->AddPage();
//First table: put all columns automatically
$pdf->Table('SELECT * FROM vle_data WHERE eid=1881668 AND flag=1');
$pdf->AddPage();
//Second table: specify 3 columns
$pdf->Output();
?>

View the r
Exemple #12
0
     $pdf->SetTitle("Voucher");
     $pdf->SetCreator("Imran Zahid");
     $prop = array('HeaderColor' => array(0, 0, 0), 'HeaderTextColor' => array(255, 255, 255), 'color1' => array(217, 217, 217), 'color2' => array(255, 255, 255), 'textcolor1' => array(0, 0, 0), 'textcolor2' => array(0, 0, 0), 'padding' => 1, 'formatNumber' => TRUE, 'formatNumberDecimal' => 0, 'printZero' => FALSE, 'font' => array('Arial', '', 8), 'thfont' => array('Arial', 'B', 8));
     foreach ($ndata as $data) {
         $prop['font'] = array('Arial', '', 8);
         $voucher_id = $data['seq'];
         $voucher_date = $data['voucher_date_fmt'];
         $voucher_type = $data['voucher_type'];
         $voucher_by = $data['voucher_by'];
         $voucher_remarks = $data['voucher_remarks'];
         $pdf->AddPage();
         $pdf->AddCol('account_name', '30%', 'Account Name', 'L');
         $pdf->AddCol('remarks', '40%', 'Remarks', 'L');
         $pdf->AddCol('debit_amount', '15%', 'Debit', 'R');
         $pdf->AddCol('credit_amount', '15%', 'Credit', 'R');
         $pdf->Table($data['data'], $prop);
         $prop['font'] = $prop['thfont'];
         $pdf->AddCol('account_name', '70%', 'Account', 'L');
         $pdf->AddCol('debit_amount', '15%', 'Debit', 'R');
         $pdf->AddCol('credit_amount', '15%', 'Credit', 'R');
         $row = array();
         $row[] = array('account_name' => 'Total', 'debit_amount' => $data['debit'], 'credit_amount' => $data['credit']);
         $pdf->Table($row, $prop, TRUE, FALSE);
     }
     $pdf->Output("voucher.pdf", "D");
 } else {
     if ($_GET['report'] == 'xls') {
         require_once '../../Classes/PHPExcel.php';
         $padding = 0.71;
         $objPHPExcel = new PHPExcel();
         $objPHPExcel->getProperties()->setCreator("*****@*****.**")->setLastModifiedBy("Imran Zahid")->setTitle("Voucher")->setSubject("Voucher")->setDescription("Voucher")->setKeywords("Voucher")->setCategory("Reports");
        //$this->Ln(10);
        //Ensure table header is output
        //parent::Header();
    }
}
$pdf = new PDF();
$pdf->AddPage("L", "Letter");
$pdf->SetFont('Arial', '', 18);
$pdf->Image($maindir . 'assets/img/lucen-aspicio.png', 50, 15, 200, 200, 'PNG');
$pdf->Image($maindir . 'assets/img/logo_unah.png', 15, 5, 24, 36, 'PNG');
$pdf->Image($maindir . 'assets/img/logo-cienciasjuridicas.png', 230, 8, 35, 35, 'PNG');
$pdf->Cell(22, 10, '', 0);
$pdf->SetFont('Arial', '', 18);
$pdf->Cell(45, 10, '', 0);
$pdf->Cell(70, 10, utf8_decode('Universidad Nacional Autónoma de Honduras'), 0);
$pdf->Ln(10);
$pdf->SetFont('Arial', 'U', 14);
$pdf->Cell(60, 8, '', 0, 0, "C");
$pdf->Cell(130, 8, 'Reportes de Permisos Personales', 0, 0, "C");
$pdf->Ln(25);
//$pdf->AddCol('N',25,'#Empleado','C');
$pdf->AddCol('Nombre', 70, 'Nombre Completo', 'C');
$pdf->AddCol('nombre_departamento', 70, 'Departamento', 'C');
$pdf->AddCol('mtd', 50, 'Motivo', 'C');
$pdf->AddCol('fecha', 22, 'Fecha', 'C');
$pdf->AddCol('hora_inicio', 20, 'inicio', 'C');
$pdf->AddCol('hora_finalizacion', 20, 'fin', 'C');
$pdf->AddCol('dias_permiso', 10, utf8_decode('Días'), 'C');
$pdf->base($db);
$pdf->Table($consulta4);
$pdf->Output();
Exemple #14
0
 $pdf->SetSubject("Party Age");
 $pdf->SetTitle("Party Age");
 $pdf->SetCreator("Imran Zahid");
 $prop = array('HeaderColor' => array(0, 0, 0), 'HeaderTextColor' => array(255, 255, 255), 'color1' => array(217, 217, 217), 'color2' => array(255, 255, 255), 'textcolor1' => array(0, 0, 0), 'textcolor2' => array(0, 0, 0), 'padding' => 1, 'formatNumber' => true, 'font' => array('Arial', '', 8), 'thfont' => array('Arial', 'B', 8));
 if ($_GET['format'] == 'compact') {
     $pdf->AddPage();
     $pdf->AddCol('party', '28%', 'Party Name', 'L');
     $pdf->AddCol('payt', '8%', 'Pay Terms', 'R');
     $pdf->AddCol('days', '7%', 'Days', 'R');
     $pdf->AddCol("d0", '9.5%', '0-30', 'R');
     $pdf->AddCol("d30", '9.5%', '31-60', 'R');
     $pdf->AddCol("d60", '9.5%', '61-90', 'R');
     $pdf->AddCol("d90", '9.5%', '91-120', 'R');
     $pdf->AddCol("d120", '9.5%', '>120', 'R');
     $pdf->AddCol('total', '9.5%', 'Total', 'R');
     $pdf->Table($ndata, $prop);
     $prop['font'] = array('Arial', 'B', 8);
     $pdf->AddCol('name', '43%', 'Total', 'C');
     $pdf->AddCol("d0", '9.5%', '0-30', 'R');
     $pdf->AddCol("d30", '9.5%', '31-60', 'R');
     $pdf->AddCol("d60", '9.5%', '61-90', 'R');
     $pdf->AddCol("d90", '9.5%', '91-120', 'R');
     $pdf->AddCol("d120", '9.5%', '>120', 'R');
     $pdf->AddCol('total', '9.5%', 'Total', 'R');
     $pdf->Table($totals, $prop, TRUE, FALSE);
 } else {
     foreach ($ndata as $data) {
         $party = $data['party'];
         $days_limit = $data['days'];
         $pdf->AddPage();
         $pdf->AddCol('seq', '8%', 'Inv #', 'L');
     $pdf->SetAuthor("*****@*****.**");
     $pdf->SetSubject("Cash Movement");
     $pdf->SetTitle("Cash Movement");
     $pdf->SetCreator("Imran Zahid");
     $prop = array('HeaderColor' => array(0, 0, 0), 'HeaderTextColor' => array(255, 255, 255), 'color1' => array(217, 217, 217), 'color2' => array(255, 255, 255), 'textcolor1' => array(0, 0, 0), 'textcolor2' => array(0, 0, 0), 'padding' => 1, 'formatNumber' => TRUE, 'font' => array('Arial', '', 8), 'thfont' => array('Arial', 'B', 10));
     $title = $_title;
     $pdf->AddPage();
     $col = 100 / $total;
     for ($i = 0; $i < $total; $i++) {
         $align = 'R';
         if ($i % 2 == 0) {
             $align = 'L';
         }
         $pdf->AddCol("{$i}", $col . '%', '', $align);
     }
     $pdf->Table($data, $prop, FALSE, FALSE);
     $pdf->Table($tdata, $prop, TRUE, FALSE);
     $fileName .= ".pdf";
     $pdf->Output($fileName, "D");
 } else {
     if ($_GET['report'] == 'xls') {
         require_once '../../Classes/PHPExcel.php';
         $padding = 0.71;
         $objPHPExcel = new PHPExcel();
         $objPHPExcel->getProperties()->setCreator("*****@*****.**")->setLastModifiedBy("Imran Zahid")->setTitle("Godown Stock")->setSubject("Godown Stock")->setDescription("Godown Stock")->setKeywords("Godown Stock")->setCategory("Reports");
         $activeSheet = $objPHPExcel->getActiveSheet();
         $activeSheet->getHeaderFooter()->setOddHeader('&C&18&B' . $_title . '&R&U&D');
         $activeSheet->getHeaderFooter()->setOddFooter('&LPlease consider the environment before printing this report&C&IPage &P/&N&RReport generated by nexexcel.com');
         $activeSheet->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE);
         $activeSheet->getPageSetup()->setPaperSize(PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4);
         $pad = 0;
    {
        $this->Ln(3);
        $this->SetFont('Times', 'B', 16);
        $this->SetTextColor(0, 0, 0);
        $this->Cell(0, 3, $pdfAgencyName, 0, 1, 'L');
        $this->Ln(5);
        $this->SetFont('Times', 'B', 11);
        $this->SetTextColor(131, 130, 139);
        $this->Cell(0, 3, "Powered by Getchs;", 0, 1, 'L');
        $this->tdheight = 5;
        $this->Ln(30);
        $this->SetFont('Times', 'B', 24);
        $this->SetTextColor(64, 64, 64);
        $this->Cell(0, 3, "LIST OF ALL APPLICANTS", 0, 1, 'C');
        $this->Ln(5);
        //Ensure table header is output
        parent::Header();
    }
}
//Connect to database
mysql_connect("{$db_hostname}", "{$db_username}", "{$db_password}");
mysql_select_db('remsdb');
$pdf = new PDF("L", "mm", array(300, 200));
$pdf->AddPage();
$pdf->SetTextColor(0, 0, 0);
$pdf->AddCol("Name", 55, 'Applicant Name', 'C');
$pdf->AddCol('basicEmail', 80, 'Email Address', 'C');
$prop = array('HeaderColor' => array(89, 201, 145), 'color1' => array(224, 235, 255), 'color2' => array(255, 255, 240));
$pdf->SetFont('Times', 'B', 30);
$pdf->Table("SELECT CONCAT (basicLastName , ',' , basicFirstName , ' ', basicMiddleName) AS Name, basicEmail\n\t\t\tFROM tbl_basic_info a, tbl_applicant b\n\t\t\tWHERE a.basicId = b.applicantId", $prop);
$pdf->Output();
$pdf = new PDF('P', 'mm', 'Letter');
$pdf->Open();
$pdf->AddPage();
//table:
$pdf->SetFont('Arial', 'B', 12);
$pdf->Cell(0, 6, 'Listado de Morosos Ventas', 0, 1, 'C');
$pdf->AddCol('nom', 36, 'Nombres', 'C');
$pdf->AddCol('telefono', 18, 'Teléfono');
$pdf->AddCol('celular', 18, 'Celular');
$pdf->AddCol('giro', 9, 'Giro');
$pdf->AddCol('fechaV', 19, 'Fecha V', 'C');
$pdf->AddCol('monto', 15, 'Monto', 'C');
$pdf->AddCol('productoDes', 40, 'Descripción', 'C');
$pdf->AddCol('', 32, 'Observaciones', 'C');
$prop = array('HeaderColor' => array(210, 210, 210), 'color1' => array(255, 255, 255), 'color2' => array(235, 235, 235), 'padding' => 1);
$pdf->Table("SELECT *, CONCAT(nombres,' ',primerApellido) as nom\r\nFROM datospersonales, detallescliente\r\nWHERE datospersonales.id = detallescliente.id\r\nAND detallescliente.status =0\r\nAND detallescliente.fechaV <= '{$fechaP}'\r\nAND detallescliente.tipo = 1\r\nORDER BY datospersonales.cedula ASC, detallescliente.fechaV DESC, detallescliente.productoDes DESC", $prop);
$pdf->AddPage();
//table2:
$pdf->SetFont('Arial', 'B', 12);
$pdf->Cell(0, 6, 'Listado de Morosos Préstamos', 0, 1, 'C');
$pdf->AddCol('nom', 36, 'Nombres', 'C');
$pdf->AddCol('telefono', 18, 'Teléfono');
$pdf->AddCol('celular', 18, 'Celular');
$pdf->AddCol('giro', 9, 'Giro');
$pdf->AddCol('fechaV', 19, 'Fecha V', 'C');
$pdf->AddCol('monto', 15, 'Monto', 'C');
$pdf->AddCol('productoDes', 40, 'Descripción', 'C');
$pdf->AddCol('', 32, 'Observaciones', 'C');
$prop = array('HeaderColor' => array(210, 210, 210), 'color1' => array(255, 255, 255), 'color2' => array(235, 235, 235), 'padding' => 1);
$pdf->Table("SELECT *, CONCAT(nombres,' ',primerApellido) as nom\r\nFROM datospersonales, detallescliente\r\nWHERE datospersonales.id = detallescliente.id\r\nAND detallescliente.status =0\r\nAND detallescliente.fechaV <= '{$fechaP}'\r\nAND detallescliente.tipo <> 1\r\nORDER BY datospersonales.cedula ASC, detallescliente.fechaV DESC, detallescliente.productoDes DESC", $prop);
$pdf->Output();
Exemple #18
0
        parent::Header();
    }
    //Pied de page
    function Footer()
    {
        //Positionnement à 1,5 cm du bas
        $this->SetY(-15);
        //Police Arial italique 8
        $this->SetFont('Arial', 'I', 8);
        //Numéro de page
        $this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C');
    }
}
//Connexion à la base
mysql_connect('localhost', 'root', '');
mysql_select_db('gestcertdkb');
$pdf = new PDF();
$pdf->Open();
$pdf->AddPage();
$pdf->AliasNbPages();
//tableau : définit 6 colonnes
$pdf->AddCol('nom_client', 25, 'Nom');
$pdf->AddCol('prenom_client', 50, 'Prenoms');
$pdf->AddCol('mail_client', 50, 'Mail');
$pdf->AddCol('tel_client', 30, 'Contact');
$pdf->AddCol('certificat_client', 40, 'Certificat');
$prop = array('HeaderColor' => array(1, 254, 248), 'color1' => array(255, 255, 255), 'color2' => array(255, 255, 255), 'padding' => 1);
$pdf->Table('SELECT * FROM client', $prop);
$pdf->Output();
?>
 
}
//Connect to database
mysql_connect("{$db_hostname}", "{$db_username}", "{$db_password}");
mysql_select_db('remsdb');
$pdf = new PDF("L", "mm", array(400, 200));
$pdf->AddPage();
$pdf->SetFont('Times', 'B', 16);
$pdf->SetTextColor(0, 0, 0);
$pdf->SetFont('Times', 'B', 14);
$pdf->SetY(8);
$pdf->SetX(10);
$pdf->Cell(0, 3, $pdfAgencyName, 0, 1, 'L');
$pdf->Ln(5);
$pdf->SetFont('Times', 'B', 12);
$pdf->SetTextColor(131, 130, 139);
$pdf->Cell(0, 3, "Powered by Getchs;", 0, 1, 'L');
$pdf->tdheight = 5;
$pdf->Ln(30);
$pdf->SetFont('Times', 'B', 24);
$pdf->SetTextColor(64, 64, 64);
$pdf->Cell(0, 3, "Employee Contract Report From: {$_SESSION['start1']} To: {$_SESSION['end1']}", 0, 1, 'C');
$pdf->Ln(10);
$pdf->AddCol("Name", 100, 'Employee Name', 'L');
$pdf->AddCol('clientName', 70, 'Client Name', 'L');
$pdf->AddCol('jobName', 60, 'Job', 'C');
$pdf->AddCol('contractStartDate', 45, 'Start of Contract', 'C');
$pdf->AddCol('contractEndDate', 45, 'End of Contract', 'C');
$prop = array('HeaderColor' => array(164, 219, 254), 'color2' => array(224, 235, 255), 'color1' => array(255, 255, 255));
$pdf->SetFont('Times', 'B', 24);
$pdf->Table("SELECT CONCAT (basicLastName , ',' , basicFirstName , ' ', basicMiddleName) AS Name, clientName, jobName, contractStartDate, contractEndDate\n\t\t\tFROM tbl_employee a, tbl_applicant b, tbl_basic_info c, tbl_client d, tbl_job_posting e, tbl_contract f \n\t\t\t\t\tWHERE a.applicantId = b.applicantId\n\t\t\t\t\tAND c.basicId = b.basicId\n\t\t\t\t\tAND a.jobPostingId = e.jobPostingId \n\t\t\t\t\tAND d.clientId = e.clientId\n\t\t\t\t\tAND f.employeeId = a.employeeId\n\t\t\tAND contractStartDate >= '{$_SESSION['start1']}' AND contractEndDate <= '{$_SESSION['end1']}' ", $prop);
$pdf->Output();
         $this->Cell(0, 10, 'Report generated by nexexcel.com', 0, 0, 'R');
     }
 }
 $pdf = new PDF('L');
 $pdf->AliasNbPages();
 $pdf->SetAuthor("*****@*****.**");
 $pdf->SetSubject("Active Trial Balance");
 $pdf->SetTitle("Active Trial Balance");
 $pdf->SetCreator("Imran Zahid");
 $pdf->AddPage();
 $pdf->AddCol('rownum', '5%', 'S.No.', 'C');
 $pdf->AddCol('account_name', '45%', 'Account Name', 'L');
 $pdf->AddCol('debit', '25%', 'Debit', 'R');
 $pdf->AddCol('credit', '25%', 'Credit', 'R');
 $prop = array('HeaderColor' => array(0, 0, 0), 'HeaderTextColor' => array(255, 255, 255), 'color1' => array(217, 217, 217), 'color2' => array(255, 255, 255), 'textcolor1' => array(0, 0, 0), 'textcolor2' => array(0, 0, 0), 'padding' => 2, 'font' => array('Arial', '', 8), 'thfont' => array('Arial', 'B', 10));
 $pdf->Table($ndata, $prop, FALSE, TRUE);
 $width = $pdf->w - $pdf->lMargin - $pdf->rMargin;
 $pdf->SetFont('Arial', 'B', 8);
 $pdf->Cell(50 / 100 * $width, 5, 'Total', 1, 0, 'L', FALSE);
 $pdf->Cell(25 / 100 * $width, 5, number_format($dr, 2), 1, 0, 'R', FALSE);
 $pdf->Cell(25 / 100 * $width, 5, number_format($cr, 2), 1, 0, 'R', FALSE);
 $pdf->Ln();
 $drbal = "";
 $crbal = "";
 $bal = number_format($dr - $cr, 2);
 if ($cr > $dr) {
     $drbal = "({$bal})";
 } else {
     $crbal = $bal;
 }
 $pdf->SetFont('Arial', 'B', 10);
Exemple #21
0
        continue;
    }
    $pdf->AddPage();
    $pdf->AddCol('invseq', '9%', 'Invoice #', 'L');
    $pdf->AddCol('voucher_date', '10%', 'Date', 'L');
    $pdf->AddCol('voucher_cheque', '9%', 'Cheque', 'L');
    //if ($ret['account_cate'] != '276') {
    $pdf->AddCol('voucher_remarks', '42%', 'Description', 'L');
    /*} else {
    		$pdf->AddCol('voucher_remarks', '43%', 'Description', 'L');
    		$pdf->AddCol('days',            '5%',  'Days',        'R');
    	}*/
    $pdf->AddCol('debit_amount', '10%', 'Debit', 'R');
    $pdf->AddCol('credit_amount', '10%', 'Credit', 'R');
    $pdf->AddCol('balance', '10%', 'Balance', 'R');
    $pdf->Table($ret['data'], $prop);
    $ac = number_format($ret['aob']);
    if (count($ret['data']) > 0) {
        $ac = $ret['data'][count($ret['data']) - 1]['balance'];
    }
    $pdf->SetFont('Arial', 'B', 10);
    $cellSize = 11 / 100 * $pdf->TableWidth;
    $pdf->SetX($pdf->lMargin);
    $pdf->Cell(67 / 100 * $pdf->TableWidth, 5, 'Total', 0, 0, 'C');
    $pdf->Cell($cellSize, 5, number_format($ret['dr']), 0, 0, 'R');
    $pdf->Cell($cellSize, 5, number_format($ret['cr']), 0, 0, 'R');
    $pdf->Cell($cellSize, 5, $ac, 0, 0, 'R');
}
if (isset($_GET['account_class']) && strlen($_GET['account_class']) > 0) {
    $pdf->Output("ledger_class.pdf", "D");
} else {
    {
        //Title
        $this->SetFont('Arial', '', 18);
        $this->Cell(0, 6, 'Jahresendabrechnung', 0, 1, 'C');
        $this->Ln(10);
        //Ensure table header is output
        parent::Header();
    }
}
//Connect to database
mysql_connect('mysql.hostinger.de', 'u947198430_user', 'yes123');
mysql_select_db('u947198430_db');
$pdf = new PDF('L');
$pdf->AddPage();
$wasser = "SELECT Kategorie, SUM(Betrag) AS Kosten\r\n            FROM Rechnungen\r\n            GROUP BY Kategorie\r\n            ";
$total = "SELECT SUM(Betrag) AS Totalnebenkosten\r\n            FROM Rechnungen\r\n            ";
//First table: put all columns automatically
$pdf->Table($wasser);
$pdf->Table($total);
//$pdf->AddPage();
//Second table: specify 3 columns
//$pdf->AddCol('Kategorie',40,'','C');
//$pdf->AddCol('Betrag',40,'','C');
//$prop=array('HeaderColor'=>array(255,150,100),
//'color1'=>array(210,245,255),
//'color2'=>array(255,255,210),
//'padding'=>2);
//$pdf->Table('SELECT Kategorie, SUM(Betrag) FROM `rechnungen` WHERE Kategorie =\'Wasser\'',$prop);
//$pdf->Output("C:\Users\John\Desktop/somename.pdf",'F');
$pdf->Output($downloadfilename . ".pdf");
header('Location: ' . $downloadfilename . ".pdf");
 foreach ($data as $godown_name => $ndata) {
     $opening_balance = $ndata['opening_balance'];
     $rate = $ndata['rate'];
     if ($firstPage === true) {
         $pdf->AddPage();
         $firstPage = false;
     }
     $pdf->printTitle();
     $pdf->AddCol('sno', '5%', 'S#', 'C');
     $pdf->AddCol('event', '15%', 'Event', 'L');
     $pdf->AddCol('seq', '5%', 'ID', 'L');
     $pdf->AddCol('trans_date', '10%', 'Date', 'L');
     $pdf->AddCol('erate', '10%', 'Rate', 'R');
     $pdf->AddCol('op_qty', '15%', 'Quantity', 'R');
     $pdf->AddCol('p_remarks', '40%', 'Remarks', 'L');
     $pdf->Table($ndata['data'], $prop);
     $_cMargin = $pdf->cMargin;
     $pdf->cMargin = $prop['padding'];
     $pdf->SetFont('Arial', 'B', 10);
     $width = $pdf->w - $pdf->lMargin - $pdf->rMargin;
     $PC5 = 0.05 * $width;
     $pdf->Cell($width - $PC5 * 11, 6, 'Total', 0, 0, 'C', false);
     $pdf->Cell($PC5 * 3, 6, number_format($ndata['total'] + $opening_balance, 2), 0, 1, 'R', false);
     $pdf->Ln();
     $grandTotal += $ndata['total'] + $opening_balance;
 }
 $pdf->SetFont('Arial', 'B', 10);
 $width = $pdf->w - $pdf->lMargin - $pdf->rMargin;
 $PC5 = 0.05 * $width;
 $pdf->Cell($width - $PC5 * 11, 6, 'Grand Total', 0, 0, 'C', false);
 $pdf->Cell($PC5 * 3, 6, number_format($grandTotal, 2), 0, 1, 'R', false);
<?php

require 'mysql_table.php';
class PDF extends PDF_MySQL_Table
{
    function Header()
    {
        //Title
        $this->SetFont('Arial', '', 16);
        $this->Cell(0, 6, 'Clientes', 0, 1, 'C');
        $this->Ln(10);
        //Ensure table header is output
        parent::Header();
    }
}
//Connect to database
mysql_connect('localhost', 'root', '');
mysql_select_db('appMantenimiento');
$pdf = new PDF();
$pdf->AddPage();
//First table: put all columns automatically
$sql_query = "SELECT \n\t\t\t\tid_cliente as Id,\n\t\t\t\tnombre as Nombre,\n\t\t\t\tnom_paterno as Paterno,\n\t\t\t\tnom_materno as Materno\n\t\tFROM clientes";
$pdf->Table($sql_query);
$pdf->AddPage();
header('Content-type: citas/pdf');
$pdf->Output('citas' . ".pdf", 'D');
        $this->Cell(array_sum($w), 0, '', 'T');
    }
    // Pie de página
    function Footer()
    {
        // Posición: a 1,5 cm del final
        $this->SetY(-15);
        // Arial italic 8
        $this->SetFont('Arial', 'I', 8);
        // Número de página
        $this->Cell(0, 10, 'Page ' . $this->PageNo() . '', 0, 0, 'C');
    }
}
$pdf = new PDF('P', 'mm', 'letter');
// Títulos de las columnas
$header = array('Cedula', '1er Nombre', '2do Nombre', '1er Apellido', '2do Apellido', 'Credencial', 'Status');
// Carga de datos
$pdf->SetFont('Arial', '', 12);
$pdf->AddPage();
$sql = "SELECT cedula_per,nombre1_per,nombre2_per,apellido1_per,apellido2_per,credencial_fun,status_fun FROM Persona  INNER JOIN Funcionario ON Persona.codigo_per = Funcionario.cod_per  ORDER BY cedula_per ASC ";
$resultado = mysql_query($sql);
//echo $resultado;
if (!$resultado) {
    echo "<script language='javascript'> alert('Error de Consulta!'); </script>";
} else {
    if (!mysql_num_rows($resultado)) {
        echo "<script language='javascript'> alert('Ningun Funcionario Registrado!'); window.close(); </script>";
    }
}
$pdf->Table($header, $resultado);
$pdf->Output();
     $pdf->SetSubject("Warehouse Transfer");
     $pdf->SetTitle("Warehouse Transfer");
     $pdf->SetCreator("Imran Zahid");
     $prop = array('HeaderColor' => array(0, 0, 0), 'HeaderTextColor' => array(255, 255, 255), 'color1' => array(217, 217, 217), 'color2' => array(255, 255, 255), 'textcolor1' => array(0, 0, 0), 'textcolor2' => array(0, 0, 0), 'padding' => 2, 'font' => array('Arial', '', 8), 'thfont' => array('Arial', 'B', 8));
     foreach ($data as $id => $d) {
         $transDate = $d[0]['trans_date'];
         $billNo = $d[0]['billno'];
         $pdf->AddPage();
         $pdf->AddCol('sno', '5%', 'S#', 'C');
         $pdf->AddCol('cno', '10%', 'Cno', 'L');
         $pdf->AddCol('manufacturer_no', '15%', 'Part No', 'L');
         $pdf->AddCol('item', '35%', 'Description', 'L');
         $pdf->AddCol('cat_name', '20%', 'Model', 'L');
         $pdf->AddCol('qty', '10%', 'Quantity', 'R');
         $pdf->AddCol('unit', '5%', 'Unit', 'C');
         $pdf->Table($d, $prop);
     }
     $pdf->Output("warehouse_transfer.pdf", "D");
 } else {
     if ($_GET['report'] == 'xls') {
         require_once '../../Classes/PHPExcel.php';
         $padding = 0.71;
         $objPHPExcel = new PHPExcel();
         $objPHPExcel->getProperties()->setCreator("*****@*****.**")->setLastModifiedBy("Imran Zahid")->setTitle("Warehouse Transfer")->setSubject("Warehouse Transfer")->setDescription("Warehouse Transfer")->setKeywords("Warehouse Transfer")->setCategory("Reports");
         $activeSheet = $objPHPExcel->getActiveSheet();
         $activeSheet->getHeaderFooter()->setOddHeader('&C&18&B' . $title . '&R&U&D');
         $activeSheet->getHeaderFooter()->setOddFooter('&LPlease consider the environment before printing this report&C&IPage &P/&N&RReport generated by nexexcel.com');
         $activeSheet->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE);
         $activeSheet->getPageSetup()->setPaperSize(PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4);
         $activeSheet->getPageSetup()->setRowsToRepeatAtTopByStartAndEnd(1, 2);
         $activeSheet->getColumnDimension('A')->setWidth(10 + $padding);
Exemple #27
0
        $this->Cell(0, 6, 'LISTE DES CERTIFICATS', 0, 1, 'C');
        $this->Ln(10);
        //Imprime l'en-tête du tableau si nécessaire
        parent::Header();
    }
    //Pied de page
    function Footer()
    {
        //Positionnement à 1,5 cm du bas
        $this->SetY(-15);
        //Police Arial italique 8
        $this->SetFont('Arial', 'I', 8);
        //Numéro de page
        $this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C');
    }
}
//Connexion à la base
mysql_connect('localhost', 'root', '');
mysql_select_db('gestcertdkb');
$pdf = new PDF();
$pdf->Open();
$pdf->AddPage();
$pdf->AliasNbPages();
//tableau : définit 6 colonnes
$pdf->AddCol('libelle_cert', 50, 'Nom du Certificat');
$pdf->AddCol('prix_cert', 60, 'Prix (CFA)');
$prop = array('HeaderColor' => array(1, 254, 248), 'color1' => array(255, 255, 255), 'color2' => array(255, 255, 255), 'padding' => 1);
$pdf->Table('SELECT * FROM certificat', $prop);
$pdf->Output();
?>
 
Exemple #28
0
         $pdf->AddCol('cno', '4%', 'Comp\\nNo', 'L', 10);
         $pdf->AddCol('manufacturer_no', '9%', 'Part\\nNo', 'L', 10);
         $pdf->AddCol('description', '16%', 'Item\\nDescription', 'L', 10);
         $pdf->AddCol('karachi', '6%', 'Karachi\\nGodown', 'R', 10);
         $pdf->AddCol('lahore', '6%', 'Lahore\\nGodown', 'R', 10);
         $pdf->AddCol('stock_total', '6%', 'Total', 'R', 10);
         $pdf->AddCol('cost', '5%', 'Cost', 'R', 10);
         $pdf->AddCol('amt', '6%', 'Amount', 'R', 10);
         $pdf->AddCol('reference', '8%', 'Order\\nNo', 'L', 10);
         $pdf->AddCol('o_date', '6%', 'Order\\nDate', 'L', 10);
         $pdf->AddCol('order', '5%', 'Order', 'R', 10);
         $pdf->AddCol('o_rate', '5%', 'Rate', 'R', 10);
         $pdf->AddCol('rec', '6%', 'Receive\\nQuantity', 'R', 10);
         $pdf->AddCol('bal', '6%', 'Balance\\nQuantity', 'R', 10);
         $pdf->AddCol('bal_amt', '6%', 'Balance\\nAmount', 'R', 10);
         $pdf->Table($d, $prop);
         $prop['font'] = array('Arial', 'B', 10);
         $totals = array();
         $totals[] = array('name' => 'Total', 'blank' => '', 'amt' => (double) 0, 'bal' => (double) 0);
         foreach ($d as $t) {
             $totals[0]['amt'] += $t['amt'];
             $totals[0]['bal'] += $t['bal_amt'];
         }
         $pdf->AddCol('name', '52%', 'Total', 'C');
         $pdf->AddCol('amt', '6%', 'Amount', 'R');
         $pdf->AddCol('blank', '36%', 'Blank', 'C');
         $pdf->AddCol('bal', '6%', 'Balance', 'R');
         $pdf->Table($totals, $prop, TRUE, FALSE);
     }
     $pdf->Output("back_order.pdf", "D");
 } else {
// 	con filtro del motivos y depattamento
if ($depto != '-1' and $motivo != '-1' and ($fechai != "" and $fechaf != "")) {
    $query1 = " \nSelect empleado.No_Empleado, CONCAT(Primer_nombre, ' ', Segundo_nombre, ' ', Primer_apellido, ' ', Segundo_Apellido) as Nombre, departamento_laboral.nombre_departamento,motivos.descripcion, \nCOUNT(permisos.id_Permisos) as Solicitudes, SUM(permisos.dias_permiso) as Inasistencias from permisos\n inner join motivos on permisos.id_motivo=motivos.Motivo_ID \n inner join empleado on empleado.No_Empleado=permisos.No_Empleado \n inner join persona on persona.N_identidad=empleado.N_identidad \n inner join departamento_laboral on departamento_laboral.id_departamento_laboral = permisos.id_departamento \n where  departamento_laboral.nombre_departamento='" . $depto . "' and motivos.descripcion='" . $motivo . "' and \n date_format(permisos.fecha,'%d-%m-%Y') between  date_format('" . $fechai . " ','%d-%m-%Y')and date_format('" . $fechaf . "','%d-%m-%Y')\t\n\tGROUP BY Primer_nombre, Segundo_nombre, Primer_apellido, Segundo_Apellido, departamento_laboral.nombre_departamento,motivos.descripcion ORDER BY Primer_nombre asc";
}
// 	por fechas
if ($depto == '-1' and $motivo != '-1') {
    $query1 = " \nSelect empleado.No_Empleado, CONCAT(Primer_nombre, ' ', Segundo_nombre, ' ', Primer_apellido, ' ', Segundo_Apellido) as Nombre, departamento_laboral.nombre_departamento, motivos.descripcion, \nCOUNT(permisos.id_Permisos) as Solicitudes, SUM(permisos.dias_permiso) as Inasistencias from permisos\n inner join motivos on permisos.id_motivo=motivos.Motivo_ID \n inner join empleado on empleado.No_Empleado=permisos.No_Empleado \n inner join persona on persona.N_identidad=empleado.N_identidad \n inner join departamento_laboral on departamento_laboral.id_departamento_laboral = permisos.id_departamento \n where  motivos.descripcion='" . $motivo . "' and \n date_format(permisos.fecha,'%d-%m-%Y') between  date_format('" . $fechai . " ','%d-%m-%Y')and date_format('" . $fechaf . "','%d-%m-%Y')\t\n\tGROUP BY Primer_nombre, Segundo_nombre, Primer_apellido, Segundo_Apellido, departamento_laboral.nombre_departamento,motivos.descripcion ORDER BY Primer_nombre asc";
}
$pdf = new PDF();
$pdf->AddPage("L", "Letter");
$pdf->SetFont('Arial', '', 18);
$pdf->Image($maindir . 'assets/img/lucen-aspicio.png', 50, 15, 200, 200, 'PNG');
$pdf->Image($maindir . 'assets/img/logo_unah.png', 15, 5, 24, 36, 'PNG');
$pdf->Image($maindir . 'assets/img/logo-cienciasjuridicas.png', 230, 8, 35, 35, 'PNG');
$pdf->Cell(22, 10, '', 0);
$pdf->SetFont('Arial', '', 18);
$pdf->Cell(45, 10, '', 0);
$pdf->Cell(70, 10, utf8_decode('Universidad Nacional Autónoma de Honduras'), 0);
$pdf->Ln(10);
$pdf->SetFont('Arial', 'U', 14);
$pdf->Cell(60, 8, '', 0, 0, "C");
$pdf->Cell(130, 8, 'Reportes de Permisos Personales', 0, 0, "C");
$pdf->Ln(25);
//$pdf->AddCol('N',25,'#Empleado','C');
$pdf->AddCol('Nombre', 70, 'Nombre Completo', 'C');
$pdf->AddCol('nombre_departamento', 40, 'Departamento', 'C');
$pdf->AddCol('descripcion', 40, 'Motivo', 'C');
$pdf->AddCol('Solicitudes', 28, 'Solicitudes', 'R');
$pdf->AddCol('Inasistencias', 30, utf8_decode('Días Faltados'), 'R');
$pdf->Table($query1);
$pdf->Output();
Exemple #30
0
{
    function Header()
    {
        //Title
        $this->SetFont('Arial', '', 18);
        $this->SetTextColor(255, 0, 0);
        $this->Cell(0, 6, 'Reporte  De Salidas', 0, 1, 'C');
        $this->Ln(10);
        //Ensure table header is output
        parent::Header();
    }
}
//Connect to database
mysql_connect('127.0.0.1', 'kmendoza0829', '');
mysql_select_db('u334911797_inven');
$fecha1 = $_POST['Fecha1'];
$fecha2 = $_POST['Fecha2'];
$date1 = date_create($fecha1);
$NFecha1 = date_format($date1, 'Y-m-d');
$date2 = date_create($fecha2);
$NFecha2 = date_format($date2, 'Y-m-d');
$pdf = new PDF();
$pdf->AddPage('L');
//First table: put all columns automatically
$prop = array('HeaderColor' => array(118, 216, 238), 'color1' => array(191, 191, 191), 'color2' => array(255, 255, 255), 'padding' => 2);
$pdf->Table('SELECT usuarios.Nombre, usuarios.Apellidos,salidas.FechaSalida,salidas.Cantidad,salidas.HoraSalida, salidas.Estado, productos.Descripcion
FROM usuarios
INNER JOIN salidas ON usuarios.IdUsu = salidas.IdUsu
INNER JOIN productos ON productos.codigo = salidas.codigo
    WHERE salidas.FechaSalida BETWEEN "' . $NFecha1 . '" AND "' . $NFecha2 . '"', $prop);
$pdf->Output();