public function Listar()
 {
     return $this->oPedidoFacturaDetalle->Listar();
 }
예제 #2
0
<?php

include "IncluirClases.php";
$title = "Factura";
$pedidoFacturaBLL = new PedidoFacturaBLL();
$pedidoFacturaEntidad = new PedidoFactura();
$lineaDetallePedidoFacturaBLL = new PedidoFacturaDetalleBLL();
$lineaDetalleEntidad = new PedidoFacturaDetalle();
$platoBLL = new PlatoBLL();
$content = "<div id='cuerpo'>";
if (isset($_SESSION['pedido'])) {
    $pedido = $_SESSION['pedido'];
    $numeroPedido = $pedido[0][0];
    $mesa = $pedido[0][1];
    $salonero = $pedido[0][2];
    $fecha = $pedido[0][3];
    $estado = $pedido[0][4];
    if (isset($_SESSION['pedido']['total'])) {
        $totalPedido = $_SESSION['pedido']['total'];
        $arrayCargosFactura = $pedidoFacturaBLL->ArrayCargosFactura($totalPedido);
    } else {
        $totalPedido = 0;
    }
    $content .= "\n\t<br><br><br>\n\n\n\t<div class='row'>\n\t<div class='panel panel-default'>\n\t<div class='panel-heading'>\n\t<h3>\n\t\t<p class=' navbar-nav pull-right text-right' >\n\t\t\tOrden no.<strong > {$numeroPedido} </strong><br>\n\t\t\tFecha <strong> {$fecha} </strong><br><br><br>\n\t\t\t<strong >Restaurante La Central S.A </strong><br>\n\t\t\tTeléfonos: <strong > 2222-2222/2444-5566</strong>\n\t\t</p>\n\n\t</h3>\n\n\t<h3 class='panel-title'><img  id='imageresource' src='img/invoice-icon.jpg' alt='' class='img-responsive img-circle'/></h3>\n\n\t</div>\n\t<div class='panel-body '>\n\t<div class=well label-group'>\n\t\t<p class='nav navbar-nav pull-left'><strong>Detalle de servicio</strong></p>\n\t\t<p class='nav navbar-nav pull-right'><strong>Detalle de la orden</strong></p>\n\t\t<br>\n\t\t<h4><span class='label label-default pull-right'>Subtotal <i class='glyphicon glyphicon-arrow-right'></i> ¢ {$arrayCargosFactura['Subtotal']} </span></h4>\n\t\t<h4> <span class='label label-default'>Salonero <i class='glyphicon glyphicon-arrow-right'></i> {$salonero}</span> </h4>\n\n\t\t<h4><span class='label label-default pull-right'>Cargos por servicios <i class='glyphicon glyphicon-arrow-right'></i> ¢ {$arrayCargosFactura['CargoSalonero']} </span></h4>\n\t\t<h4> <span class='label label-default'>Mesa <i class='glyphicon glyphicon-arrow-right'></i> {$mesa}</span> </h4>\n\n\t\t<h4><span class='label label-default pull-right'>Cargos por impuestos <i class='glyphicon glyphicon-arrow-right'></i> ¢ {$arrayCargosFactura['ImpuestoVentas']}</span></h4>\n\t\t<h4><span class='label label-default'>Estado del pedido <i class='glyphicon glyphicon-arrow-right'></i> {$estado}</span></h4>\n\t\t<h4><span class='label label-default pull-right'>Total a pagar <i class='glyphicon glyphicon-arrow-right'></i> ¢  {$arrayCargosFactura['TotalPagar']}</span></h4>\n\t\t<br>\n\t\t</div>\n\n\t<div class=well label-group'>\n\n\n\t\t<div class='row'>" . "<div class='col-lg-12'>" . "<h3><strong>Detalle Factura</strong></h3>" . "</div>" . "</div><br/>\n\t\t<div class='row'>\n\n\n\t\t<link rel='stylesheet' type='text/css' href='css/custom_styles.css'>\n\n\t\t<table id='cart' class='table table-hover table-condensed'>\n\t\t<thead>\n\t\t<tr>\n\t\t<th style='width:40%' >Plato</th>\n\t\t<th style='width:20%' class='text-center'>Precio</th>\n\t\t<th style='width:10%' class='text-center'>Cantidad</th>\n\t\t<th style='width:30%' class='text-center'>Subtotal</th>\n\t\t<th style='width:0%' class='text-center'></th>\n\t\t</tr>\n\t\t</thead>\n\t\t<tbody>";
    $lineasDetallePedido = $lineaDetallePedidoFacturaBLL->Consultar($numeroPedido);
    foreach ($lineasDetallePedido as $posicion => $lineaFactura) {
        $content .= " <tr>\n\t\t<td data-th='Producto'>\n\t\t<div class='row '>\n\t\t<div class='col-sm-2 hidden-xs ' ><a href='#' class='pop' ><img  id='imageresource' src='img/{$lineaFactura['2']}' alt='' class='img-responsive'/></a></div>\n\t\t<div class='col-sm-10'>\n\t\t<h4 class='nomargin'>{$lineaFactura['1']}</h4>\n\t\t<p>{$lineaFactura['1']}</p>\n\t\t</div>\n\t\t</div>\n\t\t</td>\n\n\t\t<td data-th='Precio' class='text-center'>¢{$lineaFactura['4']}</td>\n\t\t<td  data-th='Cantidad' class='text-center'>{$lineaFactura['3']}</td>\n\t\t<td data-th='Subtotal' class='text-center'>¢{$lineaFactura['5']}</td>\n\t\t</tr> ";
    }
    $content .= "</tbody>";
    $content .= " <tfoot>\n\t<tr>\n\t<td colspan='3' class='hidden-xs'></td>\n\t<td class='hidden-xs text-center'><strong> <p class='bg-danger'>Total ¢{$totalPedido} *Sin cargos.</p></strong></td>\n\t<td></td>\n\t</tr>\n\t</tfoot>\n\t</table> </div>";
    $content .= "\n\n\n\n\n\t<div class='modal fade' id='imagemodal' tabindex='-1' role='dialog'\n\taria-labelledby='myModalLabel' aria-hidden='true'>\n\t\t<div class='modal-dialog' data-dismiss='modal'>\n\t\t\t<div class='modal-content'>\n\t\t\t\t<div class='modal-body'>\n\t\t\t\t\t<button type='button' class='close' data-dismiss='modal'>\n\t\t\t\t\t\t<span aria-hidden='true'>&times;</span><span class='sr-only'>Volver</span>\n\t\t\t\t\t</button>\n\t\t\t\t\t<img src='' class='imagepreview' style='width: 100%;'>\n\t\t\t\t</div>\n\t\t\t\t<div class='modal-footer'>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\n\n\n\t</div>\n\t<a href='index.php' class='btn btn-warning pull-left'><i class='glyphicon glyphicon-arrow-left'></i> Continuar ordenando</a>\n\t<a href='index.php' class='btn btn-success  pull-right'>Pagar <i class='glyphicon glyphicon-arrow-right'></i></a>\n   </div>\n\n</div>\n\n\t\t\t";
예제 #3
0
<?php

include "IncluirClases.php";
$title = "Pedido";
$carrito = new Carrito();
$pedidoFacturaBLL = new PedidoFacturaBLL();
$pedidoFacturaEntidad = new PedidoFactura();
$lineaDetallePedidoFacturaBLL = new PedidoFacturaDetalleBLL();
$lineaDetalleEntidad = new PedidoFacturaDetalle();
if (isset($_GET['id']) && isset($_GET['action'])) {
    $accion = $_GET['action'];
    switch ($accion) {
        case 'add':
            $platoBLL = new PlatoBLL();
            $id = $_GET['id'];
            $vPlato = $platoBLL->ConsultarRegistro($id);
            $idProducto = $vPlato[0][0];
            $nombre = $vPlato[0][1];
            $precio = $vPlato[0][2];
            $foto = $vPlato[0][3];
            $cantidad = $_GET['cantidad'];
            $productoAlCarro = array("id" => $idProducto, "nombre" => $nombre, "precio" => $precio, "foto" => $foto, "cantidad" => $cantidad);
            $carrito->add($productoAlCarro);
            //header ( 'Location: pedido.php' );
            break;
        case 'delete':
            $unique_id = $_GET['id'];
            $carrito->remove_producto($unique_id);
            // header ( 'Location: pedido.php' );
            break;
        case 'update':