Beispiel #1
2
 function testpdf()
 {
     $this->load->library('fpdf');
     $this->fpdf->FPDF('P', 'cm', 'A4');
     $this->fpdf->AddPage();
     //$this->fpdf->SetFont('Arial','',10);
     $this->fpdf->setFont('Arial', 'B', 9);
     $teks = "Ini hasil Laporan PDF menggunakan Library FPDF di CodeIgniter";
     $this->fpdf->Cell(3, 0.5, $teks, 1, '0', 'L', true);
     //	$this->fpdf->setFont('Arial','B',7);
     $this->fpdf->Text(8, 1.9, 'Jl.Zambrud I No.35 Sumur Batu - Jakarta Pusat');
     $this->fpdf->Line(15.6, 2.1, 5, 2.1);
     $this->fpdf->Text(8, 1.9, 'Jl.Zambrud I No.35 Sumur Batu - Jakarta Pusat');
     //$this->fpdf->Ln();
     $this->fpdf->Output();
     $this->load->library('pdf');
     $pdf = new PDF();
     $pdf->SetMargins(1, 1);
     $pdf->AddPage();
     $pdf->SetFont('Arial', 'B', 14);
     $pdf->Cell(0, 0.5, 'Hellol Ci', 0, 1, 'C');
     $pdf->Output();
     /*
     	$this->load->library('fpdf');
     	$this->fpdf->FPDF('P','cm','A4');
     	$this->fpdf->Ln();
     	$this->fpdf->setFont('Arial','B',9);
     	$this->fpdf->Text(7.5,1,"DAFTAR PENJUALAN BULAN ");
     	$this->fpdf->setFont('Arial','B',9);
     	$this->fpdf->Text(8.3,1.5,'KOMUNITAS MUSISI INDONESIA');
     	$this->fpdf->setFont('Arial','B',7);
     	$this->fpdf->Text(8,1.9,'Jl.Zambrud I No.35 Sumur Batu - Jakarta Pusat');
     	 
     	$this->fpdf->Line(15.6,2.1,5,2.1);             
     	$this->fpdf->ln(1.6);
     	$this->fpdf->ln(0.3);
     	$this->fpdf->Output(); 
     */
 }
 public function getPDF()
 {
     /*$pdf = new PDF();
       $docentes = Docente::all();
       $columnas = ['NRO','CODIGO','APELLIDOS Y NOMBRES'];
       $pdf->SetFont('Arial','B',13);
       $pdf->AddPage();
       $pdf->Cell(80);
       $pdf->Cell(30,5,'Lista de Docentes',0,1,'C');
       $pdf->SetFont('Arial','B',9);
       $pdf->Ln(2);
       $pdf->SetFont('Arial','B',10);
       $pdf->docentes($columnas,$docentes);
       $cabe=['Content-Type' => 'application/pdf'];
       return Response::make($pdf->_checkoutput(),200,$cabe);*/
     $fpdf = new PDF();
     $docentes = Docente::all();
     $columnas = ['NRO', 'CODIGO', 'APELLIDOS Y NOMBRES'];
     $fpdf->AddPage();
     $fpdf->Cell(80);
     $fpdf->Cell(30, 5, 'Lista de Docentes', 0, 1, 'C');
     $fpdf->SetFont('Arial', 'B', 9);
     $fpdf->Ln(2);
     $fpdf->SetFont('Arial', 'B', 16);
     $fpdf->docentes($columnas, $docentes);
     $fpdf->Output();
     exit;
 }
Beispiel #3
0
 public function index()
 {
     $pdf = new PDF();
     $pdf->AliasNbPages();
     $pdf->AddPage();
     $pdf->SetFont('Times', '', 12);
     for ($i = 1; $i <= 40; $i++) {
         $pdf->Cell(0, 10, 'Printing line number ' . $i, 0, 1);
     }
     $pdf->Output();
 }
Beispiel #4
0
 function index()
 {
     // Instanciation of inherited class
     $pdf = new PDF();
     $pdf->AliasNbPages();
     $pdf->AddPage();
     $pdf->SetFont('Times', '', 12);
     for ($i = 1; $i <= 40; $i++) {
         $pdf->Cell(0, 10, 'Printing line number ' . $i, 0, 1);
     }
     $pdf->Output();
 }
 public function actionDownload()
 {
     parent::actionDownload();
     $pdf = new PDF();
     $pdf->title = 'Material Stock Overview List';
     $pdf->AddPage('L');
     $pdf->setFont('Arial', 'B', 12);
     // definisi font
     $pdf->setFont('Arial', 'B', 8);
     // menuliskan tabel
     $header = array('No', 'ID', 'Material Name', 'Sloc', 'Qty', 'UOM', 'Prod Trans Type', 'Ref Source');
     $model = new Productstock('search');
     $dataprovider = $model->search();
     $dataprovider->pagination = false;
     $data = $dataprovider->getData();
     $cols = $dataprovider->getKeys();
     $dataku = array(count($data));
     //var_dump($dataku);
     $w = array(10, 15, 70, 30, 30, 30, 40, 30);
     $pdf->SetTableHeader();
     //Header
     for ($i = 0; $i < count($header); $i++) {
         $pdf->Cell($w[$i], 7, $header[$i], 1, 0, 'C', true);
     }
     $pdf->Ln();
     $pdf->SetTableData();
     //Data
     $fill = false;
     $i = 0;
     foreach ($data as $datas) {
         $i = $i + 1;
         $pdf->Cell($w[0], 6, $i, 'LR', 0, 'L', $fill);
         $pdf->Cell($w[1], 6, $datas['productstockid'], 'LR', 0, 'L', $fill);
         $pdf->Cell($w[2], 6, Product::model()->findbypk($datas['productid'])->productname, 'LR', 0, 'L', $fill);
         $pdf->Cell($w[3], 6, Sloc::model()->findbypk($datas['slocid'])->sloccode, 'LR', 0, 'L', $fill);
         $pdf->Cell($w[4], 6, $datas['qty'], 'LR', 0, 'L', $fill);
         $pdf->Cell($w[5], 6, Unitofmeasure::model()->findbypk($datas['unitofmeasureid'])->uomcode, 'LR', 0, 'L', $fill);
         $pdf->Cell($w[6], 6, Prodtranstype::model()->findbypk($datas['prodtranstypeid'])->description, 'LR', 0, 'L', $fill);
         $pdf->Cell($w[7], 6, $datas['refsource'], 'LR', 0, 'L', $fill);
         $pdf->Ln();
         $fill = !$fill;
     }
     $pdf->Cell(array_sum($w), 0, '', 'T');
     // me-render ke browser
     $pdf->Output('productstock.pdf', 'D');
 }
 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();
 }
}
//Instancia a classe gerador de pdf
$pdf = new PDF();
//Define os atributos de propriedade do arquivo PDF
$pdf->SetCreator('work | eventos');
$pdf->SetAuthor($usuarioNome . " - " . $empresaNome);
$pdf->SetTitle('Relação de Momentos de Repertório');
$pdf->SetSubject('Relatório gerado automaticamente pelo sistema');
$pdf->AliasNbPages();
$pdf->AddPage();
//Títulos das colunas
$pdf->SetFont('Arial', 'B', 10);
//Define a cor RGB do fundo da celula
$pdf->SetFillColor(178, 178, 178);
//Faz a célula ser preenchida. Isso é feito setando 1 após a expressao de alinhamento
$pdf->Cell(0, 6, 'Descrição do Momento de Repertório', 1, 0, 'L', 1);
$pdf->SetX(170);
$pdf->Cell(0, 6, 'Ativo');
//Monta as linhas com os dados da query
$pdf->SetFont('Arial', '', 10);
while ($dados = mysql_fetch_array($sql)) {
    switch ($dados[ativo]) {
        case 0:
            $ativo = "Inativo";
            break;
        case 1:
            $ativo = "Ativo";
            break;
    }
    $pdf->ln();
    $pdf->Cell(0, 5, $dados['nome']);
>> SEE: function setLGUinfo (line # 22)
$pdf->setLGUinfo($getlgu[0],$getprov[0],$resulta[2]);
===========================================================*/
$pdf->setLGUinfo($getprov[0], $getlgu[0], $resulta[2]);
$pdf->setYears($dateprev, $datenext, $datenextnext);
$pdf->AddPage();
$pdf->AliasNbPages();
$getnat = @mysql_query("select * from ebpls_buss_nature");
$Y_Label_position = 50;
$Y_Table_Position = 55;
//header
$dateprinted = date('Y-m-d');
$pdf->SetFont('Arial', 'B', 6);
$pdf->SetY($Y_Label_position);
$pdf->SetX(5);
$pdf->Cell(340, 5, $dateprinted, 0, 1, 'R');
$pdf->SetFont('Arial', 'B', 6);
$pdf->SetY($Y_Label_position + 10);
$pdf->SetX(5);
$pdf->Cell(100, 10, 'LINE OF BUSINESS', 1, 0, 'C');
$pdf->SetX(105);
$pdf->Cell(60, 5, $dateprev, 1, 0, 'C');
$pdf->SetX(165);
$pdf->Cell(60, 5, $datenext, 1, 0, 'C');
$pdf->SetX(225);
$pdf->Cell(60, 5, $datenextnext, 1, 0, 'C');
$pdf->SetY($Y_Label_position + 15);
$pdf->SetX(5);
$pdf->Cell(100, 5, '', 0, 0, 'C');
$pdf->SetX(105);
$pdf->Cell(30, 5, 'New', 1, 0, 'C');
     while ($rData = mysql_fetch_assoc($qData)) {
         $data = '';
         $sDatabatch = "select distinct tanggaltanam,supplerid,jenisbibit,tanggalproduksi from " . $dbname . ".bibitan_batch where batch='" . $rData['batch'] . "' ";
         $qDataBatch = mysql_query($sDatabatch) or die(mysql_error($sDatabatch));
         $rDataBatch = mysql_fetch_assoc($qDataBatch);
         $thnData = substr($rDataBatch['tanggaltanam'], 0, 4);
         $starttime = strtotime($rDataBatch['tanggaltanam']);
         //time();// tanggal sekarang
         $endtime = strtotime($tglSkrng);
         //tanggal pembuatan dokumen
         $timediffSecond = abs($endtime - $starttime);
         $base_year = min(date("Y", $thnData), date("Y", $thnSkrng));
         $diff = mktime(0, 0, $timediffSecond, 1, 1, $base_year);
         $jmlHari = date("j", $diff) - 1;
         $no += 1;
         $pdf->Cell(3 / 100 * $width, $height, $no, 1, 0, 'C', 1);
         $pdf->Cell(8 / 100 * $width, $height, $rData['batch'], 1, 0, 'C', 1);
         $pdf->Cell(17 / 100 * $width, $height, $optNm[$rData['kodeorg']], 1, 0, 'C', 1);
         $pdf->Cell(8 / 100 * $width, $height, number_format($rData['jumlah'], 0), 1, 0, 'R', 1);
         $pdf->Cell(11 / 100 * $width, $height, $rDataBatch['jenisbibit'], 1, 0, 'C', 1);
         $pdf->Cell(8 / 100 * $width, $height, tanggalnormal($rDataBatch['tanggaltanam']), 1, 0, 'C', 1);
         $pdf->Cell(8 / 100 * $width, $height, $jmlHari, 1, 1, 'C', 1);
         $total += $rData['jumlah'];
     }
     $pdf->Cell(28 / 100 * $width, $height, $_SESSION['lang']['total'], 1, 0, 'C', 1);
     $pdf->Cell(8 / 100 * $width, $height, number_format($total), 1, 0, 'R', 1);
     $pdf->Cell(27 / 100 * $width, $height, "", 1, 1, 'R', 1);
     $pdf->Output();
     break;
 case 'excel':
     $tab = "\n            <table>\n            <tr><td colspan=7 align=center>" . $_SESSION['lang']['laporanStockBIbit'] . "</td></tr>\n            <tr><td colspan=7></td><td></td></tr>\n            </table>\n            <table cellpadding=1 cellspacing=1 border=1 class=sortable>\n            <thead>\n            <tr class=rowheader>\n            <td bgcolor=#DEDEDE align=center>" . substr($_SESSION['lang']['nomor'], 0, 2) . "</td>\n            <td bgcolor=#DEDEDE align=center>" . $_SESSION['lang']['batch'] . "</td>\n            <td bgcolor=#DEDEDE align=center>" . $_SESSION['lang']['kodeorg'] . "</td>\n            <td bgcolor=#DEDEDE align=center>" . $_SESSION['lang']['saldo'] . "</td>\n            <td bgcolor=#DEDEDE align=center>" . $_SESSION['lang']['jenisbibit'] . "</td>\n            <td bgcolor=#DEDEDE align=center>" . $_SESSION['lang']['tgltanam'] . "</td>   \n            <td bgcolor=#DEDEDE align=center>" . $_SESSION['lang']['umur'] . " " . substr($_SESSION['lang']['afkirbibit'], 5) . "</td>\n            </tr>\n            </thead><tbody id=containDataStock>";
Beispiel #10
0
        // Logo
        $this->Image('logo_pb.png', 10, 8, 33);
        // Arial bold 15
        $this->SetFont('Arial', 'B', 15);
        // Movernos a la derecha
        $this->Cell(80);
        // Título
        $this->Cell(30, 10, 'Title', 1, 0, 'C');
        // Salto de línea
        $this->Ln(20);
    }
    // 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() . '/{nb}', 0, 0, 'C');
    }
}
// Creación del objeto de la clase heredada
$pdf = new PDF();
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetFont('Times', '', 12);
for ($i = 1; $i <= 40; $i++) {
    $pdf->Cell(0, 10, 'Imprimiendo línea número ' . $i, 0, 1);
}
$pdf->Output();
$pdf->SetX(5);
$pdf->SetFont('Amble-Regular', '', 9);
$total = 0;
$sub = 0;
$repetido = 0;
$contador = 0;
$consulta = pg_query("select id_cliente,identificacion,nombres_cli,telefono,direccion_cli from clientes");
while ($row = pg_fetch_row($consulta)) {
    $repetido = 0;
    $total = 0;
    $sql1 = pg_query("select id_factura_venta,num_factura,num_autorizacion,fecha_autorizacion,fecha_caducidad FROM factura_venta where id_cliente='{$row['0']}' and estado='Activo' and fecha_caducidad between '{$fecha}' and '{$_GET['fin']}'");
    if (pg_num_rows($sql1)) {
        if ($repetido == 0) {
            $pdf->SetX(1);
            $pdf->SetFillColor(221, 221, 221);
            $pdf->Cell(80, 6, utf8_decode('RUC/CI: ' . $row[1]), 1, 0, 'L', 1);
            $pdf->Cell(125, 6, utf8_decode('NOMBRE: ' . $row[2]), 1, 1, 'L', 1);
            $pdf->SetX(1);
            $pdf->Cell(80, 6, utf8_decode('TELF.: ' . $row[3]), 1, 0, 'L', 1);
            $pdf->Cell(125, 6, utf8_decode('DIRECCIÓN:  ' . $row[4]), 1, 1, 'L', 1);
            $pdf->Ln(2);
            $pdf->SetX(1);
            $pdf->Cell(40, 6, utf8_decode("Nro Factura"), 1, 0, 'C', 0);
            $pdf->Cell(35, 6, utf8_decode("Tipo Documento"), 1, 0, 'C', 0);
            $pdf->Cell(50, 6, utf8_decode("Nro. Autorización"), 1, 0, 'C', 0);
            $pdf->Cell(40, 6, utf8_decode("Fecha Autorización"), 1, 0, 'C', 0);
            $pdf->Cell(40, 6, utf8_decode("Fecha caducidad"), 1, 1, 'C', 0);
            $repetido = 1;
        }
        while ($row1 = pg_fetch_row($sql1)) {
            $pdf->SetX(1);
        $this->Cell(0, 3, 'Emitido por: ' . $usuarioNome);
    }
}
//Instancia a classe gerador de pdf
$pdf = new PDF();
//Define os atributos de propriedade do arquivo PDF
$pdf->SetCreator('*****@*****.**');
$pdf->SetAuthor($usuarioNome . " - " . $empresaNome);
$pdf->SetTitle('Detalhamento do cliente');
$pdf->SetSubject('Relatório gerado automaticamente pelo sistema');
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetY(25);
$pdf->SetFont('Arial', 'B', 10);
$pdf->SetFillColor(178, 178, 178);
$pdf->Cell(0, 6, 'Detalhamento do Cliente', 1, 0, 'C', 1);
//Nova Linha
$pdf->ln();
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(0, 6, 'Tipo Cliente:', 1, 0, 'L');
$pdf->SetFont('Arial', 'I', 9);
$pdf->SetX(39);
$pdf->Cell(0, 6, $conta_descricao, 0, 0, 'L');
$pdf->SetX(57);
$pdf->SetFont('Arial', 'B', 9);
$pdf->Cell(0, 6, 'Nome/Razão Social:', 1, 0, 'L');
$pdf->SetFont('Arial', 'I', 9);
$pdf->SetX(88);
$pdf->Cell(0, 6, $dados_conta['nome'], 0, 0, 'L');
$pdf->Image($conta_figura, 35, 32, 4, 4);
//Nova Linha
     $rNm = mysql_fetch_assoc($qNm);
     $nm = $rNm['namaorganisasi'];
     $kd = $rData['kodeorg'];
     if (empty($nm)) {
         $sNm = "select namasupplier from " . $dbname . ".log_5supplier where kodetimbangan='" . $rData['kodecustomer'] . "'";
         $qNm = mysql_query($sNm) or die(mysql_error());
         $rNm = mysql_fetch_assoc($qNm);
         $nm = $rNamaSupp[$rData['kodecustomer']]['namasupplier'];
     }
 } else {
     $nm = $rNamaSupp[$rData['kodecustomer']]['namasupplier'];
 }
 $no += 1;
 $pdf->SetFont('Arial', '', 6);
 $brtNormal = $rData['netto'] - $rData['kgpotsortasi'];
 $pdf->Cell(3 / 100 * $width, $height, $no, 1, 0, 'C', 1);
 $pdf->Cell(8 / 100 * $width, $height, tanggalnormal($rData['tanggal']), 1, 0, 'C', 1);
 $pdf->Cell(15 / 100 * $width, $height, $nm, 1, 0, 'L', 1);
 $pdf->Cell(7 / 100 * $width, $height, $rData['notransaksi'], 1, 0, 'L', 1);
 $pdf->Cell(9 / 100 * $width, $height, $rData['nokendaraan'], 1, 0, 'L', 1);
 $pdf->Cell(8 / 100 * $width, $height, number_format($rData['netto']), 1, 0, 'R', 1);
 $pdf->Cell(8 / 100 * $width, $height, number_format($rData['kgpotsortasi']), 1, 0, 'R', 1);
 $pdf->Cell(8 / 100 * $width, $height, number_format($brtNormal), 1, 0, 'R', 1);
 $pdf->SetFont('Arial', '', 5);
 $pdf->Cell(7 / 100 * $width, $height, $rData['supir'], 1, 0, 'L', 1);
 $pdf->SetFont('Arial', '', 6);
 setIt($kamusharga[$rData['millcode']][$rData['tanggal']][$rData['kodecustomer']][$rData['kriteriabuah']], 0);
 $harga = $brtNormal * $kamusharga[$rData['millcode']][$rData['tanggal']][$rData['kodecustomer']][$rData['kriteriabuah']];
 //                        if($tipeIntex==0)$pdf->Cell(10/100*$width,$height,number_format($harga),1,0,'R',1); else
 $pdf->Cell(15 / 100 * $width, $height, $rData['nospb'], 1, 0, 'L', 1);
 $pdf->Cell(8 / 100 * $width, $height, number_format($rData['jjg'], 2), 1, 0, 'R', 1);
/*
 * 22/08/2009 00:53:38 CEST Claudio Giordano
 *
 * Dettaglio tabella:
 */
foreach ($Risultati as $key => $field) {
    if ($field['n_protocollo'] == "") {
        $Proto = "-";
    } else {
        $Proto = $field['n_protocollo'];
    }
    switch ($_GET['tipo']) {
        case "movimenti":
            //<!-- Intestazione movimento !-->
            $pdf->SetFont('Arial', 'B', 9);
            $pdf->Cell(45, 4, $field['id_piano_conti'] . " - " . Inverti_Data($field['data_reg']), 0, '', 'R');
            $pdf->Cell(100, 4, $Proto, 0);
            $pdf->Cell(30, 4, $field['cod_documento'], 0);
            $pdf->Cell(45, 4, Inverti_Data($field['data_doc']), 0);
            $pdf->Cell(45, 4, $field['tipo_doc'], 0);
            $pdf->Cell(25, 4, '', 0);
            $pdf->Ln();
            $pdf->SetFont('Arial', '', 9);
            //<!-- Dettaglio movimento !-->
            $DettaglioOp = GetRows("view_piano_conti", "id_piano_conti = '" . $field['id_piano_conti'] . "'", "", $db);
            foreach ($DettaglioOp as $key_dett => $field_dett) {
                $TotDare += $field_dett['importo_d'];
                $TotAvere += $field_dett['importo_a'];
                $pdf->Cell(45, 4, $bullet, 0, '', 'R');
                if ($field_dett['req_anag'] == 0) {
                    $Sottoconto = "(" . $field_dett['codice_sottoconto'] . ") " . $field_dett['ragione_sociale'];
            $row['amt'] = number_format($row['amt']);
            $data[] = $row;
        }
        $result->close();
        $pdf->AddCol('sno', '5%', 'S#', 'C');
        $pdf->AddCol('item', '50%', 'Item', 'L');
        $pdf->AddCol('pr_qty', '15%', 'Quantity', 'R');
        $pdf->AddCol('pr_rate', '15%', 'Rate', 'R');
        $pdf->AddCol('amt', '15%', 'Amount', 'R');
        $pdf->Table($data, $prop);
        $_cMargin = $pdf->cMargin;
        $pdf->cMargin = $prop['padding'];
        $pdf->SetFont($prop['thfont'][0], $prop['thfont'][1], $prop['thfont'][2]);
        $width = $pdf->w - $pdf->lMargin - $pdf->rMargin;
        $cellSize = 0.01 * $width;
        $pdf->Cell($cellSize * 45, 6, 'Total', 0, 0, 'C', false);
        $pdf->Cell($cellSize * 20, 6, number_format($total['qty']), 0, 0, 'R', false);
        $pdf->Cell($cellSize * 15, 6, '', 0, 0, 'L', false);
        $pdf->Cell($cellSize * 20, 6, number_format($total['amt']), 0, 0, 'R', false);
        $pdf->Ln();
        $pdf->Cell($cellSize * 100, 5, convertCurrency($total['amt'], getCurrencySymbol($_SESSION['company_id'])) . " only", 0, 0, 'L');
        $pdf->Ln();
        $pdf->cMargin = $_cMargin;
    }
    $mysqli->close();
    $pdf->Output("purchase_return.pdf", "D");
} else {
    ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
Beispiel #16
0
    private function printHeader($format, $printFields, $startDate, $endDate)
    {
        if ($format == 'pdf' || $format == 'pdfl') {
            ob_end_clean();
            $pdf = new PDF($format == 'pdf' ? 'P' : 'L', 'mm', 'A4', _CHARSET_ == 'UTF-8', _CHARSET_, false);
            $pdf->setTopMargin(20);
            $pdf->headerRight = $GLOBALS['locReportPage'];
            $pdf->printHeaderOnFirstPage = true;
            $pdf->AddPage();
            $pdf->SetAutoPageBreak(TRUE, 15);
            $pdf->setY(10);
            $pdf->SetFont('Helvetica', 'B', 12);
            $pdf->Cell(100, 15, $GLOBALS['locInvoiceReport'], 0, 1, 'L');
            if ($startDate || $endDate) {
                $pdf->SetFont('Helvetica', '', 8);
                $pdf->Cell(25, 15, $GLOBALS['locDateInterval'], 0, 0, 'L');
                $pdf->Cell(50, 15, dateConvDBDate2Date($startDate) . ' - ' . dateConvDBDate2Date($endDate), 0, 1, 'L');
            }
            $pdf->SetFont('Helvetica', 'B', 8);
            if (in_array('invoice_no', $printFields)) {
                $pdf->Cell(18, 4, $GLOBALS['locInvoiceNumber'], 0, 0, 'L');
            }
            if (in_array('invoice_date', $printFields)) {
                $pdf->Cell(20, 4, $GLOBALS['locInvDate'], 0, 0, 'L');
            }
            if (in_array('due_date', $printFields)) {
                $pdf->Cell(20, 4, $GLOBALS['locDueDate'], 0, 0, 'L');
            }
            if (in_array('payment_date', $printFields)) {
                $pdf->Cell(20, 4, $GLOBALS['locPaymentDate'], 0, 0, 'L');
            }
            if (in_array('company_name', $printFields)) {
                $pdf->Cell(45, 4, $GLOBALS['locPayer'], 0, 0, 'L');
            }
            if (in_array('status', $printFields)) {
                $pdf->Cell(20, 4, $GLOBALS['locInvoiceState'], 0, 0, 'L');
            }
            if (in_array('ref_number', $printFields)) {
                $pdf->Cell(25, 4, $GLOBALS['locReferenceNumber'], 0, 0, 'L');
            }
            if (in_array('sums', $printFields)) {
                $pdf->Cell(25, 4, $GLOBALS['locVATLess'], 0, 0, 'R');
                $pdf->Cell(25, 4, $GLOBALS['locVATPart'], 0, 0, 'R');
                $pdf->Cell(25, 4, $GLOBALS['locWithVAT'], 0, 1, 'R');
            }
            $this->pdf = $pdf;
            return;
        }
        ?>
    <div class="report">
    <table>
    <tr>
      <?php 
        if (in_array('invoice_no', $printFields)) {
            ?>
        <th class="label">
            <?php 
            echo $GLOBALS['locInvoiceNumber'];
            ?>
        </th>
      <?php 
        }
        if (in_array('invoice_date', $printFields)) {
            ?>
        <th class="label">
            <?php 
            echo $GLOBALS['locInvDate'];
            ?>
        </th>
      <?php 
        }
        if (in_array('due_date', $printFields)) {
            ?>
        <th class="label">
            <?php 
            echo $GLOBALS['locDueDate'];
            ?>
        </th>
      <?php 
        }
        if (in_array('payment_date', $printFields)) {
            ?>
        <th class="label">
            <?php 
            echo $GLOBALS['locPaymentDate'];
            ?>
        </th>
        <?php 
        }
        if (in_array('company_name', $printFields)) {
            ?>
        <th class="label">
            <?php 
            echo $GLOBALS['locPayer'];
            ?>
        </th>
      <?php 
        }
        if (in_array('status', $printFields)) {
            ?>
        <th class="label">
            <?php 
            echo $GLOBALS['locInvoiceState'];
            ?>
        </th>
      <?php 
        }
        if (in_array('ref_number', $printFields)) {
            ?>
        <th class="label">
            <?php 
            echo $GLOBALS['locReferenceNumber'];
            ?>
        </th>
      <?php 
        }
        if (in_array('sums', $printFields)) {
            ?>
        <th class="label" style="text-align: right">
            <?php 
            echo $GLOBALS['locVATLess'];
            ?>
        </th>
        <th class="label" style="text-align: right">
            <?php 
            echo $GLOBALS['locVATPart'];
            ?>
        </th>
        <th class="label" style="text-align: right">
            <?php 
            echo $GLOBALS['locWithVAT'];
            ?>
        </th>
      <?php 
        }
        ?>
    </tr>
<?php 
    }
Beispiel #17
0
    $where .= " AND nombrecobrador like '%" . $nombrecobrador . "%'";
}
$where2 .= " ORDER BY nombrecobrador ASC";
//Ttulos de las columnas
$header = array('Cod. Cobrador', 'Nombre Cobrador');
//Colores, ancho de lnea y fuente en negrita
$pdf->SetFillColor(200, 200, 200);
$pdf->SetTextColor(0);
$pdf->SetDrawColor(0, 0, 0);
$pdf->SetLineWidth(0.2);
$pdf->SetFont('Arial', 'B', 8);
//Cabecera
$pdf->SetX(60);
$w = array(20, 60);
for ($i = 0; $i < count($header); $i++) {
    $pdf->Cell($w[$i], 7, $header[$i], 1, 0, 'C', 1);
}
$pdf->Ln();
$pdf->SetFont('Arial', '', 8);
$sel_resultado = "SELECT * FROM cobradores WHERE borrado=0 AND " . $where . $where2;
$res_resultado = mysql_query($sel_resultado);
$contador = 0;
while ($contador < mysql_num_rows($res_resultado)) {
    $pdf->SetX(60);
    $pdf->Cell($w[0], 5, mysql_result($res_resultado, $contador, "codcobrador"), 'LRTB', 0, 'C');
    $pdf->Cell($w[1], 5, mysql_result($res_resultado, $contador, "nombrecobrador"), 'LRTB', 0, 'C');
    $pdf->Ln();
    $contador++;
}
$pdf->Output($name = "Listado de Cobradores.pdf", 'D');
?>
Beispiel #18
0
     while (isset($plan[$pp]->datum) and $termine[$t]->datum == $plan[$pp]->datum and $termine[$t]->typ_id == $plan[$pp]->lid) {
         if ($content_detail !== "") {
             $termin_length += $zelle;
             $content_detail .= "\n";
         }
         $content_detail .= utf8_decode($plan[$pp]->hname) . " - " . utf8_decode($plan[$pp]->gname);
         $pp++;
     }
 }
 $termin_length = $termin_length * 5;
 //echo '<br>Termin: '.$termine[$t]->typ.' GetY: '.$pdf->GetY().'  Page: '.$page_length.' TerminL: '.$termin_length;
 if ($pdf->GetY() > $page_length - $termin_length or $tt == 0) {
     $tt = 0;
     $pdf->AddPage();
     $pdf->SetFont('Times', '', $date_font);
     $pdf->Cell(10, 3, ' ', 0, 0);
     $pdf->Cell(175, 3, utf8_decode(JText::_('WRITTEN')) . ' ' . utf8_decode(JText::_('ON_DAY')) . ' ' . utf8_decode(JHTML::_('date', $now, JText::_('DATE_FORMAT_CLM_PDF'))), 0, 1, 'R');
     $pdf->SetFont('Times', '', $head_font);
     $pdf->Cell(10, 10, ' ', 0, 0);
     $pdf->Cell(150, 10, utf8_decode(JText::_('TERMINE_HEAD')), 0, 1, 'L');
 }
 $pdf->SetFont('Times', '', $font);
 $pdf->SetTextColor(0);
 $pdf->SetFillColor(255);
 // Monatsberechnungen
 if ($t1 == 1 or $datum_arr[$t][1] > $datum_arr[$t - 1][1] or $datum_arr[$t][0] > $datum_arr[$t - 1][0]) {
     // Jahresberechnungen
     if ($t1 == 1 or $datum_arr[$t][0] > $datum_arr[$t - 1][0]) {
         $tt++;
         $pdf->SetTextColor(255);
         $pdf->SetFillColor(90);
}
if ($SecUser->admin == 1) {
    $str = ' Super Admin';
    $admin = 1;
}
//-----------------------------------------------------
// Print result
$pdf = new PDF($cn);
$pdf->setDossierInfo(dossier::name() . ' Sécurité');
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetAuthor('NOALYSS');
$pdf->setTitle("Sécurité", true);
$str_user = sprintf("( %d ) %s %s [ %s ] - %s", $SecUser->id, $SecUser->first_name, $SecUser->name, $SecUser->login, $str);
$pdf->SetFont('DejaVu', 'B', 9);
$pdf->Cell(0, 7, $str_user, 'B', 0, 'C');
$pdf->Ln();
if ($SecUser->active == 0) {
    $pdf->SetTextColor(255, 0, 34);
    $pdf->Cell(0, 7, 'Bloqué', 0, 0, 'R');
    $pdf->Ln();
}
if ($SecUser->admin == 1) {
    $pdf->SetTextColor(0, 0, 0);
    $pdf->setFillColor(239, 251, 255);
    $pdf->Cell(40, 7, 'Administrateur', 1, 1, 'R');
    $pdf->Ln();
}
$pdf->SetTextColor(0, 0, 0);
//-----------------------------------------------------
// Journal
 if ($xx2 > 0) {
     $yy0 = $yy1 - 4 * $xx2;
 } else {
     $yy0 = $yy1;
 }
 $xx = 0;
 if ($x == 0) {
     $xx = 1;
 } elseif ($pdf->GetY() > $yy0) {
     $xx = 1;
 }
 if ($xx == 1) {
     //if (($x == 0)||($x == 4)||($x == 8)) {
     $pdf->AddPage();
     $pdf->SetFont('Times', '', 7);
     $pdf->Cell(10, 3, ' ', 0, 0);
     $pdf->Cell(175, 3, utf8_decode(JText::_('WRITTEN')) . ' ' . utf8_decode(JText::_('ON_DAY')) . ' ' . utf8_decode(JHTML::_('date', $now, JText::_('%d. %B %Y ,  %H %M'))), 0, 1, 'R');
     $pdf->SetFont('Times', '', 14);
     $pdf->Cell(10, 15, ' ', 0, 0);
     $pdf->Cell(80, 15, utf8_decode($liga[0]->name) . " " . utf8_decode($saison[0]->name), 0, 1, 'L');
     $pdf->SetFont('Times', '', $font);
     $pdf->Cell(10, $zelle, JText::_('MELDELISTE_NR'), 0, 0, 'C');
     $pdf->Cell(60, $zelle, JText::_('TEAM') . "/" . JText::_('CLUB_LOCATION'), 0, 0, 'L');
     $pdf->Cell(10, $zelle, JText::_('MELDELISTE_REGULAR'), 0, 0, 'C');
     $pdf->Cell($breite1, $zelle, JText::_('MELDELISTE_NAME'), 0, 0, 'L');
     $pdf->Cell(10, $zelle, JText::_('DWZ'), 0, 0, 'R');
     $pdf->Cell(10, $zelle, '', 0, 0, 'R');
     $pdf->Cell(10, $zelle, JText::_('MELDELISTE_SUBSTITUTE'), 0, 0, 'C');
     $pdf->Cell($breite1, $zelle, JText::_('MELDELISTE_NAME'), 0, 0, 'L');
     $pdf->Cell(10, $zelle, JText::_('DWZ'), 0, 1, 'R');
     $pdf->Ln();
Beispiel #21
0
     $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");
         $strDate = $_GET['date_start'];
         if (strlen($_GET['date_end']) > 0) {
             $strDate .= " ~ " . $_GET['date_end'];
         }
Beispiel #22
0
        $this->SetFont('Arial', '', 9);
        $this->SetTextColor(150, 150, 150);
        $this->Cell(0, 0, chr(169) . ' ' . appconf('company_name') . ', ' . date('Y') . '  For further information, visit us online at ' . appconf('company_website'), 0, 0, 'R');
        $this->SetTextColor(0);
    }
}
// end PDF
$pdf = new PDF();
$pdf->SetFont('Arial', '', 10);
$pdf->Open();
$pdf->SetDisplayMode(150, 'single');
$pdf->SetLeftMargin(15);
$pdf->SetRightMargin(15);
$pdf->SetFillColor(240, 240, 240);
$pdf->AddPage();
$pdf->Cell(0, 5, ' ', 0, 1, 'C');
$pdf->Ln();
// heading
$pdf->SetFont('Arial', '', 10);
//$pdf->Cell (0, 5, 'Simian Systems Inc.', 0, 1, 'R');
$pdf->SetFont('Arial', '', 10);
$pdf->Cell(0, 5, appconf('company_address'), 0, 1, 'R');
$pdf->SetLeftMargin(131.5);
$pdf->WriteHTML('tel: ' . appconf('company_phone') . ', web: <a href="http://' . appconf('company_website') . '/">' . appconf('company_website') . '</a>');
$pdf->SetLeftMargin(15);
$pdf->Ln();
$pdf->Cell(0, 5, ' ', 0, 1, 'C');
$pdf->Ln();
// client info
$client = db_single('select * from siteinvoice_client where id = ?', $cgi->client);
$pdf->SetFont('Arial', 'B', 10);
}
// 	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->Ln();
 //    $pdf->Cell($wkiri/100*$width,$height,$_SESSION['lang']['cpodihasilkan'],1,0,'L',1);
 //    $pdf->Cell($wlain/100*$width,$height,number_format($bireal_cpo,0),1,0,'R',1);
 //    $pdf->Cell($wlain/100*$width,$height,number_format($bibudget_cpo,0),1,0,'R',1);
 //    $pdf->Cell($wlain/100*$width,$height,number_format($biselisih_cpo,0),1,0,'R',1);
 //    $pdf->Cell($wlain/100*$width,$height,number_format($sdbireal_cpo,0),1,0,'R',1);
 //    $pdf->Cell($wlain/100*$width,$height,number_format($sdbibudget_cpo,0),1,0,'R',1);
 //    $pdf->Cell($wlain/100*$width,$height,number_format($sdbiselisih_cpo,0),1,0,'R',1);
 //    $pdf->Ln();
 if (!empty($kodeorg)) {
     foreach ($kodeorg as $lst_station) {
         # Selisih Station BI
         $biselisih_st = $bi_budst[$lst_station] - $bi_realst[$lst_station];
         # Selisih Station SDBI
         $sdbiselisih_st = $sdbi_budst[$lst_station] - $sdbi_realst[$lst_station];
         $pdf->Cell($wkiri / 100 * $width, $height, $station[$lst_station], 1, 0, 'L', 1);
         $pdf->Cell($wlain / 100 * $width, $height, number_format($bi_realst[$lst_station], 0), 1, 0, 'R', 1);
         $pdf->Cell($wlain / 100 * $width, $height, number_format($bi_budst[$lst_station], 0), 1, 0, 'R', 1);
         $pdf->Cell($wlain / 100 * $width, $height, number_format($biselisih_st, 0), 1, 0, 'R', 1);
         $pdf->Cell($wlain / 100 * $width, $height, number_format($sdbi_realst[$lst_station]), 1, 0, 'R', 1);
         $pdf->Cell($wlain / 100 * $width, $height, number_format($sdbi_budst[$lst_station], 0), 1, 0, 'R', 1);
         $pdf->Cell($wlain / 100 * $width, $height, number_format($sdbiselisih_st, 0), 1, 0, 'R', 1);
         $pdf->Ln();
     }
 }
 $pdf->Cell($wkiri / 100 * $width, $height, 'Undefined Station', 1, 0, 'L', 1);
 $pdf->Cell($wlain / 100 * $width, $height, number_format($bi_realst[''], 0), 1, 0, 'R', 1);
 $pdf->Cell($wlain / 100 * $width, $height, number_format($bi_budst[''], 0), 1, 0, 'R', 1);
 $pdf->Cell($wlain / 100 * $width, $height, number_format($biselisih_undef, 0), 1, 0, 'R', 1);
 $pdf->Cell($wlain / 100 * $width, $height, number_format($sdbi_realst[''], 0), 1, 0, 'R', 1);
 $pdf->Cell($wlain / 100 * $width, $height, number_format($sdbi_budst[''], 0), 1, 0, 'R', 1);
Beispiel #25
0
    }
}
$pdf->SetFont('DejaVuCond', '', 8);
// without step
if ($step == 0) {
    if ($_GET['type_periode'] == 0) {
        $q = getPeriodeName($cn, $from_periode);
        if ($from_periode != $to_periode) {
            $periode = sprintf("Période %s à %s", $q, getPeriodeName($cn, $to_periode));
        } else {
            $periode = sprintf("Période %s", $q);
        }
    } else {
        $periode = sprintf("Date %s jusque %s", $_GET['from_date'], $_GET['to_date']);
    }
    $pdf->Cell(0, 7, $periode, 'B');
    $pdf->Ln();
    for ($i = 0; $i < count($array); $i++) {
        $pdf->Cell(160, 6, $array[$i]['desc']);
        $pdf->Cell(30, 6, sprintf('% 12.2f', $array[$i]['montant']), 0, 0, 'R');
        $pdf->Ln();
    }
} else {
    // With Step
    $a = 0;
    foreach ($array as $e) {
        $pdf->Cell(0, 7, $periode_name[$a], 'B');
        $pdf->Ln();
        $a++;
        for ($i = 0; $i < count($e); $i++) {
            $pdf->Cell(160, 6, $e[$i]['desc']);
$TahunID = GetSetVar('TahunID');
$ProdiID = GetSetVar('ProdiID');
if (empty($TahunID)) {
    die(ErrorMsg("Error", "Tentukan tahun akademik-nya dulu.\r\n    <hr size=1 color=silver />\r\n    <input type=button name='Tutup' value='Tutup'\r\n      onClick='window.close()' />"));
}
if (empty($ProdiID)) {
    die(ErrorMsg("Error", "Tentukan Program Studi-nya dulu.\r\n    <hr size=1 color=silver />\r\n    <input type=button name='Tutup' value='Tutup'\r\n      onClick='window.close()' />"));
}
// *** Main
$prds = getaField('prodi', "KodeID = '" . KodeID . "' and ProdiID", $ProdiID, 'Nama');
$thn = NamaTahun($TahunID);
$pdf = new PDF('P', 'mm', 'A4');
$pdf->SetTitle("Jadwal Ujian Sidang Komprehensif Tahun {$thn}");
$pdf->AddPage();
$pdf->SetFont('Helvetica', 'B', 14);
$pdf->Cell($t, 9, "Jadwal Ujian Sidang Komprehensif - {$thn}", 0, 1, 'C');
$pdf->Cell($t, 9, "Program Studi {$prds}", 0, 1, 'C');
Isinya($pdf);
$pdf->Output();
// *** Functions ***
function Isinya($p)
{
    $lbr = 290;
    $t = 5;
    JudulKolomnya($p);
    $p->SetFont('Helvetica', '', 8);
    $s = "select k.*, m.MhswID,left(m.Nama, 28) as Mhsw,m.KelasID\r\n  \t\tfrom kompre k\r\n      left outer join mhsw m on m.MhswID = k.MhswID and m.KodeID = '" . KodeID . "'\r\n\twhere k.KodeID = '" . KodeID . "'\r\n      and k.TahunID = '{$_SESSION['TahunID']}'\r\n\t  and k.Lulus = 'N'\r\n\t  and k.NA = 'N'\r\n    Group by k.MhswID";
    $r = _query($s);
    $n = 0;
    $jum = _num_rows($r);
    while ($w = _fetch_array($r)) {
 $obscon = utf8_decode($row['obscon']);
 $fotos = explode(",", $row['fotos']);
 //Creación del objeto de la clase heredada
 //$pdf=new PDF();
 //$pdf->AliasNbPages();
 /*	if (!isset($pdf)) {
 			$pdf=new PDF();
 			$pdf->AliasNbPages();
 		}
 	*/
 $pdf->AddPage();
 $pdf->SetDisplayMode('fullpage');
 $pdf->SetMargins(20, 20, 20);
 $pdf->SetFont('Arial', 'BU', 14);
 $pdf->SetTextColor(70, 125, 25);
 $pdf->Cell(0, 10, 'FICHA DE CHECK DOMICILIARIO', 0, 1, 'C');
 $pdf->Ln(2);
 $pdf->SetTextColor(0, 0, 0);
 $pdf->SetFont('Arial', 'B', 12);
 $pdf->Cell(55, 7, 'NOMBRES Y APELLIDOS', 1, 0, 'L');
 $pdf->SetFont('Arial', '', 12);
 $pdf->Cell(0, 7, $nombre, 1, 1, 'C');
 $pdf->SetFont('Arial', 'B', 12);
 $pdf->Cell(55, 7, 'DIRECCION', 1, 0, 'L');
 $pdf->SetFont('Arial', '', 12);
 $pdf->MultiCell(0, 7, $domicilio, 1, 'C');
 //$pdf->Ln(2);
 //$pdf->Image('../files/images_dni/imagen1.png',40,null,0,130);
 $pdf->Ln(2);
 $pdf->SetFont('Arial', 'B', 12);
 $pdf->Cell(35);
Beispiel #28
0
}
$sql = "SELECT * FROM usuarios WHERE IdUsuario = '{$IdUsuario}'";
$resultado = @mysql_query($sql) or die(mysql_error());
while ($datos = @mysql_fetch_assoc($resultado)) {
    $nombreU = $datos["Nombre"];
}
$dias = array("Domingo", "Lunes", "Martes", "Miercoles", "Jueves", "Viernes", "Sábado");
$meses = array("Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre");
$pdf = new PDF();
$pdf->AddPage();
$pdf->Image('../imagenes/logo.jpg', 40, 8, 33);
// Arial bold 15
$pdf->SetFont('Arial', 'B', 8);
// Movernos a la derecha
$pdf->SetY(4);
$pdf->Cell(80);
// Título
$pdf->Cell(60, 5, 'Angytours', 0, 2, 'C');
$pdf->Cell(60, 5, 'Calle 59J # 565 X 110 y 112 Col Bojorquez', 0, 2, 'C');
$pdf->Cell(60, 5, 'Tel: (999)9-12-28-95 | Cel: (044)99-92-44-54-14', 0, 2, 'C');
$pdf->Cell(60, 5, 'Correo: angeviajes@hotmail.com', 0, 2, 'C');
$pdf->Cell(60, 5, 'RFC: PELA620129L36', 0, 2, 'C');
$pdf->SetFont('Arial', '', 10);
$pdf->SetY(35);
$pdf->SetX(140);
$pdf->Cell(40, 8, utf8_decode("Fecha: ") . utf8_decode($dias[date('w')] . " " . date('d') . " de " . $meses[date('n') - 1] . " del " . date('Y')), 0, 1);
$pdf->SetY(45);
$pdf->SetX(20);
$pdf->Cell(130, 8, utf8_decode("Cliente : ") . utf8_decode($nombre), 1, 0);
$pdf->Cell(30, 8, utf8_decode("Folio : ") . $FolioGrupo, 1, 1);
$pdf->SetX(20);
        global $nopo;
        $this->SetY(-15);
        $this->SetFont('Arial', 'I', 8);
        $this->Cell(10, 10, 'Page ' . $this->PageNo(), 0, 0, 'C');
        $this->SetFont('Arial', '', 6);
        //$this->SetY(27);
        $this->SetX(163);
        $this->Cell(30, 10, 'PRINT TIME : ' . date('d-m-Y H:i:s'), 0, 1, 'L');
    }
}
$pdf = new PDF('P', 'mm', 'A4');
$pdf->AddPage();
// kepada yth
$pdf->SetFont('Arial', 'B', 8);
if ($_SESSION['language'] == 'EN') {
    $pdf->Cell(30, 4, "TO :", 0, 0, 'L');
} else {
    $pdf->Cell(30, 4, "KEPADA YTH :", 0, 0, 'L');
}
$pdf->Ln();
$arte = "";
$pdf->Cell(35, 4, $_SESSION['lang']['nm_perusahaan'], 0, 0, 'L');
$pdf->Cell(40, 4, ": " . $nmSupplier . $arte, 0, 1, 'L');
if ($cp != '') {
    $pdf->Cell(35, 4, $_SESSION['lang']['cperson'], 0, 0, 'L');
    $pdf->Cell(40, 4, ": " . $cp, 0, 1, 'L');
}
$pdf->Cell(35, 4, $_SESSION['lang']['alamat'], 0, 0, 'L');
$pdf->Cell(40, 4, ": " . $almtSupplier, 0, 1, 'L');
$pdf->Cell(35, 4, $_SESSION['lang']['telp'], 0, 0, 'L');
$pdf->Cell(40, 4, ": " . $tlpSupplier, 0, 1, 'L');
     {
         $this->SetY(-15);
         $this->SetFont('Arial', 'I', 8);
         $this->Cell(10, 10, 'Page ' . $this->PageNo(), 0, 0, 'C');
     }
 }
 $pdf = new PDF('L', 'pt', 'A4');
 $width = $pdf->w - $pdf->lMargin - $pdf->rMargin;
 $height = 12;
 $pdf->AddPage();
 $pdf->SetFillColor(255, 255, 255);
 $pdf->SetFont('Arial', '', 7);
 $subtot = array();
 foreach ($dtKary as $lstKary) {
     $noe += 1;
     $pdf->Cell(3 / 100 * $width, $height, $noe, 1, 0, 'C', 1);
     $pdf->Cell(13 / 100 * $width, $height, $optNmKar[$lstKary], 1, 0, 'L', 1);
     $pdf->Cell(7 / 100 * $width, $height, $optTipe[$optTipeId[$lstKary]], 1, 0, 'C', 1);
     $pdf->Cell(10 / 100 * $width, $height, number_format($dtGaji[$lstKary], 0), 1, 0, 'R', 1);
     $totGaji += $dtGaji[$lstKary];
     foreach ($test as $barisTgl => $isiTgl) {
         $pdf->Cell(1.5 / 100 * $width, $height, $dtAbsens[$lstKary][$isiTgl], 1, 0, 'C', 1);
         $akhirX = $pdf->GetX();
     }
     foreach ($klmpkAbsn as $brsKet => $hslKet) {
         $pdf->Cell(2 / 100 * $width, $height, $brt[$lstKary][$hslKet['kodeabsen']], 1, 0, 'C', 1);
         $subtot[$lstKary]['total'] += $brt[$lstKary][$hslKet['kodeabsen']];
     }
     $pdf->Cell(5 / 100 * $width, $height, $subtot[$lstKary]['total'], 1, 1, 'R', 1);
 }
 $pdf->Output();