$pdf->Ln();
$pdf->SetFillColor(230, 230, 230);
$pdf->Cell(55, $high, "Accommodation Dates", $border, 0, '', true);
$pdf->SetFillColor(255, 255, 255);
$arr = mostrar_fecha($arrResident[arrival]);
$dep = mostrar_fecha($arrResident[departure]);
$pdf->Cell(63, $high, "From: " . $arr, $border, 0, '', true);
$pdf->Cell(62, $high, "To: " . $dep, $border, 0, '', true);
$pdf->Ln();
$pdf->Ln();
$pdf->SetFillColor(230, 230, 230);
$pdf->Cell($width2, $high, "Schools attended (with dates)", $border, 0, '', true);
$pdf->Cell($width2, $high, "School examinations passed (with grades)", $border, 0, '', true);
$pdf->Ln();
$pdf->SetWidths(array($width2, $width2));
$pdf->Row(array($arrResident[school_attended], $arrResident[school_examinations]));
$pdf->SetFillColor(230, 230, 230);
$pdf->Cell($width2, $high, "Universities attended", $border, 0, '', true);
$pdf->Cell($width2, $high, "Qualifications obtained (with grades)", $border, 0, '', true);
$pdf->Ln();
$pdf->SetFillColor(255, 255, 255);
$pdf->SetWidths(array($width2, $width2));
$pdf->Row(array($arrResident[universities_attended], $arrResident[qualifications_obtained]));
$pdf->Ln();
$pdf->SetFillColor(230, 230, 230);
$pdf->Cell($width2, $high, "Scholarship(s) held", $border, 0, '', true);
$pdf->Cell($width2, $high, "Occupation, if any, since leaving school", $border, 0, '', true);
$pdf->Ln();
$pdf->SetFillColor(255, 255, 255);
$pdf->SetWidths(array($width2, $width2));
$pdf->Row(array($arrResident[scholarship_help], $arrResident[occupation]));
Example #2
0
$pdf->SetFont($PDFFont, '', $PDFFontsize1);
require_once 'pos_pdf.inc.php';
$pdf->Ln();
$pdf->SetFont($PDFFont, '', $PDFFontsize2);
$pdf->SetWidths(array(50, 30));
$pdf->SetAligns(array('L', 'R'));
// Total amount
//
if (isset($CompanyCurrency) && $CompanyCurrency == 'EUR') {
    $Currency = EUR;
} else {
    $Currency = $CompanyCurrency;
}
if (isset($Type) && $Type == 'Booking_Details' or $Type == 'Customer_Booking_Details') {
    $pdf->SetFont($PDFFont, 'BU');
    $pdf->Row(array($a['invoice_amount'] . ':', Format_Number($TotalAmount) . ' ' . $Currency));
} else {
    if (isset($Type) && $Type == 'Cashbook') {
        $pdf->SetFont($PDFFont, 'U', $PDFFontsize2);
        $pdf->Row(array($a['starting_with'] . ':', Format_Number($StartingWith) . ' ' . $Currency));
        $pdf->SetFont($PDFFont, '', $PDFFontsize2);
        $pdf->Row(array($a['takings'] . ':', Format_Number($TotalTakings) . ' ' . $Currency));
        $pdf->Row(array($a['expenditures'] . ':', Format_Number($TotalExpenditures) . ' ' . $Currency));
        $pdf->SetFont($PDFFont, 'BU');
        $pdf->Row(array($a['cash_in_hand'] . ':', Format_Number($CashInHand) . ' ' . $Currency));
    } else {
        if (isset($Type) && $Type == 'Customer_Invoices' or $Type == 'Invoice_Ledger' or $Type == 'Outstanding_Accounts' or $Type == 'Customer_Outstanding_Accounts' or $Type == 'User_Outstanding_Accounts') {
            $pdf->SetFont($PDFFont, 'BU');
            $pdf->Row(array($a['invoice_amount'] . ':', Format_Number($TotalInvoiceAmount) . ' ' . $Currency));
            $pdf->SetFont($PDFFont, 'U');
            $pdf->Row(array($a['open_account'] . ':', Format_Number($TotalOpenAmount) . ' ' . $Currency));
Example #3
0
<?php

define('FPDF_FONTPATH', 'fpdf/font/');
require 'mc_table.php';
$pdf = new PDF_MC_Table('P', 'cm', "Legal");
$pdf->Open();
$pdf->AddPage();
$pdf->AliasNbPages();
$pdf->SetMargins(1, 1, 1);
$pdf->SetFont('times', 'B', 12);
$pdf->Cell(0, 0.9, 'Laporan Barang', 0, 0, 'C');
$pdf->Ln();
$tgl = date('Y-m-d');
$pdf->SetFont('times', 'B', 8);
$pdf->SetFont('times', 'B', 10);
$pdf->SetWidths(array(1, 8, 1.8, 2.1));
$pdf->SetHeight(0.1);
$pdf->Row(array("NO", "NAMA", "SATUAN", "STOK"));
$pdf->SetFont('times', '', 10);
$pdf->Row(array("1", "Buku Tulis Matematika Kualitas ABCD Kiki 80 gram 1 Lusin ", "Lusin", "100"));
$pdf->Output();
?>

Example #4
0
    $courier = "TODOS";
} else {
    $courier = $empresas->devuelve_courier($_REQUEST['courier_destino']);
}
$cargo->nuevo_manifiestodiario($numeromanifiesto, $_REQUEST['courier_destino'], $_REQUEST['fecha'], $_REQUEST['fechaf']);
$pdf->Cell(275, 10, 'MANIFIESTO Nº ' . $numeromanifiesto . '', 0, 0, 'C');
$pdf->Ln(10);
$pdf->Cell(50, 5, 'DE: PERUMAIL EXPRESS S.A.C.', 0, 0, 'L');
$pdf->Cell(170, 5, 'PARA: ' . $courier . '', 0, 0, 'L');
$pdf->Cell(39, 5, 'FECHA: del ' . $_REQUEST['fecha'] . ' al ' . $_REQUEST['fechaf'] . '', 0, 0, 'L');
$pdf->Ln(5);
$pdf->Cell(275, 5, '', 0, 0, 'C');
$pdf->Ln(5);
$pdf->SetWidths(array(8, 62, 10, 55, 80, 19, 20, 18));
//srand(microtime()*1000000);
$pdf->Row(array('Nº', 'Empresa Remitente', 'Nº Guia', 'Consignado', 'Dirección', 'Destino', 'Tipo de Envio', 'Peso'));
$rs = $cargo->cargocourier_listar($_REQUEST['courier_destino'], '', '', $_REQUEST['fecha'], $_REQUEST['fechaf'], '3', '');
$rs = mysql_query($rs, $cargo->con->cn);
if ($rs) {
    $j = 1;
    while ($campo = mysql_fetch_array($rs)) {
        //cargamos a las variables los campos de la bd
        $guia = $campo['carcou_id'];
        $razonsocial = $campo['emprem_razonsocial'];
        $direccion = $campo['carcou_direccion'] . ' - ' . $campo['carcou_distrito'];
        $consignado = $campo['carcou_consignadoa'];
        $ciudad = $auxiliares->devuelve_ciudad($campo['ciu_id']);
        $tipoenvio = $campo['carcou_cantidad'] . ' ' . $campo['tipoenv_descripcion'];
        $peso = $campo['carcou_peso'] . ' Kg';
        $observaciones = $campo['carcou_observaciones'];
        if ($cargo->util->obtienefecha($campo['carcou_fecharecepcion']) != '00/00/0000') {
	$titulo_actividad="Destino";	
}
*/
if ($_REQUEST['fecha'] != '' && $_REQUEST['fechaf'] != '') {
    $fecha = $_REQUEST['fecha'];
    $fechaf = $_REQUEST['fechaf'];
    $fechas = 'Comprobantes emitidos desde el ' . $fecha . ' al ' . $fechaf;
}
$pdf->Cell(295, 10, 'REPORTE DE COMPROBANTES EMITIDOS', 0, 0, 'C');
$pdf->Ln(10);
if ($fechas != '') {
    $pdf->Cell(295, 10, $fechas, 0, 0, 'C');
    $pdf->Ln(10);
}
$pdf->SetWidths(array(120, 20, 25, 15, 25, 25, 25, 15));
$pdf->Row(array('Cliente', 'Tipo', 'Nº Comprobante', 'Fecha', 'Subtotal', 'IGV', 'Total', 'Estado'));
$j = '1';
$rs = $venta->venta_consulta($_REQUEST['cliente'], $_REQUEST['tipocomprobante'], $_REQUEST['fecha'], $_REQUEST['fechaf'], '1');
$suma_precio = 0;
$suma_importe = 0;
while ($campo = mysql_fetch_array($rs)) {
    $fecha = $venta->_util->obtienefecha($campo['ven_fecha']);
    $cliente = $campo['cli_razonsocial'];
    $tipo = $campo['tipc_descripcion'];
    $incluyeigv = $campo['ven_incluyeigv'];
    $comprobante = $venta->_util->ceros_izquierda($campo['ven_nro_doc'], 5);
    $comprobante_serie = $venta->_util->ceros_izquierda($campo['ven_serie_doc'], 3);
    if ($incluyeigv == 0) {
        $subtotal = $venta->sumaimporte_detalleventa($campo['ven_id'], 2);
        $igv = $subtotal * 0.19;
        $total = $subtotal + $igv;
Example #6
0
 $pdf->Cell(96, 5, "PARTE DE FALTAS DEL GRUPO {$unidad}", 0, 0, 'L');
 $pdf->Cell(81, 5, "SEMANA: _______________________", 0, 0, 'C');
 $pdf->Cell(96, 5, "TUTOR/A: {$tutor['0']}", 0, 1, 'R');
 $pdf->Ln(1);
 $pdf->SetLineWidth(0.6);
 // Grosor de linea
 for ($i = 0; $i < 6; $i++) {
     $pdf->Line(74 + 42 * $i, 16.2, 74 + 42 * $i, 16 + 10);
 }
 $pdf->SetLineWidth(0.2);
 // Grosor por defecto
 // PRIMERA FILA
 $pdf->SetFont('NewsGotT', 'B', 10);
 $pdf->SetWidths(array(63, 42, 42, 42, 42, 42));
 $pdf->SetAligns(array('L', 'C', 'C', 'C', 'C', 'C'));
 $pdf->Row(array('', 'LUNES', 'MARTES', 'MIÉRCOLES', 'JUEVES', 'VIERNES'));
 // SEGUNDA FILA
 $pdf->SetWidths(array(8, 55, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7));
 $pdf->SetAligns(array('C', 'L', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C'));
 $pdf->Row(array('#', 'Alumno/a', '1', '2', '3', '4', '5', '6', '1', '2', '3', '4', '5', '6', '1', '2', '3', '4', '5', '6', '1', '2', '3', '4', '5', '6', '1', '2', '3', '4', '5', '6'));
 // RESTO DE LA TABLA
 $pdf->SetFont('NewsGotT', '', 10);
 $pdf->SetFillColor(239, 240, 239);
 // Color de sombreado
 // Consultamos los alumnos del grupo seleccionado
 $result = mysqli_query($db_con, "SELECT nc, CONCAT(apellidos,', ',nombre) AS alumno FROM FALUMNOS WHERE unidad='{$unidad}' ORDER BY nc ASC");
 $i = 0;
 while ($alumno = mysqli_fetch_array($result)) {
     if ($i % 2 == 0) {
         $somb = 'DF';
     } else {
$pdf->SetMargins(0.7, 0.7, 0.7, 0.7);
#tampilkan judul laporan
$pdf->SetFont('Arial', 'B', '16');
$pdf->Cell(0, 0, "CIPAGANTI RENTAL CAR & TRAVEL", '0', 1, 'C');
$pdf->Cell(0, 2, "HASIL SEWA KENDARAAN", '0', 1, 'C');
$pdf->SetFont('Arial', 'B', '12');
$pdf->Cell(3, 3, "CABANG : " . $gudang, 0, 0, 'L');
$pdf->Cell(25.2, 3, "PERIODE : " . DateToIndo($mulai) . " - " . DateToIndo($akhir), 0, 0, 'R');
//membuat kop tabel
$y = $pdf->GetY();
$pdf->SetY($y + 2.5);
$pdf->SetFont('Arial', 'B', 11);
$pdf->SetWidths(array(2.3, 2.5, 2.5, 2.5, 3.7, 2.2, 2.2, 2.6, 2.6, 2.6, 2.6));
$pdf->SetHeight(0.1);
$pdf->SetAligns(array('C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C'));
$pdf->Row(array("CSO", "Berangkat", "No. Order", "No. Kendaraan", "Merk Kendaraan", "Periode Awal", "Periode Akhir", "Customer", "T.Sewa", "T.Bayar", "Piutang"));
$pdf->SetFont('Arial', 'B', 9);
$pdf->SetWidths(array(28.3));
$pdf->Row(array("SEWA KENDARAAN RETAIL"));
//ISI TABEL
$pdf->SetFont('Arial', '', 9);
$pdf->SetWidths(array(2.3, 2.5, 2.5, 2.5, 3.7, 2.2, 2.2, 2.6, 2.6, 2.6, 2.6));
$pdf->SetHeight(0.1);
$pdf->SetAligns(array('C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C'));
$query_data = $getquery;
$query = mysql_query($query_data) or die("Query gagal");
while ($result = mysql_fetch_array($query)) {
    $pdf->Row(array($result['cso'], DateToIndoAngka($result['checkin']), $result['no_ref'], $result['kendaraan'], $result['merk'] . '-' . $result['tipekendaraan'], DateToIndoAngka($result['tgl']), DateToIndoAngka($result['jatuhtempo']), $result['nama'], number_format($result['totalsewa'], 0, ',', '.') . ",-", number_format($result['totalbayar'], 0, ',', '.') . ",-", number_format($result['sisakekurangan'], 0, ',', '.') . ",-"));
    $totalsw = $totalsw + $result['totalsewa'];
    $totalbyr = $totalbyr + $result['totalbayar'];
    $totalsisa = $totalsisa + $result['sisakekurangan'];
    $empresa = $empresas->devuelve_empresaremite($_REQUEST['empresa_remite']);
}
$cargo->nuevo_reportemensual($numeroreportemensual, $_REQUEST['empresa_remite'], $_REQUEST['fecha'], $_REQUEST['fechaf']);
$pdf->Cell(270, 10, 'REPORTE MENSUAL Nº ' . $numeroreportemensual . '', 0, 0, 'C');
$pdf->Ln(10);
$pdf->Cell(50, 5, 'DE: PERUMAIL EXPRESS S.A.C.', 0, 0, 'L');
//$pdf->Ln(5);
$pdf->Cell(145, 5, 'PARA: ' . $empresa . '', 0, 0, 'L');
//$pdf->Ln(5);
$pdf->Cell(150, 5, 'FECHA: del ' . $_REQUEST['fecha'] . ' al ' . $_REQUEST['fechaf'] . '', 0, 0, 'L');
$pdf->Ln(5);
$pdf->Cell(275, 5, '', 0, 0, 'C');
$pdf->Ln(5);
$pdf->SetWidths(array(10, 15, 24, 38, 12, 20, 15, 18, 20, 18, 18, 18, 18, 18, 18, 18));
//srand(microtime()*1000000);
$pdf->Row(array('Nº', 'Fec. Emis.', 'Zona', 'Destino', 'Nº Guia', 'Tipo de Envio', 'Peso', '1er Kg.', 'Kg. Adicional', 'Volumen', 'Costo Servicio', 'Fragilidad', 'Embalaje', 'Importe'));
$rs = $cargo->cargocourier_listar('', '', $_REQUEST['empresa_remite'], $_REQUEST['fecha'], $_REQUEST['fechaf'], '4', '');
$rs = mysql_query($rs, $cargo->con->cn);
if ($rs) {
    $j = 1;
    $suma_subtotal = 0;
    $suma_igv = 0;
    $suma_total = 0;
    while ($campo = mysql_fetch_array($rs)) {
        //cargamos a las variables los campos de la bd
        if ($cargo->util->obtienefecha($campo['carcou_fecha']) != '00/00/0000') {
            $fecha = $cargo->util->obtienefecha($campo['carcou_fecha']);
        } else {
            $fecha = '';
        }
        $incluye_igv = $campo['carcou_incluyeigv'];
    $empresa = $empresas->devuelve_empresaremite($_REQUEST['empresa_remite']);
}
//$cargo->nuevo_reportemensual($numeroreporte,$_REQUEST['empresa_remite'],$_REQUEST['fecha'],$_REQUEST['fechaf']);
$pdf->Cell(270, 10, 'REPORTE TECNICO DE CARGOS MASIVOS Nº ' . $numeroreporte . '', 0, 0, 'C');
$pdf->Ln(10);
$pdf->Cell(50, 5, 'DE: PERUMAIL EXPRESS S.A.C.', 0, 0, 'L');
//$pdf->Ln(5);
$pdf->Cell(145, 5, 'PARA: ' . $empresa . '', 0, 0, 'L');
//$pdf->Ln(5);
$pdf->Cell(150, 5, 'FECHA: del ' . $_REQUEST['fecha'] . ' al ' . $_REQUEST['fecha2'] . '', 0, 0, 'L');
$pdf->Ln(5);
$pdf->Cell(275, 5, '', 0, 0, 'C');
$pdf->Ln(5);
$pdf->SetWidths(array(10, 15, 20, 20, 60, 60, 25, 25));
//srand(microtime()*1000000);
$pdf->Row(array('Nº', 'Nº Guia', 'Fec. Emis.', 'Zona', 'Consignado', 'Direccion', 'Ciudad', 'Observaciones'));
//$rs= $cargo->cargocourier_listar('','',$_REQUEST['empresa_remite'],$_REQUEST['fecha'],$_REQUEST['fechaf'],'4','');
$rs = $cargo->cargomasivo_listar_impresion('4', $_REQUEST['empresa_remite'], $_REQUEST['fecha'], $_REQUEST['fecha2'], $_REQUEST['estado'], '');
// mysql_query($rs,$cargo->con->cn);
if ($rs) {
    $j = 1;
    /*$suma_subtotal=0;
    		$suma_igv=0;
    		$suma_total=0;*/
    while ($campo = mysql_fetch_array($rs)) {
        //cargamos a las variables los campos de la bd
        if ($cargo->util->obtienefecha($campo['cmas_fecha']) != '00/00/0000') {
            $fecha = $cargo->util->obtienefecha($campo['cmas_fecha']);
        } else {
            $fecha = '';
        }
$pdf->SetFont('GillSans', '', 10);
$pdf->SetFillColor(249, 250, 252);
$pdf->Cell(70, 4, ' Estructura Programática ', 0, 0, 'L', 0);
$pdf->Cell(70, 4, 'Ejercicio: 2015 ', 0, 0, 'L', 0);
$pdf->Ln(5);
$pdf->SetFont('GillSans', 'B', 10);
$pdf->Cell(240, 4, 'Catálogo de Programas', 1, 1, 'C', 1);
$pdf->SetFont('GillSans', '', 10);
$y = $pdf->GetY();
$x = $pdf->GetX();
$pdf->MultiCell(20, 8, 'ID', 1, 'C', 1);
$pdf->SetXY($x + 20, $y);
$pdf->MultiCell(40, 8, 'Clave', 1, 'C', 1);
$pdf->SetXY($x + 60, $y);
$pdf->MultiCell(150, 8, 'Descripción', 1, 'C', 1);
$pdf->SetXY($x + 210, $y);
$pdf->Cell(30, 8, 'Tipo', 1, 0, 'C', 1);
$pdf->Cell(0, 4, '', 0, 1, 'C', 0);
$pdf->Ln(4);
//ciclo
$pdf->SetFont('GillSans', 'L', 12);
$pdf->SetWidths(array(20, 40, 150, 30));
foreach ($avPrg as $key => $value) {
    $c1 = $key;
    $c2 = $value['cve'];
    $c3 = $value['dsc'];
    $c4 = $value['tpo'];
    $pdf->Row(array($c1, $c2, $c3, $c4));
}
//-----------------------Termina ciclo----------------------------------------
$pdf->Output("Programas.pdf", 'I');
    $empresa = $empresas->devuelve_empresaremite($_REQUEST['empresa_remite']);
}
//$cargo->nuevo_reportemensual($numeroreporte,$_REQUEST['empresa_remite'],$_REQUEST['fecha'],$_REQUEST['fechaf']);
$pdf->Cell(270, 10, 'REPORTE ECONOMICO DE CARGOS MASIVOS Nº ' . $numeroreporte . '', 0, 0, 'C');
$pdf->Ln(10);
$pdf->Cell(50, 5, 'DE: PERUMAIL EXPRESS S.A.C.', 0, 0, 'L');
//$pdf->Ln(5);
$pdf->Cell(145, 5, 'PARA: ' . $empresa . '', 0, 0, 'L');
//$pdf->Ln(5);
$pdf->Cell(150, 5, 'FECHA: del ' . $_REQUEST['fecha'] . ' al ' . $_REQUEST['fecha2'] . '', 0, 0, 'L');
$pdf->Ln(5);
$pdf->Cell(275, 5, '', 0, 0, 'C');
$pdf->Ln(5);
$pdf->SetWidths(array(10, 15, 15, 20, 40, 40, 25, 20, 20, 20, 20, 20));
//srand(microtime()*1000000);
$pdf->Row(array('Nº', 'Nº Guia', 'Fec. Emis.', 'Zona', 'Consignado', 'Direccion', 'Ciudad', 'Observaciones', 'Costo tipo envio', 'Costo envio', 'Costo caserio', 'Importe'));
//$rs= $cargo->cargocourier_listar('','',$_REQUEST['empresa_remite'],$_REQUEST['fecha'],$_REQUEST['fechaf'],'4','');
$rs = $cargo->cargomasivo_listar_impresion('4', $_REQUEST['empresa_remite'], $_REQUEST['fecha'], $_REQUEST['fecha2'], $_REQUEST['estado'], '');
// mysql_query($rs,$cargo->con->cn);
if ($rs) {
    $j = 1;
    $suma_subtotal = 0;
    $suma_igv = 0;
    $suma_total = 0;
    while ($campo = mysql_fetch_array($rs)) {
        //cargamos a las variables los campos de la bd
        if ($cargo->util->obtienefecha($campo['cmas_fecha']) != '00/00/0000') {
            $fecha = $cargo->util->obtienefecha($campo['cmas_fecha']);
        } else {
            $fecha = '';
        }
Example #12
0
 $pdf->SetTextColor(0, 0, 0);
 $pdf->Ln();
 $pdf->MultiCell($width, 5, sav2_convert("ЗАЯВЛЕНИЕ \n о признании семьи или одиноко проживающего гражданина \n малоимущими и назначении государственной социальной помощи"), 0, 'C');
 $pdf->Ln();
 $pdf->Cell(6, 5, sav2_convert('от'), 0);
 $pdf->SetTextColor(0, 0, 255);
 $pdf->MultiCell($width, 5, sav2_convert($applyData->{'customer-fio'}), 'B', 'C');
 $pdf->SetTextColor(0, 0, 0);
 $pdf->Cell($width, 5, sav2_convert("(фамилия, имя, отчество)"), 0, 1, 'C');
 $pdf->Cell($width, 6, sav2_convert("зарегистрированного(ой) по месту жительства (месту пребывания) по адресу:"), 0, 1, 'L');
 $pdf->SetTextColor(0, 0, 255);
 $pdf->MultiCell($width, 6, sav2_convert($applyData->{'customer-dwelling'}), 'B', 'C');
 $pdf->SetTextColor(0, 0, 0);
 $pdf->Ln();
 $pdf->SetWidths(array(60, 40, 35, 40));
 $pdf->Row(array(sav2_convert("Наименование документа, удостоверяющего личность:"), sav2_convert($applyData->{'customer-id-doc-name'}), sav2_convert("Дата выдачи:"), sav2_convert($applyData->{'customer-id-doc-givendate'})));
 $pdf->Row(array(sav2_convert("Серия и \nномер документа:"), sav2_convert($applyData->{'customer-id-doc-vol'} . " " . $applyData->{'customer-id-doc-num'}), sav2_convert("Дата рождения:"), sav2_convert($applyData->{'customer-birthdate'})));
 $pdf->Row(array(sav2_convert("Кем \nвыдан:"), sav2_convert($applyData->{'customer-id-doc-givenbywhom'}), sav2_convert("Номер телефона:"), sav2_convert($applyData->{'customer-phonenum'})));
 $pdf->Ln();
 $pdf->MultiCell($width, 5, sav2_convert("Сведения   о   лице,   являющемся   представителем   в  соответствии  с законодательством Российской Федерации:"), 0, 'L');
 $pdf->SetTextColor(0, 0, 255);
 $pdf->MultiCell($width, 5, sav2_convert($applyData->{'delegate-fio'}), 'B', 'C');
 $pdf->SetTextColor(0, 0, 0);
 $pdf->Cell($width, 5, sav2_convert("(фамилия, имя, отчество)"), 0, 1, 'C');
 $pdf->SetTextColor(0, 0, 255);
 $pdf->MultiCell($width, 5, sav2_convert($applyData->{'delegate-dwelling'} . " тел. " . $applyData->{'delegate-phonenum'}), 'B', 'C');
 $pdf->SetTextColor(0, 0, 0);
 $pdf->Cell($width, 5, sav2_convert("(адрес места жительства (места пребывания), номер телефона)"), 0, 1, 'C');
 $pdf->Ln();
 $pdf->SetWidths(array(60, 40, 35, 40));
 $pdf->Row(array(sav2_convert("Наименование документа, удостоверяющего личность представителя:"), sav2_convert($applyData->{'delegate-id-doc-name'}), sav2_convert("Дата выдачи:"), sav2_convert($applyData->{'delegate-id-doc-givendate'})));
$rowPer = pg_fetch_array($recoPer);
$pdf->SetFont('Arial', 'B', 12);
$pdf->MultiCell(0, 5, utf8_decode("\nRepública Bolivariana de Venezuela\nUniversidad del Zulia\nFacultad Experimental de Ciencias\nDivisión de Programas Especiales\nSistema de Pasantías\n"), 0, "C", 0);
$pdf->MultiCell(165, 5, utf8_decode("\n\nReporte General"), 0, "C", 0);
$pdf->MultiCell(165, 5, utf8_decode("\n{$rowPer['tipo']} - {$rowPer['anio']}"), 0, "C", 0);
$pdf->Ln();
$inscritos = contar("SELECT COUNT(*) FROM pasantia INNER JOIN periodo ON periodo.id = pasantia.periodo_id AND periodo.activo = TRUE WHERE pasantia.m01_registrada IS NOT NULL");
$aprobados = contar("SELECT COUNT(*) FROM pasantia INNER JOIN periodo ON periodo.id = pasantia.periodo_id AND periodo.activo = TRUE WHERE pasantia.aprobada = TRUE");
$reprobados = contar("SELECT COUNT(*) FROM pasantia INNER JOIN periodo ON periodo.id = pasantia.periodo_id AND periodo.activo = TRUE WHERE pasantia.aprobada = FALSE");
$pdf->Image("logotipo.jpg", 20, 12, -280);
//GENERAR LA TABLA
$pdf->SetXY(57, 70);
$pdf->SetFont('Arial', 'B', 12);
$pdf->SetWidths(array(30, 30, 30));
$pdf->SetAligns(array('C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C'));
$pdf->Row(array("Inscritos", "Aprobados", "Reprobados"));
$pdf->SetX(57);
$pdf->SetFont('Arial', '', 12);
$pdf->SetWidths(array(30, 30, 30));
$pdf->SetAligns(array('C', 'C', 'C'));
$pdf->Row(array("{$inscritos}", "{$aprobados}", "{$reprobados}"));
//GENERAR LA GRAFICA
$graph = new PieGraph(640, 480);
$graph->SetShadow();
$graph->title->Set("APROBADOS / REPROBADOS");
$graph->title->SetFont(FF_FONT2, FS_BOLD);
if ($aprobados != 0 || $reprobados != 0) {
    $data = array($aprobados, $reprobados);
    $p1 = new PiePlot($data);
    $p1->value->Show(true);
    $p1->SetLegends(array("Aprobados", "Reprobados"));
<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
require 'pdf/mc_table.php';
// Chargement des données
$data = json_decode(utf8_decode($_POST['tab_prepaie']), true);
$pdf = new PDF_MC_Table('L', 'mm', 'A3');
$pdf->AddPage();
$pdf->SetFont('Arial', '', 8);
//Table with 20 rows and 4 columns
if ($_POST['mois'] == 'Novembre') {
    $pdf->SetWidths(array(34, 14, 18, 14, 14, 18, 18, 20, 18, 14, 14, 14, 22, 24, 23, 16, 16, 60));
} else {
    $pdf->SetWidths(array(34, 14, 18, 14, 14, 18, 18, 20, 18, 14, 14, 14, 24, 23, 16, 16, 60));
}
$bordure = false;
foreach ($data as $ligne) {
    $pdf->Row($ligne, $bordure);
    $bordure = true;
}
$pdf->Output();
?>

Example #15
0
 function search_pdf($VAR, $construct, $type)
 {
     # include fpdf class:
     include_once PATH_CORE . 'fpdf.inc.php';
     # set the field list for this method:
     $arr = $construct->method["{$type}"];
     # loop through the field list to create the sql queries
     $field_list = '';
     $heading_list = '';
     $width_list = '';
     $i = 0;
     while (list($key, $value) = each($arr)) {
         if ($i == 0) {
             $field_var = $construct->table . '_' . $value;
             $field_list .= $value;
             $heading_list .= strtoupper($value);
             // <- translate
             $width_list .= $construct->field[$value]['pdf_width'];
         } else {
             $field_var = $construct->table . '_' . $value;
             $field_list .= "," . $value;
             $heading_list .= "," . strtoupper($value);
             // <- translate
             $width_list .= "," . $construct->field[$value]['pdf_width'];
         }
         $i++;
     }
     # start the new PDF class...
     $pdf = new PDF_MC_Table();
     $pdf->Open();
     $pdf->AddPage();
     # Determine the number of columns and width for each one...
     $SetWidths = explode(",", $width_list);
     $pdf->SetWidths($SetWidths);
     # Define the table heading
     $TableHeading = explode(",", $heading_list);
     # Define the Properties for the table heading cells:
     # set the font:
     $pdf->HeadFontFamily = "Arial";
     $pdf->HeadFontStyle = "BI";
     $pdf->HeadFontSize = 8;
     # set the font color:
     $pdf->HeadTextColor1 = 255;
     $pdf->HeadTextColor2 = 255;
     $pdf->HeadTextColor3 = 255;
     # set the bg color:
     $pdf->HeadFillColor1 = 90;
     $pdf->HeadFillColor2 = 90;
     $pdf->HeadFillColor3 = 90;
     # set the hieght
     $pdf->HeadHeight = 6;
     # Print the Heading:
     $pdf->HeadRow($TableHeading);
     # Define the row settings for the rest of the cells...
     # define the font settings
     $pdf->SetFontFamily = "Arial";
     $pdf->SetFontStyle = "";
     $pdf->SetFontSize = "7";
     # set the hieght
     $pdf->RowHeight = 4;
     /************** BEGIN STANDARD EXPORT SEARCH CODE *********************/
     # set the field list for this method:
     $arr = $construct->method["{$type}"];
     # loop through the field list to create the sql queries
     $arr = $construct->method[$type];
     $field_list = '';
     $i = 0;
     while (list($key, $value) = each($arr)) {
         if ($i == 0) {
             $field_var = $construct->table . '_' . $value;
             $field_list .= AGILE_DB_PREFIX . $construct->table . '.' . $value;
             // determine if this record is linked to another table/field
             if ($construct->field[$value]["asso_table"] != "") {
                 $this->linked[] = array('field' => $value, 'link_table' => $construct->field[$value]["asso_table"], 'link_field' => $construct->field[$value]["asso_field"]);
             }
         } else {
             $field_var = $construct->table . '_' . $value;
             $field_list .= "," . AGILE_DB_PREFIX . $construct->table . "." . $value;
             // determine if this record is linked to another table/field
             if ($construct->field[$value]["asso_table"] != "") {
                 $this->linked[] = array('field' => $value, 'link_table' => $construct->field[$value]["asso_table"], 'link_field' => $construct->field[$value]["asso_field"]);
             }
         }
         $i++;
     }
     # get the search details:
     if (isset($VAR['search_id'])) {
         include_once PATH_CORE . 'search.inc.php';
         $search = new CORE_search();
         $search->get($VAR['search_id']);
     } else {
         echo '<BR> The search terms submitted were invalid!';
     }
     # get the sort order details:
     if (isset($VAR['order_by']) && $VAR['order_by'] != "") {
         $order_by = ' ORDER BY ' . AGILE_DB_PREFIX . $construct->table . '.' . $VAR['order_by'];
         $smarty_order = $VAR['order_by'];
     } else {
         $order_by = ' ORDER BY ' . AGILE_DB_PREFIX . $construct->table . '.' . $construct->order_by;
         $smarty_order = $search->order_by;
     }
     # format saved search string
     $sql = explode(" WHERE ", $search->sql);
     # generate the full query
     $q = preg_replace("/%%fieldList%%/i", $field_list, $search->sql);
     $q = preg_replace("/%%tableList%%/i", AGILE_DB_PREFIX . $construct->table, $q);
     $q = preg_replace("/%%whereList%%/i", "", $q);
     $q .= " " . AGILE_DB_PREFIX . $construct->table . ".site_id = '" . DEFAULT_SITE . "'";
     $q .= $order_by;
     $db =& DB();
     $result = $db->Execute($q);
     # error reporting
     if ($result === false) {
         global $C_debug;
         $C_debug->error('core:export.inc.php', 'search_xml', $db->ErrorMsg() . '<br><br>' . $q);
         echo "An SQL error has occured!";
         return;
     }
     # put the results into an array
     $i = 0;
     $class_name = TRUE;
     $results = '';
     while (!$result->EOF) {
         $results[$i] = $result->fields;
         $result->MoveNext();
         $i++;
     }
     # get any linked fields
     if ($i > 0) {
         $this->result = $results;
         $db_join = new CORE_database();
         $this->result = $db_join->join_fields($results, $this->linked);
     } else {
         $this->result = $results;
     }
     /************** END STANDARD EXPORT SEARCH CODE *********************/
     # LOOP THROUGH THE RESULTS & DISPLAY AS PDF
     $results = $result->RecordCount();
     $BackAlt = TRUE;
     while (!$result->EOF) {
         # get the data for each cell:
         reset($arr);
         $CurrRow = '';
         $i = 0;
         while (list($key, $value) = each($arr)) {
             if ($i == 0) {
                 $CurrRow .= $result->fields["{$key}"];
             } else {
                 $CurrRow .= "::" . $result->fields["{$key}"];
             }
             $i++;
         }
         $ThisRow = explode("::", $CurrRow);
         # set the colors & fonts
         if ($BackAlt) {
             # alternating row 1:
             $pdf->SetTextColorVar1 = "50";
             $pdf->SetTextColorVar2 = "50";
             $pdf->SetTextColorVar3 = "50";
             $pdf->SetFillColorVar1 = 255;
             $pdf->SetFillColorVar2 = 255;
             $pdf->SetFillColorVar3 = 255;
             $BackAlt = FALSE;
         } else {
             # alternating row 2:
             $pdf->SetTextColorVar1 = "0";
             $pdf->SetTextColorVar2 = "0";
             $pdf->SetTextColorVar3 = "0";
             $pdf->SetFillColorVar1 = 240;
             $pdf->SetFillColorVar2 = 240;
             $pdf->SetFillColorVar3 = 240;
             $BackAlt = TRUE;
         }
         # check for needed page break
         $nb = 0;
         for ($ii = 0; $ii < count($dataarr); $ii++) {
             $nb = max($nb, $pdf->NbLines($pdf->widths[$ii], $dataarr[$ii]));
         }
         $h = 5 * $nb;
         # Issue a page break first if needed
         if ($pdf->CheckPageBreak($h)) {
             # print the Table Heading again
             $pdf->HeadRow($TableHeading);
         }
         $pdf->Row($ThisRow);
         # Next record
         $result->MoveNext();
     }
     # Dispay the output
     $pdf->Output();
     exit;
 }
Example #16
0
 public function generateReport($field_names, $field_data, $field_widths, $data = array())
 {
     try {
         $main_heading = '';
         //require('mc_table.php');
         defined('FPDF_FONTPATH') || define('FPDF_FONTPATH', 'FPDF/font');
         if (isset($data['grid_no']) && $data['grid_no'] == 1 || isset($data['grid_count']) && $data['grid_count'] == 1) {
             $pdf = new PDF_MC_Table();
             $pdf->AddPage();
             // Headings
             $pdf->SetFont('Arial', '', 21);
             if (!empty($data['project_name'])) {
                 $main_heading .= $data['project_name'];
                 $pdf->Row(array($main_heading), $data);
             }
         } elseif (isset($data['pdf_object'])) {
             $pdf = $data['pdf_object'];
             $pdf->Ln(10);
         }
         $pdf->Ln(4);
         // Sub heading
         $pdf->SetFont('Arial', '', 15);
         $pdf->SetTextColor(20);
         $pdf->Cell(60, 10, $data['object_name'], 0, 0);
         $pdf->Cell(88);
         $pdf->SetFont('Arial', '', 9);
         $pdf->Cell(32, 10, date("F jS, Y", time()), 0, 1);
         // To show report generated date
         $pdf->Ln(5);
         if (isset($data['count_emp_reporting'])) {
             $pdf->Cell(60, 10, "My Team Count : " . $data['count_emp_reporting'], 0, 1);
             $pdf->Ln(5);
         }
         $pdf->SetFont('Arial', '', 9);
         //Table with 20 rows and 4 columns
         $pdf->SetWidths($field_widths);
         srand(microtime() * 1000000);
         // Header
         // Colors, line width and bold font
         $pdf->SetFillColor(249, 249, 249);
         $pdf->SetTextColor(20);
         $pdf->SetDrawColor(198, 200, 201);
         $pdf->SetLineWidth(0.3);
         $pdf->SetFont('', 'B');
         foreach ($field_names as $field_name) {
             $pdf->field_names[] = strtoupper($field_name['field_label']);
         }
         if (isset($data['field_name_align'])) {
             $pdf->SetAligns($data['field_name_align']);
             $pdf->Row($pdf->field_names);
             $pdf->field_name_align = $data['field_name_align'];
         } else {
             $pdf->Row($pdf->field_names);
         }
         //Data
         // Color and font restoration
         $pdf->SetFillColor(249, 249, 249);
         $pdf->SetTextColor(68);
         $pdf->SetFont('');
         if ($field_data) {
             foreach ($field_data as $rec) {
                 $row_values = array();
                 foreach ($field_names as $field_name) {
                     if (isset($field_name['field_name'])) {
                         if (isset($data['field_value_align'])) {
                             $pdf->SetAligns($data['field_value_align']);
                             $pdf->field_value_align = $data['field_value_align'];
                         } else {
                             //$pdf->SetAligns(array());
                         }
                         if (is_object($rec[$field_name['field_name']])) {
                             $rec[$field_name['field_name']] = $rec[$field_name['field_name']]->format('m-d-Y');
                         }
                         $row_values[] = $rec[$field_name['field_name']] == '' ? "--" : $rec[$field_name['field_name']];
                     }
                 }
                 $pdf->Row($row_values);
             }
         }
         if (isset($data['grid_no']) && $data['grid_no'] == 'last' || isset($data['grid_count']) && $data['grid_count'] == 1) {
             // AJAX download
             $file = BASE_PATH . '/downloads/reports/' . $data['file_name'];
             $pdf->Output($file, 'F');
             // Normal download
             /*$pdf->Output($data['file_name'],'D');
             		exit();*/
         } else {
             return $pdf;
         }
     } catch (Exception $e) {
         exit($e->getMessage());
     }
 }
Example #17
0
$pdf->Write(5, "Remarks");
$pdf->SetXY(250, 50);
$pdf->Write(5, "System Engr.");
$pdf->Ln(7);
$query = "select * from reports order by report_id asc";
$result = odbc_exec($conn, $query);
$counter = 1;
$total = 0;
while ($data = odbc_fetch_array($result)) {
    $report_id = $data['report_id'];
    $report_date = $data['report_date'];
    $report_location = $data['report_location'];
    $machine = $data['machine'];
    $serial_no = $data['serial_no'];
    $program = $data['program'];
    $problem = $data['problem'];
    $diagnosis = $data['diagnosis'];
    $work_done = $data['work_done'];
    $remarks = $data['remarks'];
    $system_engineer = $data['system_engineer'];
    $pdf->SetFont('Arial', '', 12);
    $pdf->SetX(10);
    $pdf->SetWidths(array(15, 25, 20, 30, 30, 30, 30, 30, 30, 30, 40));
    $pdf->Row(array($counter, $report_date, $report_location, $machine, $serial_no, $program, $problem, $diagnosis, $remarks, $system_engineer));
    $total++;
    $counter++;
}
$pdf->Ln(4);
$pdf->Cell(0, 10, "Total number of record:  " . $total, 0, 1, "R");
$s = $pdf->Output('file.pdf', 'I');
// die();
//$pdf->Open();
$pdf->AliasNbPages();
$pdf->SetLeftMargin(15);
$pdf->PageNo();
//$pdf->SetTopMargin(0);
$pdf->AddPage();
$pdf->SetFont('Arial', '', 7);
$pdf->Cell(190, 10, 'REPORTE DE INGRESO DE PRODUCTOS', 0, 0, 'C');
$pdf->Ln(10);
$pdf->Cell(150, 5, 'INGRESOS REGISTRADOS DESDE EL ' . $_REQUEST['fecha'] . ' AL ' . $_REQUEST['fecha2'] . '', 0, 0, 'L');
$pdf->Ln(5);
$pdf->Cell(275, 5, '', 0, 0, 'C');
$pdf->Ln(5);
$pdf->SetWidths(array(27, 120, 20));
//srand(microtime()*1000000);
$pdf->Row(array('FECHA DE INGRESO', 'DESCRIPCION', 'CANTIDAD'));
$rs = $ingreso->ingresos_listar_fecha($_REQUEST['fecha'], $_REQUEST['fecha2']);
//$rs= mysql_query($rs,$cargo->con->cn);
if ($rs) {
    $j = 1;
    $suma_cantidad = 0;
    while ($campo = mysql_fetch_array($rs)) {
        //cargamos a las variables los campos de la bd
        $fecha = $ingreso->_util->obtiene_fecha($campo['ing_fecha']);
        $descripcion = $campo['pro_descripcion'];
        $cantidad = $campo['ing_cantidad'];
        $pdf->Row(array($fecha, $descripcion, $cantidad));
        $suma_cantidad = $suma_cantidad + $cantidad;
        $j = $j + 1;
    }
}
$row_data = mysql_fetch_array($cekdata);
#tampilkan judul laporan
$pdf->SetFont('Arial', 'B', '16');
$pdf->Cell(0, 0, "CIPAGANTI RENTAL CAR & TRAVEL", 0, 1, 'C');
$pdf->Cell(35, 2, "PENERIMAAN HASIL SEWA KENDARAAN", 0, 1, 'C');
$pdf->SetFont('Arial', 'B', '12');
$pdf->Cell(3, 3, "CABANG : " . $row_data['gudang'], 0, 0, 'L');
$pdf->Cell(31.5, 3, "PERIODE : " . DateToIndo($mulai) . " - " . DateToIndo($akhir), 0, 0, 'R');
//membuat kop tabel
$y = $pdf->GetY();
$pdf->SetY($y + 2.5);
$pdf->SetFont('Arial', 'B', 11);
$pdf->SetWidths(array(2.3, 2.5, 2.5, 2.5, 2.5, 2.2, 2.2, 2.6, 2.3, 2.6, 2.6, 2.6, 2.6, 2.6));
$pdf->SetHeight(0.1);
$pdf->SetAligns(array('C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C'));
$pdf->Row(array("User", "Nama Customer", "No Invoice", "Periode Awal", "Periode Akhir", "No. Polisi", "Angsuran", "Uang Muka", "Jaminan", "Denda", "Tunai", "CQ/BG/CD", "Operasional", "Total"));
$pdf->SetFont('Arial', 'B', 9);
$pdf->SetWidths(array(34.6));
$pdf->Row(array("SEWA KENDARAAN RETAIL"));
//ISI TABEL
$pdf->SetFont('Arial', '', 9);
$pdf->SetWidths(array(2.3, 2.5, 2.5, 2.5, 2.5, 2.2, 2.2, 2.6, 2.3, 2.6, 2.6, 2.6, 2.6, 2.6));
$pdf->SetHeight(0.1);
$pdf->SetAligns(array('C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C'));
$query_data = $getquery;
$query = mysql_query($query_data) or die("Query gagal");
while ($result = mysql_fetch_array($query)) {
    $pdf->Row(array($result['user'], $result['customer'], $result['no_ref'], DateToIndoAngka($result['periodeawal']), DateToIndoAngka($result['periodeakhir']), $result['kendaraan'], number_format($result['angsuran'], 0, ',', '.') . ",-", number_format($result['uangmuka'], 0, ',', '.') . ",-", "0,-", "0,-", number_format($result['tunai'], 0, ',', '.') . ",-", number_format($result['transfer'], 0, ',', '.') . ",-", number_format($result['operasional'], 0, ',', '.') . ",-", number_format($result['total'], 0, ',', '.') . ",-"));
    $totalangsuran += $result['angsuran'];
    $totaluangmuka += $result['uangmuka'];
    $totaltrasfer += $result['transfer'];
Example #20
0
 function reporteKardexProduccion()
 {
     $txtFechaInicio = $_REQUEST['txtFechaInicio'];
     $txtFechaFinal = $_REQUEST['txtFechaFinal'];
     $idProducto = $_REQUEST['idProducto'];
     $idTipoMovimiento = $_REQUEST['idTipoMovimiento'];
     $idTipoOperacion = $_REQUEST['idTipoOperacion'];
     $txtDescripcion = $_REQUEST['txtDescripcion'];
     $reporte = $this->AutoLoadModel('reporte');
     $datos = $reporte->reporteKardexProduccion($txtFechaInicio, $txtFechaFinal, $idProducto, $idTipoMovimiento, $idTipoOperacion);
     $cantidadData = count($datos);
     $pdf = new PDF_MC_Table("L", "mm", "A4");
     $titulos = array('#', 'FECHA', 'T. MOV.', 'CONCEPTO', 'ORDEN', 'RAZON SOCIAL', 'DEVOLUCION', 'PRECIO', 'CANT. ', 'SALDO', 'IMPORTE S/.');
     $pdf->SetFont('Helvetica', 'B', 7.5);
     $ancho = array(8, 18, 20, 30, 18, 70, 20, 20, 15, 15, 20);
     $orientacion = array('', 'C', 'C', '', 'C', '', 'C', 'R', 'C', 'C', 'R');
     $tipoCambioVentas = $this->configIni($this->configIni('Globals', 'Modo'), 'TipoCambio');
     $pdf->SetWidths($ancho);
     if (!empty($txtFechaFinal) || !empty($txtFechaInicio)) {
         $fecha1 = !empty($txtFechaInicio) ? $txtFechaInicio : utf8_decode('?');
         $fecha2 = !empty($txtFechaFinal) ? $txtFechaFinal : utf8_decode('?');
         $pdf->_fecha = 'Rango Fecha: ' . $fecha1 . ' - ' . $fecha2;
     }
     $pdf->_titulo = "REPORTE::KARDEX DE PRODUCCION";
     $pdf->_datoPie = $txtDescripcion . '     ' . 'Impreso el :' . date('Y-m-d H:m:s');
     $pdf->AddPage();
     $pdf->_titulos = $titulos;
     $relleno = true;
     $pdf->fill($relleno);
     $pdf->SetFillColor(0224, 235, 255);
     $pdf->SetTextColor(0);
     $pdf->SetDrawColor(12, 78, 139);
     $pdf->SetLineWidth(0.3);
     $pdf->_orientacion = $orientacion;
     $pdf->SetAligns($orientacion);
     $pdf->SetTitulos($titulos);
     $pdf->SetFillColor(0224, 235, 255);
     $pdf->SetTextColor(0);
     $pdf->SetDrawColor(12, 78, 139);
     $importeFactura = 0;
     $importeBoleta = 0;
     for ($i = 0; $i < $cantidadData; $i++) {
         $modoFactura = "";
         $fila = array($i + 1, $datos[$i]['fecha'], $datos[$i]['tipo movimiento'], $datos[$i]['concepto movimiento'], $datos[$i]['codigov'], html_entity_decode($datos[$i]['razon social'], ENT_QUOTES, 'UTF-8'), $datos[$i]['devolucion'], number_format($datos[$i]['precio'], 2), $datos[$i]['cantidad'], $datos[$i]['saldo'], number_format(round($datos[$i]['precio'], 2) * $datos[$i]['cantidad'], 2));
         $pdf->Row($fila);
         $relleno = !$relleno;
         $pdf->fill($relleno);
     }
     $pdf->AliasNbPages();
     $pdf->Output();
 }
        $this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C');
    }
}
$pdf->FPDF('P', 'mm', 'A4');
//$pdf->Open();
$pdf->AliasNbPages();
$pdf->SetLeftMargin(15);
$pdf->PageNo();
//$pdf->SetTopMargin(0);
$pdf->AddPage();
$pdf->SetFont('Arial', '', 7);
$pdf->Cell(190, 10, 'REPORTE DE STOCK DE PRODUCTOS', 0, 0, 'C');
$pdf->Ln(10);
$pdf->SetWidths(array(30, 30, 100, 20));
//srand(microtime()*1000000);
$pdf->Row(array('LINEA', 'MARCA', 'DESCRIPCION', 'STOCK'));
$rs = $producto->producto_listar($_REQUEST['linea'], '0', $_REQUEST['marca']);
//$rs= mysql_query($rs,$cargo->con->cn);
if ($rs) {
    $j = 1;
    $suma_cantidad = 0;
    while ($campo = mysql_fetch_array($rs)) {
        //cargamos a las variables los campos de la bd
        $linea = $campo['lin_descripcion'];
        $marca = $campo['mar_descripcion'];
        $cantidad = $campo['pro_stock'];
        $producto = $campo['pro_descripcion'];
        $pdf->Row(array($linea, $marca, $producto, $cantidad));
        //$suma_cantidad=$suma_cantidad + $cantidad;
        $j = $j + 1;
    }
Example #22
0
 /**
  * Init function
  */
 function __construct($json)
 {
     require 'mc_table.php';
     parent::__construct($json);
     // Get Config
     $conf = isset($_SESSION['pluginsConfig']) && isset($_SESSION['pluginsConfig']['export']) && isset($_SESSION['pluginsConfig']['export']['PDF']) ? $_SESSION['pluginsConfig']['export'] : array('PDF' => array());
     $defaultFont = isset($conf['PDF']['defaultFont']) ? $conf['PDF']['defaultFont'] : 'FreeSans';
     $defaultFontSize = isset($conf['PDF']['defaultFontSize']) ? $conf['PDF']['defaultFontSize'] : 9;
     $headerFont = isset($conf['PDF']['headerFont']) ? $conf['PDF']['headerFont'] : $defaultFont;
     $headerFontSize = isset($conf['PDF']['headerFontSize']) ? $conf['PDF']['headerFontSize'] : $defaultFontSize;
     $headerFontStyle = isset($conf['PDF']['headerFontStyle']) ? $conf['PDF']['headerFontStyle'] : '';
     $layerFont = isset($conf['PDF']['layerFont']) ? $conf['PDF']['layerFont'] : $defaultFont;
     $layerFontSize = isset($conf['PDF']['layerFontSize']) ? $conf['PDF']['layerFontSize'] : $defaultFontSize;
     $layerFontStyle = isset($conf['PDF']['layerFontStyle']) ? $conf['PDF']['layerFontStyle'] : '';
     // Write to table
     $pdf = new PDF_MC_Table();
     // only for tcpdf version >= 3
     // - font not well defined --> errors
     // - header and footer printed = lines on top and bottom
     $pdf->setPrintHeader(false);
     $pdf->setPrintFooter(false);
     $pdf->Open();
     $groups = (array) $this->jsonList[0];
     foreach ($groups as $grp) {
         $ret = $this->prepareData4PDF($grp);
         $colsPerc = $ret[0];
         $data = $ret[1];
         $header = $data['header'];
         $records = $data['records'];
         $pdfW = 180;
         // orientation detection
         $orientation = 'P';
         $colsum = $ret[2];
         $maxSize = max($headerFontSize, $defaultFontSize);
         $widthTmp = $colsum * $maxSize / 4;
         if ($widthTmp > 1.5 * $pdfW) {
             $pdfW = 270;
             $orientation = 'L';
         }
         $pdf->AddPage($orientation);
         $cols = array();
         foreach ($colsPerc as $cp) {
             $cols[] = $cp * $pdfW;
         }
         // add group name:
         $pdf->SetFont($layerFont, $layerFontStyle, $layerFontSize);
         $x = $pdf->GetX();
         $y = $pdf->GetY();
         $pdf->Cell(0, 0, $grp->description);
         $pdf->SetXY($x, $y + 9);
         // Calculate column widths
         $pdf->SetWidths($cols);
         // Add header
         $pdf->SetFont($headerFont, $headerFontStyle, $headerFontSize);
         $pdf->Row($header);
         // Add records
         $pdf->SetFont($defaultFont, '', $defaultFontSize);
         foreach ($records as $row) {
             $pdf->Row($row);
         }
     }
     $pdfFilePath = $this->tempFilePath . '.pdf';
     $this->tempFileLocation .= '.pdf';
     $pdf->Output($pdfFilePath, 'F');
 }
Example #23
0
                }
            }
        }
        $prezzoSenzaProvvigioni2[$k] = $prezzoSenzaProvvigioni / (($iva + 100) / 100);
        $sku[$k] = $item->getSku();
        $nome[$k] = $item->getName();
        $id_ordine[$k] = $check[$i];
        $totalePrezzoIvato = $totalePrezzoIvato + $prezzoIvato[$k];
        $totalePrezzoPercentuale = $totalePrezzoPercentuale + $prezzoPercentuale[$k];
        $totalePrezzoSenzaProvvigioni = $totalePrezzoSenzaProvvigioni + $prezzoSenzaProvvigioni2[$k];
        $k = $k + 1;
    }
}
define('EURO', chr(128));
$pdf = new PDF_MC_Table();
$pdf->AddPage();
$pdf->SetFont('Arial', 'B', 16);
$pdf->Cell(40, 7, 'NOTA VENDITA', 0, 1);
$pdf->Ln(7);
$pdf->SetWidths(array(22, 40, 30, 40, 30, 30));
srand(microtime() * 1000000);
$pdf->SetFont('Arial', 'B', 10);
$pdf->Row(array('ID ORDINE', 'PRODOTTO', 'PREZZO IVATO', 'PREZZO IMPONIBILE', '% 3C', 'DA FATT. A 3C'));
$pdf->SetFont('Arial', '', 10);
for ($i = 0; $i < count($sku); $i++) {
    $prodotto = $sku[$i] . "\n" . $nome[$i];
    $pdf->Row(array($id_ordine[$i], $prodotto, number_format($prezzoIvato[$i], 2, ",", "") . " " . EURO, $prezzoImponibile2[$i] . " " . EURO, $percentuale[$i] . " - " . number_format($prezzoPercentuale[$i], 2, ",", "") . " " . EURO, number_format($prezzoSenzaProvvigioni2[$i], 2, ",", "") . " " . EURO));
}
$pdf->SetFont('Arial', 'B', 10);
$pdf->Row(array("TOTALE", "", number_format($totalePrezzoIvato, 2, ",", "") . " " . EURO, number_format($totalePrezzoImponibile, 2, ",", "") . " " . EURO, number_format($totalePrezzoPercentuale, 2, ",", "") . " " . EURO, number_format($totalePrezzoSenzaProvvigioni, 2, ",", "") . " " . EURO));
$pdf->Output('nota_vendita.pdf', 'D');
Example #24
0
//
if ($CompanyCurrency == 'EUR') {
    $Currency = EUR;
} else {
    $Currency = $CompanyCurrency;
}
if (isset($Type) && $Type != 'DeliveryNote') {
    if ($TaxFree == "1") {
        // If TaxFree is set to yes than display only total amount
        // otherwise display subtotal..., tax..., amount
        //
        $pdf->SetFont($PDFFont, 'B', $PDFFontsize2);
        // Check if we need to calculate temporary or saved positions
        //
        if (isset($tmpPos) && $tmpPos == '1') {
            $pdf->Row(array($a['invoice_amount'] . ' ' . $Currency . ':', Format_Number($TOTAL_AMOUNT)));
        } else {
            $pdf->Row(array($a['invoice_amount'] . ' ' . $Currency . ':', Format_Number($TOTAL)));
        }
    } else {
        // Subtotal 1
        //
        if (!empty($Subtotal1)) {
            $pdf->Row(array($a['invoice_subtotal'] . ' ' . $Tax1_Desc . ':', Format_Number($Subtotal1)));
        }
        // Subtotal 2
        //
        if (!empty($Subtotal2)) {
            $pdf->Row(array($a['invoice_subtotal'] . ' ' . $Tax2_Desc . ':', Format_Number($Subtotal2)));
        }
        // Subtotal 3
//$pdf->Open();
$pdf->AliasNbPages();
$pdf->SetLeftMargin(15);
$pdf->PageNo();
//$pdf->SetTopMargin(0);
$pdf->AddPage();
$pdf->SetFont('Arial', '', 7);
$pdf->Cell(190, 10, 'REPORTE DE VENTA DE PRODUCTOS', 0, 0, 'C');
$pdf->Ln(10);
$pdf->Cell(150, 5, 'VENTAS REGISTRADAS DESDE EL ' . $_REQUEST['fecha'] . ' AL ' . $_REQUEST['fecha2'] . '', 0, 0, 'L');
$pdf->Ln(5);
$pdf->Cell(275, 5, '', 0, 0, 'C');
$pdf->Ln(5);
$pdf->SetWidths(array(12, 15, 25, 80, 20, 16, 16));
//srand(microtime()*1000000);
$pdf->Row(array('Nro', 'FECHA', 'TIPO PRODUCTO', 'DESCRIPCION', 'CANTIDAD', 'PRECIO', 'IMPORTE'));
$rs = $venta->ventas_listar_fecha($_REQUEST['fecha'], $_REQUEST['fecha2']);
if ($rs) {
    $j = 1;
    $suma_cantidad = 0;
    $suma_precio = 0;
    $suma_importe = 0;
    while ($campo = mysql_fetch_array($rs)) {
        //cargamos a las variables los campos de la bd
        $fecha = $venta->_util->obtiene_fecha($campo['ven_fecha']);
        $tipo = $campo['tipp_descripcion'];
        $descripcion = $campo['prod_descripcion'];
        $cantidad = $campo['ven_cantidad'];
        $precio = $campo['ven_precio'];
        $unidad = $campo['uni_descripcion'];
        $moneda = $campo['tipm_descripcion'];
 public function generar_pdf($archivo = FALSE)
 {
     ///// INICIO - Factura Detallada
     /// Creamos el PDF y escribimos sus metadatos
     ob_end_clean();
     $pdf_doc = new PDF_MC_Table('P', 'mm', 'A4');
     define('EEURO', chr(128));
     $lineas = $this->factura->get_lineas();
     if ($this->impresion['print_dto']) {
         $this->impresion['print_dto'] = FALSE;
         /// leemos las líneas para ver si de verdad mostramos los descuentos
         foreach ($lineas as $lin) {
             if ($lin->dtopor != 0) {
                 $this->impresion['print_dto'] = TRUE;
                 break;
             }
         }
     }
     $pdf_doc->SetTitle('Factura: ' . $this->factura->codigo . " " . $this->factura->numero2);
     $pdf_doc->SetSubject('Factura del cliente: ' . $this->factura->nombrecliente);
     $pdf_doc->SetAuthor($this->empresa->nombre);
     $pdf_doc->SetCreator('FacturaSctipts V_' . $this->version());
     $pdf_doc->Open();
     $pdf_doc->AliasNbPages();
     $pdf_doc->SetAutoPageBreak(true, 40);
     // Definimos el color de relleno (gris, rojo, verde, azul)
     $pdf_doc->SetColorRelleno('azul');
     /// Definimos todos los datos de la cabecera de la factura
     /// Datos de la empresa
     $pdf_doc->fde_nombre = $this->empresa->nombre;
     $pdf_doc->fde_FS_CIFNIF = FS_CIFNIF;
     $pdf_doc->fde_cifnif = $this->empresa->cifnif;
     $pdf_doc->fde_direccion = $this->empresa->direccion;
     $pdf_doc->fde_codpostal = $this->empresa->codpostal;
     $pdf_doc->fde_ciudad = $this->empresa->ciudad;
     $pdf_doc->fde_provincia = $this->empresa->provincia;
     $pdf_doc->fde_telefono = 'Teléfono: ' . $this->empresa->telefono;
     $pdf_doc->fde_fax = 'Fax: ' . $this->empresa->fax;
     $pdf_doc->fde_email = $this->empresa->email;
     $pdf_doc->fde_web = $this->empresa->web;
     $pdf_doc->fde_piefactura = $this->empresa->pie_factura;
     /// Insertamos el Logo y Marca de Agua
     if (file_exists('tmp/' . FS_TMP_NAME . 'logo.png') or file_exists('tmp/' . FS_TMP_NAME . 'logo.jpg')) {
         $pdf_doc->fdf_verlogotipo = '1';
         // 1/0 --> Mostrar Logotipo
         $pdf_doc->fdf_Xlogotipo = '15';
         // Valor X para Logotipo
         $pdf_doc->fdf_Ylogotipo = '35';
         // Valor Y para Logotipo
         $pdf_doc->fdf_vermarcaagua = '1';
         // 1/0 --> Mostrar Marca de Agua
         $pdf_doc->fdf_Xmarcaagua = '25';
         // Valor X para Marca de Agua
         $pdf_doc->fdf_Ymarcaagua = '110';
         // Valor Y para Marca de Agua
     } else {
         $pdf_doc->fdf_verlogotipo = '0';
         $pdf_doc->fdf_Xlogotipo = '0';
         $pdf_doc->fdf_Ylogotipo = '0';
         $pdf_doc->fdf_vermarcaagua = '0';
         $pdf_doc->fdf_Xmarcaagua = '0';
         $pdf_doc->fdf_Ymarcaagua = '0';
     }
     // Tipo de Documento
     $pdf_doc->fdf_tipodocumento = 'FACTURA';
     // (FACTURA, FACTURA PROFORMA, ¿ALBARAN, PRESUPUESTO?...)
     $pdf_doc->fdf_codigo = $this->factura->codigo . " " . $this->factura->numero2;
     // Fecha, Codigo Cliente y observaciones de la factura
     $pdf_doc->fdf_fecha = $this->factura->fecha;
     $pdf_doc->fdf_codcliente = $this->factura->codcliente;
     $pdf_doc->fdf_observaciones = iconv("UTF-8", "CP1252", $this->fix_html($this->factura->observaciones));
     // Datos del Cliente
     $pdf_doc->fdf_nombrecliente = $this->fix_html($this->factura->nombrecliente);
     $pdf_doc->fdf_FS_CIFNIF = FS_CIFNIF;
     $pdf_doc->fdf_cifnif = $this->factura->cifnif;
     $pdf_doc->fdf_direccion = $this->fix_html($this->factura->direccion);
     $pdf_doc->fdf_codpostal = $this->factura->codpostal;
     $pdf_doc->fdf_ciudad = $this->factura->ciudad;
     $pdf_doc->fdf_provincia = $this->factura->provincia;
     $pdf_doc->fdc_telefono1 = $this->cliente->telefono1;
     $pdf_doc->fdc_telefono2 = $this->cliente->telefono2;
     $pdf_doc->fdc_fax = $this->cliente->fax;
     $pdf_doc->fdc_email = $this->cliente->email;
     $pdf_doc->fdf_epago = $pdf_doc->fdf_divisa = $pdf_doc->fdf_pais = '';
     // Forma de Pago de la Factura
     $pago = new forma_pago();
     $epago = $pago->get($this->factura->codpago);
     if ($epago) {
         $pdf_doc->fdf_epago = $epago->descripcion;
     }
     // Divisa de la Factura
     $divisa = new divisa();
     $edivisa = $divisa->get($this->factura->coddivisa);
     if ($edivisa) {
         $pdf_doc->fdf_divisa = $edivisa->descripcion;
     }
     // Pais de la Factura
     $pais = new pais();
     $epais = $pais->get($this->factura->codpais);
     if ($epais) {
         $pdf_doc->fdf_pais = $epais->nombre;
     }
     // Cabecera Titulos Columnas
     if ($this->impresion['print_dto']) {
         $pdf_doc->Setdatoscab(array('ALB', 'DESCRIPCION', 'CANT', 'PRECIO', 'DTO', FS_IVA, 'IMPORTE'));
         $pdf_doc->SetWidths(array(16, 102, 10, 20, 10, 10, 22));
         $pdf_doc->SetAligns(array('C', 'L', 'R', 'R', 'R', 'R', 'R'));
         $pdf_doc->SetColors(array('6|47|109', '6|47|109', '6|47|109', '6|47|109', '6|47|109', '6|47|109', '6|47|109'));
     } else {
         $pdf_doc->Setdatoscab(array('ALB', 'DESCRIPCION', 'CANT', 'PRECIO', FS_IVA, 'IMPORTE'));
         $pdf_doc->SetWidths(array(16, 107, 10, 20, 15, 22));
         $pdf_doc->SetAligns(array('C', 'L', 'R', 'R', 'R', 'R'));
         $pdf_doc->SetColors(array('6|47|109', '6|47|109', '6|47|109', '6|47|109', '6|47|109', '6|47|109'));
     }
     /// Definimos todos los datos del PIE de la factura
     /// Lineas de IVA
     $lineas_iva = $this->factura->get_lineas_iva();
     if (count($lineas_iva) > 3) {
         $pdf_doc->fdf_lineasiva = $lineas_iva;
     } else {
         $filaiva = array();
         $i = 0;
         foreach ($lineas_iva as $li) {
             $i++;
             $filaiva[$i][0] = $li->iva ? FS_IVA . $li->iva : '';
             $filaiva[$i][1] = $li->neto ? $this->ckeckEuro($li->neto) : '';
             $filaiva[$i][2] = $li->iva ? $li->iva . "%" : '';
             $filaiva[$i][3] = $li->totaliva ? $this->ckeckEuro($li->totaliva) : '';
             $filaiva[$i][4] = $li->recargo ? $li->recargo . "%" : '';
             $filaiva[$i][5] = $li->totalrecargo ? $this->ckeckEuro($li->totalrecargo) : '';
             $filaiva[$i][6] = '';
             //// POR CREARRRRRR
             $filaiva[$i][7] = '';
             //// POR CREARRRRRR
             $filaiva[$i][8] = $li->totallinea ? $this->ckeckEuro($li->totallinea) : '';
         }
         if ($filaiva) {
             $filaiva[1][6] = $this->factura->irpf . ' %';
             $filaiva[1][7] = $this->ckeckEuro(0 - $this->factura->totalirpf);
         }
         $pdf_doc->fdf_lineasiva = $filaiva;
     }
     // Total factura numerico
     $pdf_doc->fdf_numtotal = $this->ckeckEuro($this->factura->total);
     // Total factura numeros a texto
     $pdf_doc->fdf_textotal = $this->factura->total;
     /// Agregamos la pagina inicial de la factura
     $pdf_doc->AddPage();
     // Lineas de la Factura
     //$lineas = $this->factura->get_lineas();
     if ($lineas) {
         $neto = 0;
         for ($i = 0; $i < count($lineas); $i++) {
             $neto += $lineas[$i]->pvptotal;
             $pdf_doc->neto = $this->ckeckEuro($neto);
             $articulo = new articulo();
             $art = $articulo->get($lineas[$i]->referencia);
             if ($art) {
                 $observa = "\n" . utf8_decode($this->fix_html($art->observaciones));
             } else {
                 // $observa = null; // No mostrar mensaje de error
                 $observa = "\n";
             }
             if ($this->impresion['print_dto']) {
                 $lafila = array('0' => utf8_decode($lineas[$i]->albaran_numero()), '1' => utf8_decode(strtoupper($lineas[$i]->descripcion)) . $observa, '2' => utf8_decode($lineas[$i]->cantidad), '3' => $this->ckeckEuro($lineas[$i]->pvpunitario), '4' => utf8_decode($this->show_numero($lineas[$i]->dtopor, 0) . " %"), '5' => utf8_decode($this->show_numero($lineas[$i]->iva, 0) . " %"), '6' => $this->ckeckEuro($lineas[$i]->total_iva()));
             } else {
                 $lafila = array('0' => utf8_decode($lineas[$i]->albaran_numero()), '1' => utf8_decode(strtoupper($lineas[$i]->descripcion)) . $observa, '2' => utf8_decode($lineas[$i]->cantidad), '3' => $this->ckeckEuro($lineas[$i]->pvpunitario), '4' => utf8_decode($this->show_numero($lineas[$i]->iva, 0) . " %"), '5' => $this->ckeckEuro($lineas[$i]->total_iva()));
             }
             $pdf_doc->Row($lafila, '1');
             // Row(array, Descripcion del Articulo -- ultimo valor a imprimir)
         }
         $pdf_doc->piepagina = true;
     }
     // Damos salida al archivo PDF
     if ($archivo) {
         if (!file_exists('tmp/' . FS_TMP_NAME . 'enviar')) {
             mkdir('tmp/' . FS_TMP_NAME . 'enviar');
         }
         $pdf_doc->Output('tmp/' . FS_TMP_NAME . 'enviar/' . $archivo, 'F');
     } else {
         $pdf_doc->Output();
     }
 }
Example #27
0
require 'mc_table.php';
function GenerateWord()
{
    //Get a random word
    $nb = rand(3, 10);
    $w = '';
    for ($i = 1; $i <= $nb; $i++) {
        $w .= chr(rand(ord('a'), ord('z')));
    }
    return $w;
}
function GenerateSentence()
{
    //Get a random sentence
    $nb = rand(1, 10);
    $s = '';
    for ($i = 1; $i <= $nb; $i++) {
        $s .= GenerateWord() . ' ';
    }
    return substr($s, 0, -1);
}
$pdf = new PDF_MC_Table();
$pdf->AddPage();
$pdf->SetFont('Arial', '', 14);
//Table with 20 rows and 4 columns
$pdf->SetWidths(array(30, 50, 30, 40));
srand(microtime() * 1000000);
for ($i = 0; $i < 20; $i++) {
    $pdf->Row(array(GenerateSentence(), GenerateSentence(), GenerateSentence(), GenerateSentence()));
}
$pdf->Output();
$pdf->SetXY(110, 70);
$pdf->Cell(0, 10, "Serial #: ", 0, 1);
$pdf->SetFont("Arial", "U", "14");
$pdf->SetXY(135, 70);
$pdf->Cell(0, 10, "    " . $serial_no . "    ", 0, 1);
$pdf->SetFont("Arial", "", "14");
$pdf->SetXY(10, 85);
$pdf->Cell(0, 10, "Problem: ", 0, 1);
$pdf->SetFont("Arial", "U", "14");
$pdf->SetXY(40, 85);
$pdf->Cell(0, 10, "        " . $problem . "        ", 0, 1);
$pdf->SetFont("Arial", "", "14");
$pdf->SetXY(10, 95);
$pdf->Cell(0, 10, "Diagnosis: ", 0, 1);
$pdf->SetFont("Arial", "U", "14");
$pdf->SetXY(40, 95);
$pdf->Cell(0, 10, "        " . $diagnosis . "        ", 0, 1);
$pdf->SetFont("Arial", "", "14");
$pdf->SetXY(10, 110);
$pdf->Cell(0, 10, "Work Done: ", 0, 1);
$pdf->SetFont("Arial", "", "14");
$pdf->SetXY(40, 120);
$pdf->SetWidths(array(150));
$pdf->Row(array("\n" . $work_done . "\n"));
$pdf->SetFont("Arial", "", "14");
$pdf->Ln(10);
$pdf->Cell(0, 10, "Remarks: " . $remarks, 0, 1);
$pdf->SetFont("Arial", "", "14");
$pdf->Ln(5);
$pdf->Cell(0, 10, "System Engineer:    " . $system_engineer, 0, 1);
$pdf->output();
Example #29
0
require 'mc_table.php';
// Load data
function LoadData($file)
{
    // Read file lines
    $datas = explode('end', trim($file));
    foreach ($datas as $line) {
        $line = substr($line, 0, -3);
        $line_br = str_replace("<br>", "\r\n", explode('$@$', trim($line)));
        $data[] = str_replace("&nbsp;", " ", $line_br);
    }
    return $data;
}
$hed = explode('end', $heds);
$line = substr($hed[0], 0, -3);
$header = explode('$@$', $line);
$data = LoadData($bdy);
//$header = array('Bill-To','Ship-To/Ship-To Location','PO #','Order/Quote/Plant','Planned/Est. Arr Shipping','Status');
$pdf = new PDF_MC_Table();
$pdf->SetWidths(array(40, 70, 40, 50, 55, 25));
$pdf->AddPage('L');
$pdf->SetFont('Arial', '', '');
$pdf->Image('../../images/madix-logo300.png', 10, 12, 50, 0, '', '');
$pdf->SetTopMargin(35);
$pdf->Row($header);
foreach ($data as $row) {
    $pdf->Rows($row);
}
$pdf->Output();
header('Content-type: application/pdf');
header('Content-Disposition: attachment; filename="Order_list.pdf"');
Example #30
0
        $recordCount++;
        $report_id = $data['report_id'];
        $report_date = $data['report_date'];
        $report_location = $data['report_location'];
        $machine = $data['machine'];
        $serial_no = $data['serial_no'];
        $program = $data['program'];
        $problem = $data['problem'];
        $diagnosis = $data['diagnosis'];
        $work_done = $data['work_done'];
        $remarks = $data['remarks'];
        $system_engineer = $data['system_engineer'];
        $pdf->SetFont('Arial', '', 12);
        $pdf->SetX(10);
        $pdf->SetWidths(array(15, 25, 20, 30, 30, 30, 30, 30, 30, 30, 40));
        $pdf->Row(array($recordCount, $report_date, $report_location, $machine, $serial_no, $program, $problem, $diagnosis, $remarks, $system_engineer));
    }
    $counter++;
}
$pdf->Ln(4);
$pdf->Cell(0, 10, "Total number of record:  " . $recordCount . " reports", 0, 1, "R");
//LINE GRAPH
$max = max($value);
$pdf->AddPage('L');
$pdf->Ln(4);
$pdf->SetFont("Arial", "B", "14");
$pdf->Cell(0, 10, 'Reported Incidents Flow', 0, 1, "C");
$data = array('Reports' => $array_list);
$pdf->Ln(10);
$colors = array('Reports' => array(0, 128, 255));
$pdf->LineGraph(270, 100, $data, 'VHkBvBgBdB', $colors, $max + 3, 10);