require_once __ROOT__ . '/Util/Reporte.php'; $submit = $_GET["submit"]; $fechaInicio = $_POST["fechaInicio"]; $fechaFin = $_POST["fechaFin"]; // Convertir fechas if ($submit == "Pedidos") { $pedidos = getReportePedidosByFechas($fechaInicio, $fechaFin); ob_start(); $reporte = new Reporte(); $reporte->setFecha($fechaInicio . " - " . $fechaFin); $reporte->setTitulo('Pedidos'); $header = array(utf8_decode("idPedido"), utf8_decode("Cliente"), utf8_decode("Mesa"), utf8_decode("Fecha"), utf8_decode("N° Productos"), utf8_decode("Importe Total")); $cols = array("idPedido", "nombreCompleto", "descripcion", "fecha", "productos", "importeTotal"); $w = array(20, 50, 30, 30, 20); $reporte->AddPage(); $reporte->Table($header, $cols, $pedidos, $w); $reporte->Output(); } if ($submit == "Consumo") { $pedidos = getReporteConsumoByFechas($fechaInicio, $fechaFin); ob_start(); $reporte = new Reporte(); $reporte->setFecha($fechaInicio . " - " . $fechaFin); $reporte->setTitulo('Consumo'); $header = array(utf8_decode("Producto"), utf8_decode("Tipo"), utf8_decode("Precio"), utf8_decode("Cantidad"), utf8_decode("Importe")); $cols = array("descripcion", "tipo", "precio", "cantidad", "importe"); $w = array(40, 40, 30, 30, 30); $reporte->AddPage(); $reporte->Table($header, $cols, $pedidos, $w); $reporte->Output(); }
<?php require_once './models/Reporte.php'; ob_start(); $reporte = new Reporte(); $reporte->setFecha(date('d/m/Y')); $reporte->setTitulo('Lista de Tipo de Equipos'); $header = array(utf8_decode('Código'), utf8_decode('Descripción'), utf8_decode('Nro. Modelos'), utf8_decode('Nro. Equipos')); $cols = array('idTipoEquipo', 'descripcion', 'nroModelos', 'nroEquipos'); $w = array(20, 80, 30, 30); $reporte->AddPage(); $reporte->Table($header, $cols, $tipoEquipos, $w); $reporte->Output();
$reporte->Ln(5); $reporte->SetFont('helvetica', 'B', 6); $reporte->Cell(20, 5, "Cliente:", 0, 0, 'B'); $reporte->SetFont('helvetica', '', 6); $reporte->Cell(20, 5, $pedido["cliente"], 0, 0, 'C'); $reporte->Ln(5); $reporte->SetFont('helvetica', 'B', 6); $reporte->Cell(20, 5, "Mesa:", 0, 0, 'B'); $reporte->SetFont('helvetica', '', 6); $reporte->Cell(20, 5, $pedido["mesa"], 0, 0, 'C'); $reporte->Ln(5); $reporte->SetFont('helvetica', 'B', 6); $reporte->Cell(20, 5, "Mozo:", 0, 0, 'B'); $reporte->SetFont('helvetica', '', 6); $reporte->Cell(20, 5, $pedido["mozo"], 0, 0, 'C'); $reporte->Ln(5); $reporte->SetFont('helvetica', 'B', 6); $reporte->Cell(20, 5, "Importe Total:", 0, 0, 'B'); $reporte->SetFont('helvetica', '', 6); $reporte->Cell(20, 5, $pedido["importeTotal"], 0, 0, 'C'); $reporte->Ln(5); $reporte->SetFont('helvetica', 'B', 6); $reporte->Cell(20, 5, "Detalle:", 0, 0, 'B'); $reporte->Ln(5); $header = array(utf8_decode("idProducto"), utf8_decode("Descripción"), utf8_decode("Precio"), utf8_decode("Cantidad"), utf8_decode("Importe")); $cols = array("idProducto", "producto", "precio", "cantidad", "importe"); $w = array(20, 50, 30, 30, 30); $reporte->Table($header, $cols, $detallePedidos, $w); $reporte->Output(); } }
<?php require_once './models/Reporte.php'; $reporte = new Reporte(); $reporte->setFecha(date('d/m/Y')); $reporte->setTitulo('Lista de Modelos'); $header = array('Código', 'Repuesto', 'Unidad de Medida', 'Stock'); $cols = array('idRepuesto', 'Repuesto', 'unidadMedida', 'stock'); $w = array(20, 40, 40, 30); $reporte->AddPage(); $reporte->Table($header, $cols, $repuestos, $w); $reporte->Output();
<?php require_once './models/Reporte.php'; ob_start(); $reporte = new Reporte(); $reporte->setFecha(date('d/m/Y')); $reporte->setTitulo('Lista de Marcas'); $header = array(utf8_decode('Código'), utf8_decode('Dependencia'), utf8_decode('Establecimiento'), utf8_decode('Nombre')); $cols = array('idUsuario', 'dependencia', 'establecimiento', 'nombreCompleto'); $w = array(20, 50, 50, 60); $reporte->AddPage(); $reporte->Table($header, $cols, $usuarios, $w); $reporte->Output();
<?php require_once './models/Reporte.php'; ob_start(); $reporte = new Reporte(); $reporte->setFecha(date('d/m/Y')); $reporte->setTitulo('Lista de Marcas'); $header = array(utf8_decode("Código"), utf8_decode('Descripción'), utf8_decode('Nro. Modelos'), utf8_decode('Nro. Equipos')); $cols = array('idMarca', 'descripcion', 'nroModelos', 'nroEquipos'); $w = array(20, 60, 30, 30); $reporte->AddPage(); $reporte->Table($header, $cols, $marcas, $w); $reporte->Output();
<?php require_once './models/Reporte.php'; ob_start(); $reporte = new Reporte(); $reporte->setFecha(date('d/m/Y')); $reporte->setTitulo('Lista de Modelos'); $header = array(utf8_decode('Código'), utf8_decode('Marca'), utf8_decode('Tipo de Equipo'), utf8_decode('Descripción'), utf8_decode('Nro. Equipos')); $cols = array('idModelo', 'marca', 'tipoEquipo', 'descripcion', 'nroEquipos'); $w = array(15, 50, 50, 50, 30); $reporte->AddPage(); $reporte->Table($header, $cols, $modelos, $w); $reporte->Output();