include '../../system/menu.php'; ?> <section class="bloque"> <div> <?php include '../../layouts/cabecera-body.php'; ?> <hgroup> <h1>Estadisticas de ingresos</h1> </hgroup> </div> <?php include_once '../../system/class.php'; $objproducto = new producto(); $res = $objproducto->consulta_completo($mysqli); $objfactura = new factura_descripcion(); echo "<table>\n <tr>\n <td>PRODUCTO</td>\n <td>CANTIDAD VENDIDO</td>\n <td>TOTAL BS</td>\n <td>TOTAL IVA</td>\n </tr>\n\n "; while ($reg = $res->fetch_array()) { $anual = date("Y"); $codigo = $reg[0]; $res2 = $objfactura->consultar_producto_cantidad($mysqli, $codigo, $anual); $cantidad = ''; while ($reg2 = $res2->fetch_array()) { $cantidad += $reg2[3]; $costo_unidad = $reg2[4]; $iva = $reg2[1]; } $totalbs = $cantidad * $costo_unidad; $totaliva = $totalbs * $iva / 100; echo "\n <tr>\n <td>{$reg['1']}</td>\n <td>{$cantidad}</td>\n <td>{$totalbs}</td>\n <td>{$totaliva}</td>\n </tr> \n ";
?> <section class="bloque"> <div> <?php include_once '../../layouts/cabecera-body.php'; ?> <hgroup> <h1>Producto</h1> </hgroup> </div> <?php extract($_POST); require_once '../../system/class.php'; $pro = new producto(); $reg1 = $pro->consulta_completo($mysqli); $i = 0; while ($reg2 = $reg1->fetch_array()) { if (isset($submit) && $Nom_produ == $reg2[1]) { ?> <script type="text/javascript"> window.location="index?mensaje"; </script> <?php exit(1); } if (isset($modificar) && $Nom_produ != $Nom_original && $Nom_produ == $reg2[1]) { ?> <script type="text/javascript"> window.location="index?mensaje"; </script>