?> al <?php echo $fechaf; ?> <br> <?php } if ($fechaI == "" and $fechaF == "" and $producto != "") { ?> <strong><label for="user_name">Corresponde a Producto:</label></strong> <?php echo $producto; ?> <br> <?php $fechai = Invertir_Fecha($fechaI); $fechaf = Invertir_Fecha($fechaF); ?> <strong><label for="user_name">En Fecha:</label></strong> <?php echo $fechai; ?> al <?php echo $fechaf; ?> <br> <?php } ?> </td> </tr> </table> </div>
<?php require_once '../datos/Database.php'; session_start(); $sesion = $_SESSION['userMaster']; $sucursal = $sesion['idSucursal']; $usuario = $_POST['us']; $fechai = $_POST['fechai']; $fechaf = $_POST['fechaf']; $actual = Invertir_Fecha(date("Y-m-d")); //EMPRESA $consulta = "select nombreEmpresa, nit from Empresa "; $resultado = Database::getInstance()->getDb()->prepare($consulta); $resultado->execute(); $empresa = $resultado->fetch(); function Invertir_Fecha($fecha) { $Y = substr($fecha, 0, 4); $M = substr($fecha, 5, 2); $D = substr($fecha, 8); $FechaInvertida = $D . "/" . $M . "/" . $Y; return $FechaInvertida; } $con = ""; $tipo = ""; $dato = ""; // SI LOS CAMPOS DE FECHAS ESTAN VACIOS BUSCA TODAS LAS VENTAS DE LOS USUARIOS QUE LAS HAYAN REALIZADO if ($usuario == "Todos" and $fechai == "" and $fechaf == "") { $con = "Select distinct idUsuario, nombre, apellido from ReporteVentasUsuario where idSucursal = '{$sucursal}'"; $dato = 1; }
$i = $i + 1; ?> <tr> <td > <?php echo $i; ?> </td> <th class="text-center"> <?php echo $row1['idVenta']; ?> </th> <td class="text-center"> <?php $fechainv = Invertir_Fecha($row1['fecha']); echo $fechainv; ?> </td> <td class="text-center"> <?php echo $row1['hora']; ?> </td> <td > <?php echo $row1['nombreCliente']; ?> </td> <td class="text-center"> <?php
while ($row = $comando->fetch()) { ?> <tr> <td id = "" name="" > <?php echo $i; ?> </td> <th > <?php echo $row['idVenta']; ?> </th> <td > <?php echo Invertir_Fecha($row['fecha']); ?> </td> <td > <?php echo $row['nit']; ?> </td> <td> <?php echo $row['nombreCliente']; ?> </td> <td> <?php echo $row['nroFactura'];