$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 {
         $somb = '';
     }
     $pdf->Row(array($alumno['nc'], substr($alumno['alumno'], 0, 40), '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''), $somb);
     $pdf->SetLineWidth(0.6);
     // Grosor de linea
     for ($j = 0; $j < 6; $j++) {
         if ($i < 34) {
require_once "linegraph.php";
require_once "diagram.php";
require_once "/fpdf/fpdf.php";
//$picture = "D://xampp//htdocs//BroadcastSystem//images//abs_cbn logo.png";
$pdf = new PDF_MC_Table();
$pdf->Open();
$pdf->AddPage('L');
//$pdf->Image($picture,20,5,20,20);
$pdf->SetFont("Arial", "B", "16");
$pdf->Cell(0, 10, "Broadcast System & Maintenance", 0, 1, "C");
$pdf->SetFont("Arial", "", "12");
$pdf->Cell(0, 10, "Technical Operation Division", 0, 1, "C");
$pdf->SetFont("Arial", "B", "14");
$pdf->SetXY(10, 35);
$pdf->SetTextColor(255, 255, 255);
$pdf->SetFillColor(64, 64, 64);
$pdf->Cell(0, 10, "List of All Reports", 0, 1, "C", 1);
$pdf->SetTextColor(0, 0, 0);
$pdf->SetFont("Arial", "B", "12");
$pdf->SetXY(10, 50);
$pdf->Write(5, "Rep#");
$pdf->SetXY(30, 50);
$pdf->Write(5, "Date");
$pdf->SetXY(50, 50);
$pdf->Write(5, "Location");
$pdf->SetXY(75, 50);
$pdf->Write(5, "Machine");
$pdf->SetXY(105, 50);
$pdf->Write(5, "Serial #");
$pdf->SetXY(135, 50);
$pdf->Write(5, "Program");
//$pdf->AddPage('L');
$pdf->SetDisplayMode(100, "single");
$pdf->SetTitle("Netherhall House");
$border = 1;
$high = 6;
$width1 = 180;
$width2 = $width1 / 2;
$width3 = $width1 / 3;
$width4 = $width1 / 4;
/*
$pdf->SetFont('Arial','B',12);
$pdf->Cell(180,$high,"OUTSTANDING SUMMARY",0,0,'C',true);
$pdf->Ln();
$pdf->Ln();
*/
$pdf->SetFillColor(255, 255, 255);
$pdf->SetFont('Arial', 'B', 18);
$pdf->Cell(180, $high, $arrResident[name] . " " . $arrResident[surname], 0, 0, '', true);
$pdf->SetFont('Arial', '', 8);
$pdf->Ln();
$pdf->Ln();
$pdf->SetFillColor(230, 230, 230);
$pdf->Cell(16, $high, "Arrival", $border, 0, '', true);
$pdf->Cell(16, $high, "Departure", $border, 0, '', true);
$pdf->Cell(9, $high, "Days", $border, 0, 'R', true);
$pdf->Cell(10, $high, "Room", $border, 0, '', true);
$pdf->Cell(13, $high, "W. Rate", $border, 0, 'R', true);
$pdf->Cell(15, $high, "Total", $border, 0, 'R', true);
$pdf->Cell(13, $high, "Laundry", $border, 0, 'R', true);
$pdf->Cell(13, $high, "HC", $border, 0, 'R', true);
$pdf->Cell(13, $high, "Printing", $border, 0, 'R', true);
Beispiel #4
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();
 }
}
//-----------------------------------------------------------------------------
//-----------------------Inicio pdf---------------------------------------------
$pdf = new PDF_MC_Table('L', 'mm', 'Letter');
$pdf->AddFont('GillSans', '', 'GillSans.php');
$pdf->AddFont('GillSans', 'B', 'GillSans_B.php');
$pdf->AddFont('GillSans', 'BI', 'GillSans_BI.php');
$pdf->AddFont('GillSans', 'I', 'GillSans_I.php');
$pdf->AddFont('GillSans', 'L', 'GillSans_L.php');
$pdf->AddFont('GillSans', 'LI', 'GillSans_LI.php');
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetLeftMargin(25);
//----------------------------------------------
$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->SetXY(1.5, 3);
function DateToIndo($bulan, $tahun)
{
    // fungsi atau method untuk mengubah tanggal ke format indonesia
    // variabel BulanIndo merupakan variabel array yang menyimpan nama-nama bulan
    $BulanIndo = array("JANUARI", "FEBRUARI", "MARET", "APRIL", "MEI", "JUNI", "JULI", "AGUSTUS", "SEPTEMBER", "OKTOBER", "NOVEMBER", "DESEMBER");
    $result = $BulanIndo[(int) $bulan - 1] . " " . $tahun;
    return $result;
}
$sql = "SELECT gudang FROM gl_gudang WHERE id = '{$cabang}' ";
$cekdata = mysql_query($sql) or die(mysql_error());
$row_data = mysql_fetch_array($cekdata);
$pdf->Cell(8, 3, "CABANG : " . $row_data['gudang'], 0, 0, 'L');
//HEADER TABLE
$pdf->SetFont('Arial', 'B', 11);
$pdf->SetFillColor(125, 125, 125);
$pdf->SetTextColor(255, 255, 255);
$pdf->SetXY(1, 5);
$pdf->Cell(1, 0.7, "No", 1, 0, 'C', true);
$pdf->Cell(2.8, 0.7, "UNIT", 1, 0, 'C', true);
$days = array();
for ($i = 1; $i <= $num; $i++) {
    $pdf->Cell(0.8, 0.7, "{$i}", 1, 0, 'C', true);
}
$pdf->Cell(3.8, 0.7, "CASHIN", 1, 0, 'C', true);
$pdf->Cell(3.8, 0.7, "CASHOUT", 1, 0, 'C', true);
$pdf->Cell(3.8, 0.7, "PPN", 1, 1, 'C', true);
//ISI TABLE
global $datesArray, $query2, $arr;
unset($datesArray);
$datesArray[] = array();