public function listadoAction($aditionalFilter = '')
 {
     $pdf = new PDF("P", 'mm', "A4");
     $pdf->SetTopMargin(15);
     $pdf->SetLeftMargin(10);
     $pdf->AliasNbPages();
     $pdf->SetFillColor(210);
     $per = new Permisos();
     $em = new EntityManager($per->getConectionName());
     $query = "select t1.IdPerfil,t1.Permisos,t4.Perfil,t2.Titulo as Opcion,t3.Titulo as SubOpcion\n                from AgtPermisos as t1,menu as t2, submenu as t3, perfiles as t4\n                where t1.IDOpcion=t2.IDOpcion\n                and t1.IDOpcion=t3.IDOpcion\n                and t3.Id=t1.IDSubOpcion\n                and t1.IdPerfil=t4.Id\n                order by t1.IdPerfil,t1.IDOpcion,t1.IDSubOpcion;";
     $em->query($query);
     $rows = $em->fetchResult();
     $em->desConecta();
     unset($per);
     $perant = "";
     $opcant = "";
     foreach ($rows as $row) {
         if ($perant != $row['IDPerfil']) {
             $pdf->AddPage();
             $pdf->Cell(40, 5, $row['Perfil'], 0, 0, "L", 1);
         } else {
             $pdf->Cell(40, 5, "", 0, 0, "L", 0);
         }
         $pdf->SetFillColor(240);
         if ($opcant != $row['Opcion']) {
             $pdf->Cell(30, 5, $row['Opcion'], 0, 0, "L", 1);
         } else {
             $pdf->Cell(30, 5, "", 0, 0, "L", 0);
         }
         $perant = $row['IDPerfil'];
         $opcant = $row['Opcion'];
         $pdf->Cell(40, 5, $row['SubOpcion'], 0, 0, "L", 0);
         $permisos = array('C' => substr($row['Permisos'], 0, 1), 'I' => substr($row['Permisos'], 1, 1), 'B' => substr($row['Permisos'], 2, 1), 'A' => substr($row['Permisos'], 3, 1), 'L' => substr($row['Permisos'], 4, 1), 'E' => substr($row['Permisos'], 5, 1));
         $pdf->Cell(13, 5, $permisos['C'], 0, 0, "C", 0);
         $pdf->Cell(13, 5, $permisos['I'], 0, 0, "C", 1);
         $pdf->Cell(13, 5, $permisos['B'], 0, 0, "C", 0);
         $pdf->Cell(13, 5, $permisos['A'], 0, 0, "C", 1);
         $pdf->Cell(13, 5, $permisos['L'], 0, 0, "C", 0);
         $pdf->Cell(13, 5, $permisos['E'], 0, 1, "C", 1);
         $pdf->SetFillColor(210);
     }
     $archivo = "docs/docs" . $_SESSION['emp'] . "/pdfs/" . md5(date('d-m-Y H:i:s')) . ".pdf";
     $pdf->Output($archivo, 'F');
     $this->values['archivo'] = $archivo;
     return array('template' => '_global/listadoPdf.html.twig', 'values' => $this->values);
 }
        $this->SetY(-10);
        $this->SetX(5);
        $this->SetFont('helvetica', 'I', 5);
        $this->Cell(48, 5, utf8_decode("Fecha Impresión " . Date::today()), 0, 0, 'L');
        $this->Cell(48, 5, utf8_decode('Página') . $this->PageNo() . '/{nb}', 0, 0, 'R');
    }
}
$pdf = new PDF('P', 'mm', array(105, 148));
$pdf->AliasNbPages();
for ($i = 0; $i < 2; $i++) {
    $pdf->AddPage();
    $pdf->Rect(10, 10, 85, 128);
    $pdf->Line(10, 20, 95, 20);
    $pdf->Line(10, 30, 95, 30);
    $pdf->SetFont('helvetica', 'B', 7);
    $pdf->SetFillColor(120, 120, 120);
    $pdf->SetTextColor(255, 255, 255);
    $pdf->SetX(10);
    $pdf->SetY(10);
    $pdf->Cell(85, 10, utf8_decode($this->planillaDataDet[0]['id_personal'] . " - " . $this->planillaDataDet[0]['nombre_personal']), 1, 0, 'C', true);
    $pdf->Ln(13);
    $pdf->SetTextColor(0, 0, 0);
    $pdf->Cell(15, 5, utf8_decode('BOLETA INFORMATIVA DETALLE'), 0, 0, 'L');
    $pdf->Ln(10);
    $pdf->Cell(65, 5, utf8_decode('Básico ' . $this->planillaDataDet[0]['nom_planilla'] . ' ( ' . $this->planillaDataDet[0]['periodo'] . ' )'), 0, 0, 'L');
    $pdf->Cell(20, 5, utf8_decode($this->planillaDataDet[0]['neto_total'] + $this->planillaDataDet[0]['monto_asig_familiar'] + $this->planillaDataDet[0]['otros_descuentos']), 0, 0, 'R');
    $pdf->Ln(5);
    $pdf->Cell(15, 5, utf8_decode('DESCUENTOS'), 0, 0, 'L');
    $pdf->Ln(5);
    foreach ($this->planillaDataDesc as $b) {
        $pdf->Cell(65, 5, utf8_decode($b['nom_descuento'] . " - " . $b['detalle_descuento']), 0, 0, 'L');
        $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('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->SetFont('Arial', 'B', 9);
$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)) {
示例#5
0
<?php

define('FPDF_FONTPATH', 'font/');
require_once 'mysql_table.php';
include "comunes.php";
include "../conectar.php";
$pdf = new PDF();
$pdf->Open();
$pdf->AddPage();
//Nombre del Listado
$pdf->SetFillColor(255, 255, 255);
$pdf->SetFont('Arial', 'B', 16);
$pdf->SetY(40);
$pdf->SetX(0);
$pdf->MultiCell(290, 6, "Listado de Cobradores", 0, C, 0);
$pdf->Ln();
//Restauracin de colores y fuentes
$pdf->SetFillColor(224, 235, 255);
$pdf->SetTextColor(0);
$pdf->SetFont('Arial', 'B', 7);
//Buscamos y listamos las familias
$nombreentidad = $_POST["nombrecobrador"];
$codentidad = $_POST["codcobrador"];
$where = "1=1";
if ($codcobrador != "") {
    $where .= " AND codcobrador='{$codcobrador}'";
}
if ($nombrecobrador != "") {
    $where .= " AND nombrecobrador like '%" . $nombrecobrador . "%'";
}
$where2 .= " ORDER BY nombrecobrador ASC";
示例#6
0
 }
 $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);
         $pdf->Cell($br00, $zelle, " ", 0, 0, 'C');
         $pdf->Cell($br99, $zelle, $datum_arr[$t][0], 1, 1, 'C', 1);
     }
     $tt++;
     $pdf->SetTextColor(0);
     $pdf->SetFillColor(240);
     $pdf->Cell($br00, $zelle, " ", 0, 0, 'C');
     $pdf->Cell($br99, $zelle, utf8_decode($arrMonth[date('F', $monatsausgabe)]), 1, 1, 'L', 1);
    $codigo_prod = $row[10];
    $descripcion = $row[12];
    $precio_venta = $row[4];
}
$sql = pg_query("select * from factura_compra,proveedores where factura_compra.id_proveedor=proveedores.id_proveedor and id_factura_compra='{$id_factura_compra}'");
while ($row = pg_fetch_row($sql)) {
    $ci_proveedor = $row[23];
    $proveedor = $row[24];
    $fecha_compra = $row[5];
    $num_fac_compra = $row[11];
}
$sql = pg_query("select * from detalle_factura_compra,productos where detalle_factura_compra.cod_productos=productos.cod_productos and id_factura_compra='{$id_factura_compra}' and productos.cod_productos='{$id_producto}'");
while ($row = pg_fetch_row($sql)) {
    $precio_compra = $row[4];
}
$pdf->SetFillColor(216, 216, 231);
$pdf->Cell(100, 8, utf8_decode("RUC/CI:: " . $ci_cliente), 1, 0, 'L', true);
$pdf->Cell(105, 8, utf8_decode("CLIENTE: " . $nombre_cliente), 1, 1, 'L', true);
$pdf->Ln(2);
$pdf->SetX(1);
$pdf->Cell(30, 6, utf8_decode('Nro. Factura'), 1, 0, 'C', 0);
$pdf->Cell(25, 6, utf8_decode('F. Venta'), 1, 0, 'C', 0);
$pdf->Cell(20, 6, utf8_decode('P. Venta'), 1, 0, 'C', 0);
$pdf->Cell(40, 6, utf8_decode('Producto'), 1, 0, 'C', 0);
$pdf->Cell(20, 6, utf8_decode('N. Compra'), 1, 0, 'C', 0);
$pdf->Cell(20, 6, utf8_decode('F. Compra'), 1, 0, 'C', 0);
$pdf->Cell(30, 6, utf8_decode('Proveedor'), 1, 0, 'C', 0);
$pdf->Cell(20, 6, utf8_decode('P. Compra'), 1, 1, 'C', 0);
$pdf->SetX(1);
$pdf->Cell(30, 6, substr($num_fac_venta, 8, 30), 0, 0, 'C', 0);
$pdf->Cell(25, 6, $fecha_venta, 0, 0, 'C', 0);
示例#8
0
文件: pdf.php 项目: maede97/EF_INF
    global $title;
    $title = $result[0]['titel'];
    //Make PDF
    $result = $db->selectWordsFromId($liste);
    //Alle Wörter zu einer Liste hinzufügen
    $woerter = $translations = array();
    foreach ($result as $paar) {
        array_push($woerter, html_entity_decode($paar['wort']));
        array_push($translations, html_entity_decode($paar['translation']));
    }
    $db->closeConnection();
    //Ab hier auch wieder angepasst.
    $pdf = new PDF();
    $pdf->AliasNbPages();
    $pdf->AddPage();
    $pdf->SetFillColor(150);
    //Wörter in PDF einfüllen
    for ($i = 0; $i < count($woerter); $i++) {
        $filler = ($i + 1) % 2;
        //Fett:
        $pdf->SetFont('Times', 'B', 12);
        $pdf->Cell(95, 10, $woerter[$i], 0, 0, '', $filler);
        //Nicht Fett
        $pdf->SetFont('Times', '', 12);
        $pdf->Cell(95, 10, $translations[$i], 0, 1, '', $filler);
    }
    $pdf->Output("{$title}.pdf", "I");
} else {
    header("Location: ../index.php?site=login&error=0");
    exit;
}
示例#9
0
     }
     //Pie de página
     function Footer()
     {
         $this->SetY(-10);
         $this->SetFont('Arial', 'I', 8);
         $this->Cell(0, 10, 'Page ' . $this->PageNo() . '/ Comeat / Fecha: ' . date('d/m/Y'), 0, 0, 'C');
     }
 }
 //Creación del objeto de la clase heredada
 $fpdf = new PDF('L');
 //P Es vertical, L es Horizontal.
 $fpdf->AddPage();
 $fpdf->SetFont('Arial', '', 11);
 //Se finalizan los titulos. Se agrega un "Enter y cambiamos letra"
 $fpdf->SetFillColor(255, 190, 119);
 $color = 0;
 //Inicializamos el foreach que imprimirá todo:
 while ($row = mysql_fetch_array($result)) {
     //Calculo del total del menú
     $imprimirColor = false;
     if ($color % 2 == 0) {
         $imprimirColor = false;
     } else {
         $imprimirColor = true;
     }
     $valor = $row['PRECIO'];
     $descuento = $row['OFERTA'];
     $incognita = $descuento * $valor / 100;
     $total = $valor - $incognita;
     //Espacio para centrar
示例#10
0
         $px = $px + 3;
         $pdf->RotatedText($px, $py + 3, utf8_decode($couch[0]['libelle_them']), $angle);
     } else {
         $py = $py + 3;
         $pdf->RotatedText($px, $py, utf8_decode($couch[0]['libelle_them']), $angle);
     }
     $idprov = $id;
     if ($vision == "pay") {
         $px = $px + 2;
     } else {
         $py = $py + 2;
     }
 }
 $coul = explode(",", $couleu);
 $pdf->SetAlpha($apocit);
 $pdf->SetFillColor($coul[0], $coul[1], $coul[2]);
 $pdf->Rect($px, $py, $rect, $rect, F);
 $pdf->SetAlpha(1);
 $pdf->Rect($px, $py, $rect, $rect, D);
 //$pdf->Text(8,$pyy,$legend);
 if ($vision == "pay") {
     $pdf->RotatedText($px + 3, $py - 2, utf8_decode($legend), $angle);
 } else {
     $pdf->RotatedText($px + 5, $py + 3, utf8_decode($legend), $angle);
 }
 //$pyy=$pyy+3;
 if ($vision == "pay") {
     $px = $px + 5;
 } else {
     $py = $py + 5;
     if ($_GET['format'] == 'A4' && $py > 280) {
示例#11
0
 $qty = $rows[10];
 $tax = $rows[11];
 $total = $rows[12] + $tax;
 $charge = $baseamt;
 if ($qty != '' and $qty > 0) {
     $charge = $baseamt * $qty;
 } else {
     $qty = 0;
 }
 $Address = 'Address';
 $EffDate = $rows[6];
 $Line1 = "Monthly Charges as on " . $EffDate;
 $Line2 = "Tax applied @ 10% ";
 $Line3 = "Total Charges  ";
 if ($i == 0) {
     $pdf->SetFillColor(240, 100, 100);
     $pdf->SetFont('Times', 'B', 12);
     $pdf->Cell(0, 0.25, "Bill for the month " . $EffDate, 1, 2, "C", 1);
     $pdf->SetFillColor(240, 100, 100);
     $pdf->SetFont('Times', 'B', 12);
     $pdf->Cell(0, 0.25, "Customer Details", 1, 2, "C", 1);
     $pdf->SetFont('Times', '', 12);
     $pdf->Cell(0, 0.2, $AccName, 1, 0, 'L');
     $pdf->Cell(0, 0.2, $accname, 1, 1, 'R');
     $pdf->Cell(0, 0.2, $Address, 1, 0, 'L');
     //$pdf->Cell(0, 0.20, $address, 1, 1, 'R');
     $pdf->Cell(0, 0.2, $addline1, 1, 1, 'R');
     $pdf->Cell(0, 0.2, $addline2, 1, 1, 'R');
     $pdf->Cell(0, 0.2, $addline3, 1, 1, 'R');
     $pdf->Cell(0, 0.2, $addline4, 1, 1, 'R');
     $pdf->Cell(0, 0.2, $addline5, 1, 1, 'R');
##-- วันที่ วัน เดือน ปี
if (!empty($b) && !empty($e)) {
    //$pdf->MultiCell( 0  , 0 , iconv( 'UTF-8','cp874' , 'ระหว่างวันที่ '.$b.' ถึง '.$e ));  ## formate date in table is  yyyy-mm-ddd
    $pdf->MultiCell(0, 0, iconv('UTF-8', 'cp874', 'ระหว่างวันที่ ' . $pdf->date_thai_format($b) . ' ถึง ' . $pdf->date_thai_format($e)));
    ## formate date in table is  yyyy-mm-ddd
    // ค่าที่ส่งมา 1-10-2557
    // $str_query="SELECT * FROM ESN.`04-monitoring`where `MonitoringDate` between '1467-05-04' and '1990-1-1' ;    ";
    //   date_eng_format($begin)
}
##--หัวตาราง
$pdf->setXY($x_absolute, $y_absolute + $r * 3.5);
$pdf->SetFont('angsana', '', 16);
$pdf->MultiCell(0, 0, iconv('UTF-8', 'cp874', 'ตารางที่ 3 รายละเอียดผลลัพธ์ของการจัดการปัญหาที่เกี่ยวข้องกับการใช้ยาโดยเภสัชกร'));
$pdf->setXY($x_absolute, $y_absolute + $r * 4);
$pdf->SetFont('angsana', 'B', 14);
$pdf->SetFillColor(200, 200, 200, 200);
//$pdf->Cell( 30  , 7 , iconv( 'UTF-8','cp874' , 'ประเภทปัญหาที่เกี่ยวข้องกับการใช้ยา' ) , 1 , 0 , 'C' , true );
$pdf->Cell(30, 7, iconv('UTF-8', 'cp874', 'ประเภทปัญหาที่'), LRT, 0, 'C', true);
$pdf->Cell(50, 7, iconv('UTF-8', 'cp874', 'บทบาทเภสัชกรในการจัดการปัญหา'), LRT, 0, 'C', true);
//$pdf->Cell( 35  , 7 , iconv( 'UTF-8','cp874' , 'จำนวนปัญหาที่จัดการ' ) , 1 , 1 , 'C' , true );
$pdf->Cell(20, 7, iconv('UTF-8', 'cp874', 'จำนวนปัญหา'), LRT, 0, 'C', true);
$pdf->Cell(60, 7, iconv('UTF-8', 'cp874', 'ผลลัพธ์ของการจัดการปัญหา'), LRT, 1, 'C', true);
$pdf->SetFillColor(200, 200, 200, 200);
//$pdf->Cell( 35  , 7 , iconv( 'UTF-8','cp874' , ''  ),LR, 0  ,C,true     );
$pdf->Cell(30, 7, iconv('UTF-8', 'cp874', 'เกี่ยวข้องกับการใช้ยา'), LRB, 0, 'C', true);
$pdf->Cell(50, 7, iconv('UTF-8', 'cp874', ''), LRB, 0, 'C', true);
$pdf->Cell(20, 7, iconv('UTF-8', 'cp874', 'ที่จัดการ'), LRB, 0, 'C', true);
$pdf->Cell(15, 7, iconv('UTF-8', 'cp874', 'Resdved'), TLRB, 0, 'C', true);
$pdf->Cell(15, 7, iconv('UTF-8', 'cp874', 'Improved'), TLRB, 0, 'C', true);
$pdf->Cell(20, 7, iconv('UTF-8', 'cp874', 'NotImproved'), TLRB, 0, 'C', true);
$pdf->Cell(10, 7, iconv('UTF-8', 'cp874', 'N/A'), TLRB, 1, 'C', true);
示例#13
0
        $response['message'] = 'No hay datos';
    }
    echoResponse(200, $response);
});
// Imprime - retorna un pdf con todas las preguntas respondidas que se le soliciten en la lista indicada
$app->post('/printPreguntas', 'sessionAlive', function () use($app) {
    // Reporte
    $pdf = new PDF('L', 'mm', 'Letter');
    $pdf->Open();
    $pdf->AddPage();
    $pdf->SetMargins(5, 3, 5);
    // margen, left, top y right
    //$pdf->Ln(03);
    //$pdf->SetWidths(array(65, 60, 55, 50, 20));
    $pdf->SetFont('Arial', 'B', 8);
    $pdf->SetFillColor(85, 107, 47);
    $pdf->SetTextColor(0);
    $pdf->ln();
    //
    $response = array();
    $lisPreguntas = json_decode($app->request->getBody());
    $idUser = intval($_SESSION['uid']);
    $lista = implode(",", $lisPreguntas);
    $db = new DbHandler();
    $impresas = $db->get1Record("select fn_num_respuesta_print( '{$lista}' ) as cantidad");
    //var_dump($impresas);
    if ($impresas['cantidad'] == 0) {
        // genera las respuestas en el documento PDF
        // $target_dir = $_SERVER['DOCUMENT_ROOT'] . "/server/uploaded_files/";
        // registra el nuevo lote de preguntas impresas
        // insert into pyr_respuesta_print ( id, fecha, id_usuario ) values ( now(), now(), 12 );
示例#14
0
    }
}
$pdf = new PDF();
/*Se define las propiedades de la página */
$pdf->AliasNbPages();
$pdf->AddPage();
/* Se añade una nueva página */
$pdf->SetFont('Arial', 'B', 10);
/* Se define el tipo de fuente: Arial en negrita de ta */
$cons1 = mysql_query("SELECT  * FROM cliente  order by id_cliente", $conexion);
$lk = 0;
$pdf->SetFont('Arial', '', 9);
//Títulos de las columnas
$header = array('Nº', 'Login', 'Nombre', 'Apellido', 'Teléfono', 'Direcciòn');
//Colores, ancho de línea y fuente en negrita
$pdf->SetFillColor(255, 0, 0);
$pdf->SetTextColor(255);
$pdf->SetDrawColor(128, 128, 128);
$pdf->SetLineWidth(0.3);
$pdf->SetFont('', 'B');
//Cabecera
$w = array(10, 25, 40, 37, 37, 37);
for ($i = 0; $i < count($header); $i++) {
    $pdf->Cell($w[$i], 7, $header[$i], 1, 0, 'C', 1);
}
$pdf->Ln();
//Restauración de colores y fuentes
$pdf->SetFillColor(224, 235, 255);
$pdf->SetTextColor(0);
$pdf->SetFont('');
//Datos
示例#15
0
 /**
  *	Show total to pay
  *
  *	@param	PDF			$pdf            Object PDF
  *	@param  Facture		$object         Object invoice
  *	@param  int			$deja_regle     Montant deja regle
  *	@param	int			$posy			Position depart
  *	@param	Translate	$outputlangs	Objet langs
  *	@return int							Position pour suite
  */
 function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs)
 {
     global $conf, $mysoc;
     $default_font_size = pdf_getPDFFontSize($outputlangs);
     $tab2_top = $posy;
     $tab2_hl = 4;
     $pdf->SetFont('', '', $default_font_size - 1);
     // Tableau total
     $col1x = 120;
     $col2x = 170;
     if ($this->page_largeur < 210) {
         $col2x -= 20;
     }
     $largcol2 = $this->page_largeur - $this->marge_droite - $col2x;
     $useborder = 0;
     $index = 0;
     // Total HT
     $pdf->SetFillColor(255, 255, 255);
     $pdf->SetXY($col1x, $tab2_top + 0);
     $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
     $pdf->SetXY($col2x, $tab2_top + 0);
     $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ht + (!empty($object->remise) ? $object->remise : 0), 0, $outputlangs), 0, 'R', 1);
     // Show VAT by rates and total
     $pdf->SetFillColor(248, 248, 248);
     $this->atleastoneratenotnull = 0;
     if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) {
         $tvaisnull = !empty($this->tva) && count($this->tva) == 1 && isset($this->tva['0.000']) && is_float($this->tva['0.000']) ? true : false;
         if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_ISNULL) && $tvaisnull) {
             // Nothing to do
         } else {
             //Local tax 1 before VAT
             //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
             //{
             foreach ($this->localtax1 as $localtax_type => $localtax_rate) {
                 if (in_array((string) $localtax_type, array('1', '3', '5'))) {
                     continue;
                 }
                 foreach ($localtax_rate as $tvakey => $tvaval) {
                     if ($tvakey != 0) {
                         //$this->atleastoneratenotnull++;
                         $index++;
                         $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
                         $tvacompl = '';
                         if (preg_match('/\\*/', $tvakey)) {
                             $tvakey = str_replace('*', '', $tvakey);
                             $tvacompl = " (" . $outputlangs->transnoentities("NonPercuRecuperable") . ")";
                         }
                         $totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code) . ' ';
                         $totalvat .= vatrate(abs($tvakey), 1) . $tvacompl;
                         $pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
                         $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
                         $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1);
                     }
                 }
             }
             //}
             //Local tax 2 before VAT
             //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
             //{
             foreach ($this->localtax2 as $localtax_type => $localtax_rate) {
                 if (in_array((string) $localtax_type, array('1', '3', '5'))) {
                     continue;
                 }
                 foreach ($localtax_rate as $tvakey => $tvaval) {
                     if ($tvakey != 0) {
                         //$this->atleastoneratenotnull++;
                         $index++;
                         $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
                         $tvacompl = '';
                         if (preg_match('/\\*/', $tvakey)) {
                             $tvakey = str_replace('*', '', $tvakey);
                             $tvacompl = " (" . $outputlangs->transnoentities("NonPercuRecuperable") . ")";
                         }
                         $totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code) . ' ';
                         $totalvat .= vatrate(abs($tvakey), 1) . $tvacompl;
                         $pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
                         $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
                         $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1);
                     }
                 }
             }
             //}
             // VAT
             foreach ($this->tva as $tvakey => $tvaval) {
                 if ($tvakey > 0) {
                     $this->atleastoneratenotnull++;
                     $index++;
                     $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
                     $tvacompl = '';
                     if (preg_match('/\\*/', $tvakey)) {
                         $tvakey = str_replace('*', '', $tvakey);
                         $tvacompl = " (" . $outputlangs->transnoentities("NonPercuRecuperable") . ")";
                     }
                     $totalvat = $outputlangs->transnoentities("TotalVAT") . ' ';
                     $totalvat .= vatrate($tvakey, 1) . $tvacompl;
                     $pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
                     $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
                     $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1);
                 }
             }
             //Local tax 1 after VAT
             //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
             //{
             foreach ($this->localtax1 as $localtax_type => $localtax_rate) {
                 if (in_array((string) $localtax_type, array('2', '4', '6'))) {
                     continue;
                 }
                 foreach ($localtax_rate as $tvakey => $tvaval) {
                     if ($tvakey != 0) {
                         //$this->atleastoneratenotnull++;
                         $index++;
                         $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
                         $tvacompl = '';
                         if (preg_match('/\\*/', $tvakey)) {
                             $tvakey = str_replace('*', '', $tvakey);
                             $tvacompl = " (" . $outputlangs->transnoentities("NonPercuRecuperable") . ")";
                         }
                         $totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code) . ' ';
                         $totalvat .= vatrate(abs($tvakey), 1) . $tvacompl;
                         $pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
                         $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
                         $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1);
                     }
                 }
             }
             //}
             //Local tax 2 after VAT
             //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
             //{
             foreach ($this->localtax2 as $localtax_type => $localtax_rate) {
                 if (in_array((string) $localtax_type, array('2', '4', '6'))) {
                     continue;
                 }
                 foreach ($localtax_rate as $tvakey => $tvaval) {
                     // retrieve global local tax
                     if ($tvakey != 0) {
                         //$this->atleastoneratenotnull++;
                         $index++;
                         $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
                         $tvacompl = '';
                         if (preg_match('/\\*/', $tvakey)) {
                             $tvakey = str_replace('*', '', $tvakey);
                             $tvacompl = " (" . $outputlangs->transnoentities("NonPercuRecuperable") . ")";
                         }
                         $totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code) . ' ';
                         $totalvat .= vatrate(abs($tvakey), 1) . $tvacompl;
                         $pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
                         $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
                         $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1);
                     }
                 }
             }
             //}
             // Total TTC
             $index++;
             $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
             $pdf->SetTextColor(0, 0, 60);
             $pdf->SetFillColor(224, 224, 224);
             $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalTTC"), $useborder, 'L', 1);
             $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
             $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc, 0, $outputlangs), $useborder, 'R', 1);
         }
     }
     $pdf->SetTextColor(0, 0, 0);
     /*
     $resteapayer = $object->total_ttc - $deja_regle;
     if (! empty($object->paye)) $resteapayer=0;
     */
     if ($deja_regle > 0) {
         $index++;
         $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
         $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("AlreadyPaid"), 0, 'L', 0);
         $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
         $pdf->MultiCell($largcol2, $tab2_hl, price($deja_regle, 0, $outputlangs), 0, 'R', 0);
         /*
         if ($object->close_code == 'discount_vat')
         {
         	$index++;
         	$pdf->SetFillColor(255,255,255);
         
         	$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
         	$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("EscompteOfferedShort"), $useborder, 'L', 1);
         
         	$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
         	$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc - $deja_regle, 0, $outputlangs), $useborder, 'R', 1);
         
         	$resteapayer=0;
         }
         */
         $index++;
         $pdf->SetTextColor(0, 0, 60);
         $pdf->SetFillColor(224, 224, 224);
         $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
         $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("RemainderToPay"), $useborder, 'L', 1);
         $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
         $pdf->MultiCell($largcol2, $tab2_hl, price($resteapayer, 0, $outputlangs), $useborder, 'R', 1);
         $pdf->SetFont('', '', $default_font_size - 1);
         $pdf->SetTextColor(0, 0, 0);
     }
     $index++;
     return $tab2_top + $tab2_hl * $index;
 }
示例#16
0
        $this->Cell(25, 10, 'Total Descuentos', 1, 0, 'C', 1);
        $this->Cell(25, 10, 'Neto a Cobrar', 1, 1, 'C', 1);
        //Restore font and colors
    }
}
$pdf = new PDF();
//'P'=vertical o 'L'=horizontal,'mm','A4' o 'Legal'
$pdf->AddPage('L', 'legal');
//$pdf->AliasNbPages();
$pdf->SetFont('Arial', '', 6);
//Connection and query
$conectate = pg_connect("host=localhost port=5434 dbname=salario user=postgres password=postgres" . "") or die('Error al conectar a la base de datos');
$consulta = pg_exec($conectate, "SELECT row_number()over (partition by 0 order by max(cat.cat_cod) ) as lineas,\n                    max(Sal.usu_cod) as usu_cod\n                    ,max(FUN.fun_ci)as fun_ci\n                    ,max(Sal.sal_cod)as sal_cod\n                    ,max(Sal.fun_cod) as fun_cod\n                    ,max(org.org_cod) as organismo\n                    ,max(cat.cat_des) as categoria\n                    ,max(CONCAT(FUN.fun_nom,' ',FUN.fun_ape)) as nombres\n                    ,max(to_char(SAL.sal_fecha,'dd/mm/yyyy')) as sal_fecha,\n                    max(cat.cat_nom) as sueldobruto\n                    ,max(SAL.sal_ips) as sal_ips\n                    ,max(SAL.sal_aus) as sal_aus\n                    ,max(SAL.sal_pyt) as sal_pyt\n                    ,max(SAL.sal_jud) as sal_jud\n                    ,max(SAL.sal_aso) as sal_aso\n                    ,max(SAL.sal_rep)as sal_rep\n                    ,sum(DES.ode_mon) as ode_mon\n                    ,'Otros Descuentos' as tde_des\n                    ,max(SAL.sal_neto) as sal_neto \n\t\t    ,(max(SAL.sal_ips)+ max(SAL.sal_aus)+max(SAL.sal_pyt)+max(SAL.sal_jud)+max(SAL.sal_aso)+max(SAL.sal_rep)) as total_descuentos\n\t\t    ,max(car.car_des) as cargo\n\t\t    ,max(cat.cat_des) as categoria\n                    ,max(lin.lin_des) as nrolinea\n                    from Salario SAL\n                    LEFT OUTER JOIN descuento DES on (DES.sal_cod=SAL.sal_cod)  \n                    LEFT OUTER JOIN tipo_descuento TIPDES\n                    on TIPDES.tde_cod=DES.tde_cod\n                    INNER JOIN funcionario FUN \n                    on SAl.fun_cod=FUN.fun_cod\n                    INNER JOIN categoria_detalle catdet\n                    on sal.fun_cod= catdet.fun_cod\n                    INNER JOIN categoria cat\n                    on cat.cat_cod=catdet.cat_cod\n                    INNER JOIN organismo_detalle orgdet\n                    on sal.fun_cod= orgdet.fun_cod\n                    INNER JOIN organismo org\n                    on org.org_cod=orgdet.org_cod\n                    INNER JOIN cargo car\n                    on car.car_cod=FUN.car_cod\n                    INNER JOIN linea_detalle lindet\n                    on sal.fun_cod= lindet.fun_cod\n                    INNER JOIN linea lin\n                    on lin.lin_cod=lindet.lin_cod\n                    where SAL.fun_cod=FUN.fun_cod and FUN.fun_fuente='30' \n                    and EXTRACT(MONTH FROM sal_fecha)= EXTRACT(MONTH FROM now())\n                    and EXTRACT(YEAR FROM sal_fecha)= EXTRACT(YEAR FROM now())  \n                    group by FUN.fun_cod \n                    order by categoria,nombres");
$numregs = pg_numrows($consulta);
$pdf->SetFont('Arial', '', 8);
$pdf->SetFillColor(224, 235, 255);
$pdf->SetTextColor(0);
//Build table
$fill = false;
$i = 0;
while ($i < $numregs) {
    $nrolinea = pg_result($consulta, $i, 'nrolinea');
    $cargo = pg_result($consulta, $i, 'cargo');
    $cedula = pg_result($consulta, $i, 'fun_ci');
    $categria = pg_result($consulta, $i, 'categoria');
    $item = pg_result($consulta, $i, 'lineas');
    $funcionario = pg_result($consulta, $i, 'nombres');
    $fecha = pg_result($consulta, $i, 'sal_fecha');
    $sueldobruto = pg_result($consulta, $i, 'sueldobruto');
    $IPS = pg_result($consulta, $i, 'sal_ips');
    $Ausencia = pg_result($consulta, $i, 'sal_aus');
示例#17
0
require_once OBIB_FUN . "fechas.php";
//include ("../funciones/fechas.php");
$pdf = new PDF();
$pdf->Open();
$pdf->AddPage();
$pdf->Ln(10);
//require_once($_SERVER[DOCUMENT_ROOT]."/git/maxcodekarev/configuraciones/conectar.php");
$codfactura = $_REQUEST["codfactura"];
$codproveedor = $_REQUEST["codproveedor"];
$consulta = "Select * from facturasp,proveedores where facturasp.codfactura='{$codfactura}' and facturasp.codproveedor='{$codproveedor}' and facturasp.codproveedor=proveedores.codproveedor";
$resultado = mysql_query($consulta, $conexion);
$lafila = mysql_fetch_array($resultado);
$pdf->Cell(95);
$pdf->Cell(80, 4, "", '', 0, 'C');
$pdf->Ln(4);
$pdf->SetFillColor(255, 255, 255);
$pdf->SetTextColor(0);
$pdf->SetDrawColor(0, 0, 0);
$pdf->SetLineWidth(0.2);
$pdf->SetFont('Arial', 'B', 10);
$pdf->Cell(40, 65, 'CONTRA RECIBO');
$pdf->SetX(10);
$pdf->Cell(95);
$pdf->Cell(80, 4, "", 'LRT', 0, 'L', 1);
$pdf->Ln(4);
$pdf->Cell(95);
$pdf->Cell(80, 4, $lafila["nombre"], 'LR', 0, 'L', 1);
$pdf->Ln(4);
$pdf->Cell(95);
$pdf->Cell(80, 4, $lafila["direccion"], 'LR', 0, 'L', 1);
$pdf->Ln(4);
示例#18
0
文件: pdf.php 项目: raalveco/Escuela
/**
 * Genera un reporte en PDF
 *
 * @param array $result
 * @param array $sumArray
 * @param string $title
 * @param array $weightArray
 * @param array $headerArray
 */
function pdf($result, $sumArray, $title, $weightArray, $headerArray)
{
    $config = Config::read('config');
    $active_app = Router::get_application();
    //Orientación
    if ($sumArray > 200) {
        $orientation = 'L';
    } else {
        $orientation = 'P';
    }
    $numRows = 140;
    //Tipo de Papel
    if ($sumArray > 250) {
        $paper = 'legal';
    } else {
        $paper = 'letter';
    }
    if ($paper == 'letter' && $orientation == 'P') {
        $widthPage = 220;
        $numRows = 42;
    }
    if ($paper == 'legal' && $orientation == 'L') {
        $widthPage = 355;
        $numRows = 30;
    }
    if ($paper == 'letter' && $orientation == 'L') {
        $widthPage = 270;
        $numRows = 30;
    }
    //Crear Documento PDF
    $pdf = new PDF($orientation, 'mm', $paper);
    $pdf->Open();
    $pdf->AddPage();
    //Nombre del Listado
    $pdf->SetFillColor(255, 255, 255);
    $pdf->AddFont('Verdana', '', 'verdana.php');
    $pdf->SetFont('Verdana', '', 14);
    $pdf->SetY(20);
    $pdf->SetX(0);
    $pdf->Ln();
    if ($config->{$active_app}->name) {
        $pdf->MultiCell(0, 6, strtoupper($config->{$active_app}->name), 0, "C", 0);
    }
    $pdf->MultiCell(0, 6, "REPORTE DE " . strtoupper($title), 0, "C", 0);
    $pdf->SetFont('Verdana', '', 12);
    if (isset($_SESSION['fecsis'])) {
        $pdf->MultiCell(0, 6, "FECHA " . date("Y-m-d"), 0, "C", 0);
    }
    $pdf->Ln();
    //Colores, ancho de línea y fuente en negrita
    $pdf->SetFillColor(0xf2, 0xf2, 0xf2);
    $pdf->SetTextColor(0);
    $pdf->SetDrawColor(0, 0, 0);
    $pdf->SetLineWidth(0.2);
    $pdf->SetFont('Arial', 'B', 10);
    if ($weightArray[0] < 11) {
        $weightArray[0] = 11;
    }
    //Parametros del Reporte
    $pos = floor($widthPage / 2 - $sumArray / 2);
    $pdf->SetX($pos);
    for ($i = 0; $i <= count($headerArray) - 1; $i++) {
        $pdf->Cell($weightArray[$i], 7, $headerArray[$i], 1, 0, 'C', 1);
    }
    $pdf->Ln();
    //Restauración de colores y fuentes
    $pdf->SetFillColor(224, 235, 255);
    $pdf->SetTextColor(0);
    $pdf->SetFont('Arial', 'B', 7);
    //print_r($weightArray);
    //Buscamos y listamos
    $n = 1;
    $p = 1;
    $t = 0;
    foreach ($result as $row) {
        //$pdf->Cell(Ancho, Alto, contenido, ?, ?, Align)
        if ($n > $numRows || $p == 1 && $n > $numRows - 3) {
            $pdf->AddPage($orientation);
            $pdf->SetY(30);
            $pdf->SetX($pos);
            $pdf->SetFillColor(0xf2, 0xf2, 0xf2);
            $pdf->SetTextColor(0);
            $pdf->SetDrawColor(0, 0, 0);
            $pdf->SetLineWidth(0.2);
            $pdf->SetFont('Arial', 'B', 10);
            for ($i = 0; $i < count($headerArray); $i++) {
                $pdf->Cell($weightArray[$i], 7, $headerArray[$i], 1, 0, 'C', 1);
            }
            $pdf->Ln();
            $pdf->SetFillColor(224, 235, 255);
            $pdf->SetTextColor(0);
            $pdf->SetFont('Arial', 'B', 7);
            $n = 1;
            $p++;
        }
        $pdf->SetX($pos);
        for ($i = 0; $i <= count($row) - 1; $i++) {
            if (is_numeric($row[$i])) {
                $pdf->Cell($weightArray[$i], 5, trim($row[$i]), 'LRTB', 0, 'C');
            } else {
                $pdf->Cell($weightArray[$i], 5, trim($row[$i]), 'LRTB', 0, 'L');
            }
        }
        $n++;
        $t++;
        $pdf->Ln();
    }
    $pdf->SetX($pos);
    $pdf->SetFont('Arial', 'B', 7);
    $pdf->SetFillColor(0xf2, 0xf2, 0xf2);
    $pdf->Cell($weightArray[0], 5, "TOTAL", 'LRTB', 0, 'R');
    $pdf->Cell($weightArray[1], 5, $t, 'LRTB', 0, 'L');
    /*print "<div style='background: url(img/bg2.jpg) #F2f2f2;border:1px solid #c0c0c0'>
    	<table><td><img src='img/information.gif' width='64' height='64'/></td><td>";
    	print "Papel: $paper<br>";
    	print "Orientación: $orientation<br>";
    	print "Ancho Página: $widthPage mm<br>";
    	print "Número Páginas: $p<br>";
    	print "</td></table></div><br>";*/
    $file = md5(uniqid());
    $pdf->Output(CORE_PATH . 'public/temp/' . $file . ".pdf", 'F');
    if (isset($raw_output)) {
        print "<script type='text/javascript'> window.open('" . KUMBIA_PATH . "temp/" . $file . ".pdf', null); </script>";
    } else {
        Generator::forms_print("<script type='text/javascript'> window.open('" . KUMBIA_PATH . "temp/" . $file . ".pdf', null); </script>");
    }
}
示例#19
0
     $High = mb_convert_encoding($High, 'UTF-8', 'HTML-ENTITIES');
     $Med = mb_convert_encoding($Med, 'UTF-8', 'HTML-ENTITIES');
     $Low = mb_convert_encoding($Low, 'UTF-8', 'HTML-ENTITIES');
     $Info = mb_convert_encoding($Info, 'UTF-8', 'HTML-ENTITIES');
     $pdf->SetFont('GB', '', 10);
 } else {
     $HostIP = mb_convert_encoding($HostIP, 'ISO-8859-1', 'HTML-ENTITIES');
     $HostName = mb_convert_encoding($HostName, 'ISO-8859-1', 'HTML-ENTITIES');
     $Serious = mb_convert_encoding($Serious, 'ISO-8859-1', 'HTML-ENTITIES');
     $High = mb_convert_encoding($High, 'ISO-8859-1', 'HTML-ENTITIES');
     $Med = mb_convert_encoding($Med, 'ISO-8859-1', 'HTML-ENTITIES');
     $Low = mb_convert_encoding($Low, 'ISO-8859-1', 'HTML-ENTITIES');
     $Info = mb_convert_encoding($Info, 'ISO-8859-1', 'HTML-ENTITIES');
     $pdf->SetFont('Helvetica', '', 10);
 }
 $pdf->SetFillColor(238, 238, 238);
 $pdf->Cell(28, 6, $HostIP, 1, 0, 'C', 1);
 $pdf->Cell(52, 6, $HostName, 1, 0, 'C', 1);
 //$pdf->Cell(20, 6, "LocalChks",1,0,'C');
 $pdf->Cell(22, 6, $Serious, 1, 0, 'C', 1);
 $pdf->Cell(22, 6, $High, 1, 0, 'C', 1);
 $pdf->Cell(22, 6, $Med, 1, 0, 'C', 1);
 $pdf->Cell(22, 6, $Low, 1, 0, 'C', 1);
 $pdf->Cell(22, 6, $Info, 1, 0, 'C', 1);
 //$pdf->Cell(20, 6, "Exceptions",1,0,'C');
 $pdf->Ln();
 foreach ($hosts as $hostIP_ctx => $hostname) {
     list($hostIP, $hostctx) = explode("#", $hostIP_ctx);
     ${"IP_" . $hostIP_ctx} = $pdf->AddLink();
     $pdf->Cell(28, 6, $hostIP, 1, 0, 'C', 0, ${"IP_" . $hostIP_ctx});
     $pdf->Cell(52, 6, $hostname, 1, 0, 'C', 0, ${"IP_" . $hostIP_ctx});
示例#20
0
$pdf = new PDF();
$pdf->AliasNbPages();
$pdf->AddPage('A', 'A3');
$cp = new ControladorPersistencia();
$listadoUsuarios = $cp->ejecutarSentencia(DBSentencias::BUSCAR_USUARIOS);
$alterna = true;
$tipo = "";
foreach ($listadoUsuarios as $usuarios) {
    if ($usuarios['tipoAcceso_usuario'] == 1) {
        $tipo = "Total";
    } else {
        $tipo = "Restringrido";
    }
    if ($alterna) {
        $pdf->SetFont('Arial', '', '12');
        $pdf->SetFillColor(229, 229, 229);
        $pdf->SetTextColor(3, 3, 3);
        $pdf->Cell(60, 10, utf8_decode($usuarios['nombre_usuario']), 1, 0, 'L', true);
        $pdf->Cell(60, 10, utf8_decode($usuarios['apellido_usuario']), 1, 0, 'L', true);
        $pdf->Cell(60, 10, utf8_decode($usuarios['usuario_usuario']), 1, 0, 'L', true);
        $pdf->Cell(60, 10, $tipo, 1, 0, 'L', true);
        $pdf->Cell(80, 10, utf8_decode($usuarios['fch_creacion']), 1, 0, 'L', true);
        $pdf->Cell(80, 10, utf8_decode($usuarios['fch_modificacion']), 1, 0, 'L', true);
        $pdf->Ln();
        $alterna = !$alterna;
    } else {
        $pdf->SetFont('Arial', '', '12');
        $pdf->SetFillColor(229, 229, 229);
        $pdf->SetTextColor(3, 3, 3);
        $pdf->Cell(60, 10, utf8_decode($usuarios['nombre_usuario']), 1, 0, 'L', FALSE);
        $pdf->Cell(60, 10, utf8_decode($usuarios['apellido_usuario']), 1, 0, 'L', FALSE);
// Instanciation of inherited class
$pdf = new PDF('L', 'cm', 'A4');
$pdf->AliasNbPages();
$pdf->AddPage();
//Criando a conexão pelo PDO
$sql = $pdo->prepare("select caixa.tipo, caixa.funcionario, valor_recebido, u.nome, date_format(data_recebimento,'%d/%m/%Y %H:%i:%s') \nfrom caixa join usuarios u on u.id_usuario = usuario_fk \nwhere date_format(data_recebimento,'%H:%i:%s') > '{$h1}' and date_format(data_recebimento,'%H:%i:%s') < '{$h2}' and date_format(data_recebimento,'%Y-%m-%d') = curdate()\norder by u.nome;");
// consulta
$sql->execute();
// executar
//Fim Criando a conexão pelo PDO
//Inserir hífen
$hifen = '-';
//Fim Inserir hífen
//Cabeçalho da tabela
// Colors, line width and bold font
$pdf->SetFillColor(0, 0, 120);
$pdf->SetFillColor(56, 176, 222);
$pdf->SetTextColor(0);
$pdf->SetDrawColor(1, 0, 0);
$pdf->SetLineWidth(0.1);
$pdf->SetFont('Times', 'B', 12);
//setando títulos cabeçalho
//$pdf->Cell(0,1,utf8_decode('RELATÓRIO DE ENTRADAS DIÁRIAS'),1,1,'C',true);
$pdf->Cell(0, 1, utf8_decode('LABORATÓRIO DO EXERCÍCIO - CURSO DE EDUCAÇÃO FÍSICA'), 1, 1, 'C', true);
$pdf->Cell(0, 1, utf8_decode($nome_turno), 1, 1, 'C', false);
$pdf->Cell(0, 1, utf8_decode('UNIMONTES ' . $hifen . ' CAMPUS AVANÇADO DE JANUÁRIA'), 1, 1, 'C', true);
$pdf->Cell(0, 1, utf8_decode(utf8_encode(ucfirst($data))), 1, 1, 'L', false);
$pdf->Cell(4, 1, utf8_decode('Data'), 1, 0, 'C', true);
$pdf->Cell(8, 1, utf8_decode('Cliente'), 1, 0, 'C', true);
$pdf->Cell(4, 1, utf8_decode('Tipo'), 1, 0, 'C', true);
$pdf->Cell(4, 1, utf8_decode('Valor'), 1, 0, 'C', true);
示例#22
0
 $pdf->Ln();
 $pdf->SetFont('Times', '', 10);
 $pdf->Cell(180, 4, 'Año Escolar: 2008', 0, 1, 'R');
 //$pdf->Ln();
 $pdf->Cell(180, 4, 'Informe Anual', 0, 1, 'R');
 $pdf->Ln();
 $pdf->Cell(0, 4, '             Reconocido Oficialmente por el Ministerio de Educación de la República de Chile según decreto Nº1052 del año 1997 ', 0, 1, 'L');
 $pdf->Cell(0, 4, ' Rol Base de Datos 14416-9.-', 0, 1, 'L');
 $pdf->ln();
 $apellidop = $row2["apellidop"];
 $apellidom = $row2["apellidom"];
 $nombres = $row2["nombres"];
 $rut = $row2["rut"];
 $fill = 1;
 //$pdf->SetTextColor(255);
 $pdf->SetFillColor(210);
 $pdf->Cell(0, 5, 'Datos Alumno:', 1, 1, 1, $fill);
 $pdf->SetTextColor(0);
 $pdf->Cell(30, 4, 'Alumno(a): ', 1, 0, 'R');
 $pdf->Cell(0, 4, $apellidop . " " . $apellidom . " " . $nombres, 1, 1, 'L');
 $pdf->Cell(30, 4, 'R.U.T. :', 1, 0, 'R');
 $pdf->Cell(0, 4, $rut, 1, 1, 'L');
 $pdf->Cell(30, 4, 'Curso :', 1, 0, 'R');
 $pdf->Cell(0, 4, mostrar_curso($curso), 1, 1, 'L');
 $pdf->Cell(30, 4, 'Profesor Jefe :', 1, 0, 'R');
 $pdf->Cell(0, 4, $pjefe, 1, 1, 'L');
 $pdf->ln();
 $pdf->SetFont('Arial', 'B', 12);
 $pdf->Cell(0, 10, 'DESARROLLO ESCOLAR', 0, 1, 'C');
 $pdf->SetFont('Times', '', 10);
 $pdf->SetTextColor(0);
示例#23
0
        $this->SetDrawColor(90, 90, 90);
        $this->Line(15, 278, 195, 278);
        $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
    {
        $this->SetFont('Arial', 'B', 10);
    }
    function Footer()
    {
        $this->SetY(-25);
        //Arial bold 7
    }
}
// end function PDF class
$pdf = new PDF();
$pdf->AliasNbPages();
$pdf->AddPage('p');
$pdf->SetFont('Arial', '', 10);
//identifiers
$pdf->SetFillColor(5, 66, 6);
$pdf->SetTextColor(255, 255, 255);
$fill = true;
$pdf->SetFont('Arial', '', 13);
$pdf->Cell(190, 7, 'Employee Clearance Checklist for ' . $person->formatName('f m l'), 0, 1, 'C', $fill);
$pdf->SetFont('Arial', '', 10);
$pdf->Cell(190, 6, 'Username:  '******'C', $fill);
$pdf->setTextColor(5, 66, 6);
$pdf->ln(5);
$checklist_items = array();
$categories = array();
$checklist = HRChecklist::get($person->pidm, $list);
$categories = HRChecklist::categories($checklist['type']);
$checklist_id = HRChecklist::get($person->pidm, $list, 'id');
$closed = HRChecklist::meta_exists($checklist_id, 'closed', 1);
if (IDMObject::authZ('permission', 'ape_checklist_employee_exit_hr')) {
 /**
  *	Show total to pay
  *
  *	@param	PDF			$pdf           Object PDF
  *	@param  Facture		$object         Object invoice
  *	@param  int			$deja_regle     Montant deja regle
  *	@param	int			$posy			Position depart
  *	@param	Translate	$outputlangs	Objet langs
  *	@return int							Position pour suite
  */
 function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs)
 {
     global $conf, $mysoc;
     $sign = 1;
     if ($object->type == 2 && !empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE)) {
         $sign = -1;
     }
     $default_font_size = pdf_getPDFFontSize($outputlangs);
     $tab2_top = $posy;
     $tab2_hl = 4;
     $pdf->SetFont('', '', $default_font_size - 1);
     // Tableau total
     $col1x = 120;
     $col2x = 170;
     if ($this->page_largeur < 210) {
         $col2x -= 20;
     }
     $largcol2 = $this->page_largeur - $this->marge_droite - $col2x;
     $useborder = 0;
     $index = 0;
     // Total HT
     $pdf->SetFillColor(255, 255, 255);
     $pdf->SetXY($col1x, $tab2_top + 0);
     $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1);
     $total_ht = $conf->multicurrency->enabled && $object->mylticurrency_tx != 1 ? $object->multicurrency_total_ht : $object->total_ht;
     $pdf->SetXY($col2x, $tab2_top + 0);
     $pdf->MultiCell($largcol2, $tab2_hl, price($sign * ($total_ht + (!empty($object->remise) ? $object->remise : 0)), 0, $outputlangs), 0, 'R', 1);
     // Show VAT by rates and total
     $pdf->SetFillColor(248, 248, 248);
     $this->atleastoneratenotnull = 0;
     if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) {
         $tvaisnull = !empty($this->tva) && count($this->tva) == 1 && isset($this->tva['0.000']) && is_float($this->tva['0.000']) ? true : false;
         if (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_ISNULL) && $tvaisnull) {
             // Nothing to do
         } else {
             //Local tax 1 before VAT
             //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
             //{
             foreach ($this->localtax1 as $localtax_type => $localtax_rate) {
                 if (in_array((string) $localtax_type, array('1', '3', '5'))) {
                     continue;
                 }
                 foreach ($localtax_rate as $tvakey => $tvaval) {
                     if ($tvakey != 0) {
                         //$this->atleastoneratenotnull++;
                         $index++;
                         $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
                         $tvacompl = '';
                         if (preg_match('/\\*/', $tvakey)) {
                             $tvakey = str_replace('*', '', $tvakey);
                             $tvacompl = " (" . $outputlangs->transnoentities("NonPercuRecuperable") . ")";
                         }
                         $totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code) . ' ';
                         $totalvat .= vatrate(abs($tvakey), 1) . $tvacompl;
                         $pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
                         $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
                         $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1);
                     }
                 }
             }
             //}
             //Local tax 2 before VAT
             //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
             //{
             foreach ($this->localtax2 as $localtax_type => $localtax_rate) {
                 if (in_array((string) $localtax_type, array('1', '3', '5'))) {
                     continue;
                 }
                 foreach ($localtax_rate as $tvakey => $tvaval) {
                     if ($tvakey != 0) {
                         //$this->atleastoneratenotnull++;
                         $index++;
                         $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
                         $tvacompl = '';
                         if (preg_match('/\\*/', $tvakey)) {
                             $tvakey = str_replace('*', '', $tvakey);
                             $tvacompl = " (" . $outputlangs->transnoentities("NonPercuRecuperable") . ")";
                         }
                         $totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code) . ' ';
                         $totalvat .= vatrate(abs($tvakey), 1) . $tvacompl;
                         $pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
                         $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
                         $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1);
                     }
                 }
             }
             //}
             // VAT
             foreach ($this->tva as $tvakey => $tvaval) {
                 if ($tvakey > 0) {
                     $this->atleastoneratenotnull++;
                     $index++;
                     $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
                     $tvacompl = '';
                     if (preg_match('/\\*/', $tvakey)) {
                         $tvakey = str_replace('*', '', $tvakey);
                         $tvacompl = " (" . $outputlangs->transnoentities("NonPercuRecuperable") . ")";
                     }
                     $totalvat = $outputlangs->transnoentities("TotalVAT") . ' ';
                     $totalvat .= vatrate($tvakey, 1) . $tvacompl;
                     $pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
                     $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
                     $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1);
                 }
             }
             //Local tax 1 after VAT
             //if (! empty($conf->global->FACTURE_LOCAL_TAX1_OPTION) && $conf->global->FACTURE_LOCAL_TAX1_OPTION=='localtax1on')
             //{
             foreach ($this->localtax1 as $localtax_type => $localtax_rate) {
                 if (in_array((string) $localtax_type, array('2', '4', '6'))) {
                     continue;
                 }
                 foreach ($localtax_rate as $tvakey => $tvaval) {
                     if ($tvakey != 0) {
                         //$this->atleastoneratenotnull++;
                         $index++;
                         $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
                         $tvacompl = '';
                         if (preg_match('/\\*/', $tvakey)) {
                             $tvakey = str_replace('*', '', $tvakey);
                             $tvacompl = " (" . $outputlangs->transnoentities("NonPercuRecuperable") . ")";
                         }
                         $totalvat = $outputlangs->transcountrynoentities("TotalLT1", $mysoc->country_code) . ' ';
                         $totalvat .= vatrate(abs($tvakey), 1) . $tvacompl;
                         $pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
                         $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
                         $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1);
                     }
                 }
             }
             //}
             //Local tax 2 after VAT
             //if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
             //{
             foreach ($this->localtax2 as $localtax_type => $localtax_rate) {
                 if (in_array((string) $localtax_type, array('2', '4', '6'))) {
                     continue;
                 }
                 foreach ($localtax_rate as $tvakey => $tvaval) {
                     // retrieve global local tax
                     if ($tvakey != 0) {
                         //$this->atleastoneratenotnull++;
                         $index++;
                         $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
                         $tvacompl = '';
                         if (preg_match('/\\*/', $tvakey)) {
                             $tvakey = str_replace('*', '', $tvakey);
                             $tvacompl = " (" . $outputlangs->transnoentities("NonPercuRecuperable") . ")";
                         }
                         $totalvat = $outputlangs->transcountrynoentities("TotalLT2", $mysoc->country_code) . ' ';
                         $totalvat .= vatrate(abs($tvakey), 1) . $tvacompl;
                         $pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
                         $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
                         $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1);
                     }
                 }
                 //}
             }
             // Revenue stamp
             if (price2num($object->revenuestamp) != 0) {
                 $index++;
                 $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
                 $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("RevenueStamp"), $useborder, 'L', 1);
                 $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
                 $pdf->MultiCell($largcol2, $tab2_hl, price($sign * $object->revenuestamp), $useborder, 'R', 1);
             }
             // Total TTC
             $index++;
             $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
             $pdf->SetTextColor(0, 0, 60);
             $pdf->SetFillColor(224, 224, 224);
             $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("TotalTTC"), $useborder, 'L', 1);
             $total_ttc = $conf->multicurrency->enabled && $object->multiccurency_tx != 1 ? $object->multicurrency_total_ttc : $object->total_ttc;
             $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
             $pdf->MultiCell($largcol2, $tab2_hl, price($sign * $total_ttc, 0, $outputlangs), $useborder, 'R', 1);
         }
     }
     $pdf->SetTextColor(0, 0, 0);
     $creditnoteamount = $object->getSumCreditNotesUsed();
     $depositsamount = $object->getSumDepositsUsed();
     //print "x".$creditnoteamount."-".$depositsamount;exit;
     $resteapayer = price2num($object->total_ttc - $deja_regle - $creditnoteamount - $depositsamount, 'MT');
     if ($object->paye) {
         $resteapayer = 0;
     }
     if ($deja_regle > 0 || $creditnoteamount > 0 || $depositsamount > 0) {
         // Already paid + Deposits
         $index++;
         $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
         $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("Paid"), 0, 'L', 0);
         $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
         $pdf->MultiCell($largcol2, $tab2_hl, price($deja_regle + $depositsamount, 0, $outputlangs), 0, 'R', 0);
         // Credit note
         if ($creditnoteamount) {
             $index++;
             $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
             $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("CreditNotes"), 0, 'L', 0);
             $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
             $pdf->MultiCell($largcol2, $tab2_hl, price($creditnoteamount, 0, $outputlangs), 0, 'R', 0);
         }
         // Escompte
         if ($object->close_code == Facture::CLOSECODE_DISCOUNTVAT) {
             $index++;
             $pdf->SetFillColor(255, 255, 255);
             $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
             $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("EscompteOfferedShort"), $useborder, 'L', 1);
             $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
             $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc - $deja_regle - $creditnoteamount - $depositsamount, 0, $outputlangs), $useborder, 'R', 1);
             $resteapayer = 0;
         }
         $index++;
         $pdf->SetTextColor(0, 0, 60);
         $pdf->SetFillColor(224, 224, 224);
         $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
         $pdf->MultiCell($col2x - $col1x, $tab2_hl, $outputlangs->transnoentities("RemainderToPay"), $useborder, 'L', 1);
         $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
         $pdf->MultiCell($largcol2, $tab2_hl, price($resteapayer, 0, $outputlangs), $useborder, 'R', 1);
         $pdf->SetFont('', '', $default_font_size - 1);
         $pdf->SetTextColor(0, 0, 0);
     }
     $index++;
     return $tab2_top + $tab2_hl * $index;
 }
示例#26
0
</div><!-- END div.main -->
</div><!-- END div.page -->
</body>
</html>
<?php 
} else {
    //
    //
    //	Begin Report Generation
    //
    //
    $pdf = new PDF();
    $pdf->AliasNbPages();
    include_once "loadfonts.php";
    $pdf->SetFont($config->ParameterArray['PDFfont'], '', 8);
    $pdf->SetFillColor(0, 0, 0);
    $pdf->SetTextColor(255);
    $pdf->SetDrawColor(128, 0, 0);
    $pdf->SetLineWidth(0.3);
    $pdf->SetfillColor(224, 235, 255);
    $pdf->SetTextColor(0);
    $column = 0;
    $pdf->SetLeftMargin(10);
    $pdf->AddPage();
    $pdf->Bookmark("Surplus/Salvage by Date");
    $pdf->Cell(80, 5, __("Surplus/Salvage by Date"));
    $pdf->Ln();
    $headerTags = array(__("Surplus Date"), __("Name"), __("Serial Number"), __("Asset Tag"), __("UserName"));
    $cellWidths = array(30, 40, 40, 30, 30);
    $fill = 0;
    $maxval = count($headerTags);
         $this->Cell(11 / 100 * $width, $height, $_SESSION['lang']['jenisbibit'], 1, 0, 'C', 1);
         $this->Cell(8 / 100 * $width, $height, $_SESSION['lang']['tgltanam'] . " " . substr($_SESSION['lang']['afkirbibit'], 5), 1, 0, 'C', 1);
         $this->Cell(8 / 100 * $width, $height, $_SESSION['lang']['umur'], 1, 1, 'C', 1);
     }
     function Footer()
     {
         $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);
 $where = "";
 if ($kdBatch != '') {
     $where = " and batch='" . $kdBatch . "'";
 }
 $sData = "select distinct batch,kodeorg,sum(jumlah) as jumlah from " . $dbname . ".bibitan_mutasi where kodeorg like '%" . $kdUnit . "%'  " . $where . " and post = 1 group by batch,kodeorg order by tanggal desc ";
 // exit("error".$sData);
 $qData = mysql_query($sData) or die(mysql_error());
 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']);
示例#28
0
session_start();
include_once "../clases/clase_articulo.php";
include_once "../clases/clase_pdf_articulo.php";
$articulo = new articulo();
$parametro = $_SESSION["id2"];
$articulo->settipoarticulo($parametro);
$lista = $articulo->buscarticulo();
$pdf = new PDF('L', 'mm', 'Letter');
$pdf->Open();
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetFont('Times', '', 12);
$pdf->SetMargins(20, 20, 20);
$pdf->Ln(0);
$pdf->SetFont('Arial', 'B', 14);
$pdf->SetFillColor(170, 0, 0);
$pdf->SetTextColor(255);
$pdf->Cell(40, 6, 'Codigo', 1, 0, 'C', true);
$pdf->Cell(55, 6, 'Descripcion', 1, 0, 'C', true);
$pdf->Cell(35, 6, 'Tipo', 1, 0, 'C', true);
$pdf->Cell(35, 6, 'U/M', 1, 0, 'C', true);
$pdf->Cell(35, 6, 'Existencia', 1, 0, 'C', true);
$pdf->Cell(40, 6, 'Ubicacion', 1, 1, 'C', true);
if ($lista == "-1") {
    header("Location: ../php/error.php?url=../controladores/cierra_consulta.php & codigo=14 & mensaje2= Volver al Menu de Inicio.  ");
} else {
    for ($i = 0; $i < count($lista); $i++) {
        $codarti = $lista[$i][1];
        $descrip = $lista[$i][2];
        $tipo = $lista[$i][3];
        $idmedida = $lista[$i][4];
示例#29
0
$pdf->SetFont('Arial', 'U', 12);
$ar = round($pdf->GetY());
$pdf->SetY($ar + 5);
$pdf->Cell(190, 5, strtoupper("Purchase Order"), 0, 1, 'C');
$pdf->SetY($ar + 12);
//no po + tanggal po
$pdf->SetFont('Arial', '', 8);
$pdf->Cell(10, 4, "", 0, 0, 'L');
$pdf->Cell(20, 4, " ", 0, 0, 'L');
$pdf->SetX(163);
$pdf->Cell(20, 4, $_SESSION['lang']['tanggal'], 0, 0, 'L');
$pdf->Cell(20, 4, ": " . $tglPo, 0, 0, 'L');
$pdf->SetY($ar + 17);
//title
$pdf->SetFont('Arial', 'B', 8);
$pdf->SetFillColor(220, 220, 220);
$pdf->Cell(8, 5, 'No', 1, 0, 'L', 1);
$pdf->Cell(12, 5, $_SESSION['lang']['kodeabs'], 1, 0, 'C', 1);
$pdf->Cell(60, 5, $_SESSION['lang']['namabarang'], 1, 0, 'C', 1);
$pdf->Cell(12, 5, $_SESSION['lang']['nopp'], 1, 0, 'C', 1);
$pdf->Cell(12, 5, $_SESSION['lang']['untukunit'], 1, 0, 'C', 1);
$pdf->Cell(15, 5, $_SESSION['lang']['jumlah'], 1, 0, 'C', 1);
$pdf->Cell(14, 5, $_SESSION['lang']['satuan'], 1, 0, 'C', 1);
$pdf->Cell(29, 5, $_SESSION['lang']['hargasatuan'], 1, 0, 'C', 1);
$pdf->Cell(26, 5, 'Total', 1, 1, 'C', 1);
$pdf->SetFillColor(255, 255, 255);
$pdf->SetFont('Arial', '', 8);
$str = "select a.*,b.kodesupplier,b.subtotal,b.diskonpersen,b.tanggal,b.nilaidiskon,b.ppn,b.nilaipo,b.tanggalkirim,b.lokasipengiriman,b.uraian,b.matauang from " . $dbname . ".log_podt a inner join " . $dbname . ".log_poht b on a.nopo=b.nopo  where a.nopo='" . $_GET['column'] . "'";
//echo $str;exit();
$re = mysql_query($str);
$no = 0;
示例#30
0
$total = 0;
$sub = 0;
$desc = 0;
$ivaT = 0;
$repetido = 0;
$consulta = pg_query('select * from proveedores order by id_proveedor asc');
while ($row = pg_fetch_row($consulta)) {
    $repetido = 0;
    $sub = 0;
    $contador = 0;
    $sql1 = pg_query("select * from factura_compra where estado='Activo' and id_proveedor='{$row['0']}' and forma_pago='Credito' order by forma_pago asc;");
    if (pg_num_rows($sql1)) {
        while ($row1 = pg_fetch_row($sql1)) {
            if ($repetido == 0) {
                $pdf->SetX(1);
                $pdf->SetFillColor(187, 179, 180);
                $pdf->Cell(70, 6, maxCaracter(utf8_decode('RUC/CI:' . $row[2]), 35), 1, 0, 'L', 1);
                $pdf->Cell(135, 6, maxCaracter(utf8_decode('NOMBRES:' . $row[3]), 50), 1, 1, 'L', 1);
                $pdf->Ln(2);
                $pdf->SetX(1);
                $pdf->Cell(25, 6, utf8_decode('Comprobante'), 1, 0, 'C', 0);
                $pdf->Cell(30, 6, utf8_decode('Tipo Documento'), 1, 0, 'C', 0);
                $pdf->Cell(45, 6, utf8_decode('Nro Factura'), 1, 0, 'C', 0);
                $pdf->Cell(25, 6, utf8_decode('Total'), 1, 0, 'C', 0);
                $pdf->Cell(25, 6, utf8_decode('Valor Pago'), 1, 0, 'C', 0);
                $pdf->Cell(25, 6, utf8_decode('Saldo'), 1, 0, 'C', 0);
                $pdf->Cell(30, 6, utf8_decode('Fecha Pago'), 1, 1, 'C', 0);
                $repetido = 1;
                $contador = 1;
            }
            $sql2 = pg_query("select * from factura_compra,pagos_compra where factura_compra.id_factura_compra= pagos_compra.id_factura_compra and pagos_compra.estado='Activo' and pagos_compra.id_proveedor='{$row['0']}' and factura_compra.id_factura_compra='{$row1['0']}'");