Example #1
0
<?php

include "tool.php";
if (!getSesionDato("IdTienda")) {
    session_write_close();
    header("Location: logout.php");
    exit;
}
SimpleAutentificacionAutomatica("visual-xul", "xulentrar.php");
$NombreEmpresa = $_SESSION["GlobalNombreNegocio"];
$NombreEmpresa = $NombreEmpresa == 'gPOS' ? '' : $NombreEmpresa;
$NombreUsuarioDefecto = $_SESSION["NombreUsuario"];
$NombreTiendaDefecto = getNombreComercialLocal(getSesionDato("IdTienda"));
$esCarritoAlmacen = getSesionDato("ModoCarritoAlmacen");
$esAgrupar = $esCarritoAlmacen == 'g' ? 'true' : 'false';
$esTraslado = $esCarritoAlmacen == 't' ? 'true' : 'false';
$lanzarTPV = isset($_GET["t"]) == 'on';
//TODO: hacer esto XUL seguro
StartXul(_("gPOS " . $NombreEmpresa . ' // Admin'));
if (isUsuarioAdministradorWeb()) {
    ?>
<command id="verTemplates" 
  oncommand="solapa('modtemplates.php?modo=lista')"
  label="Templates"/>  
<command id="altaTemplate" 
  oncommand="solapa('modtemplates.php?modo=alta')"
  label="Alta template"/>  
<command id="editarJS" 
  oncommand="popup('xuleditor.php?id=24')"
  label="Editar JS"/>  
<command id="editarCSS" 
$pdf->SetX(17);
$pdf->SetFont('Courier', '', 9);
$pdf->Cell(100, 4, "Existencias:");
$pdf->SetX(42);
$pdf->SetFont('Courier', 'B', 9);
$pdf->Cell(6, 4, $exist);
$pdf->SetX(105);
$pdf->SetFont('Courier', '', 9);
$pdf->Cell(110, 4, "Costo Promedio:");
$pdf->SetX(137);
$pdf->SetFont('Courier', 'B', 9);
$pdf->Cell(10, 4, $Moneda[1]['S'] . number_format($cprom, 2));
$pdf->SetX(170);
$pdf->SetFont('Courier', '', 9);
$pdf->Cell(100, 4, "Costo Total:");
$pdf->SetX(195);
$pdf->SetFont('Courier', 'B', 9);
$pdf->Cell(10, 4, $Moneda[1]['S'] . number_format($ctotal, 2));
$pdf->Ln(8);
$xLocal = getNombreComercialLocal($IdLocal);
$fecha = implota($fechahoy = date("Y-m-d"));
$hora = date("H:i");
$mensaje = ":::" . $operador . " " . $fecha . " " . $hora . " " . $xLocal . ":::";
$pdf->SetX(17);
$pdf->SetFont('Courier', 'B', 9);
$pdf->Cell(300, 4, $mensaje);
//#### NOMBRE DEL FICHERO
$prod = explode(" ", $producto);
$cod = $prod[0];
$name = "Producto_" . $cod . ".pdf";
$pdf->Output($name, '');
Example #3
0
        $hasta = CleanFechaES($_GET["hasta"]);
        $desde = CleanFechaES($_GET["desde"]);
        $xfamilia = CleanID($_GET["familia"]);
        $xmarca = CleanID($_GET["marca"]);
        $esInvent = $_GET["xinventario"] == "Inventario" ? true : false;
        $xinvent = CleanID($_GET["xidinventario"]);
        $idlocal = CleanID($_GET["xlocal"]);
        $xnombre = CleanText($_GET["xnombre"]);
        $xcodigo = CleanCB($_GET["xcodigo"]);
        $xope = CleanID($_GET["xope"]);
        $xidope = $xope == 7 ? CleanID($_GET["xidope"]) : false;
        //**Pendiente busqueda inventarios
        $xmov = CleanText($_GET["xmov"]);
        $invent = CleanText($_GET["xtitulo"]);
        $almacen = CleanText($_GET["alma"]);
        $xLocal = getNombreComercialLocal($idlocal);
        $almacen = $almacen ? $almacen : $xLocal;
        $xinvent = $xinvent ? $xinvent : 'none';
        $selcvs = "       DATE_FORMAT(FechaMovimiento, '%e/%m/%y %H:%i') as FechaMovimiento, " . "       ges_usuarios.Identificacion as Usuario, " . "       ges_locales.NombreComercial as Almacen, " . "       CONCAT(ges_productos.CodigoBarras,' ',ges_productos_idioma.Descripcion,' '," . "       ges_marcas.Marca,' ', " . "       ges_modelos.Color,' ', " . "       ges_detalles.Talla,' ', " . "       ges_laboratorios.NombreComercial) as Producto, " . "       ges_contenedores.Contenedor, " . "       ges_productos.UnidadMedida, " . "       ges_productos.UnidadesPorContenedor as UnidxCont, " . "       KardexOperacion, " . "       ges_kardex.TipoMovimiento, " . "       (SELECT ges_kardexajusteoperacion.AjusteOperacion from ges_kardexajusteoperacion where ges_kardexajusteoperacion.IdKardexAjusteOperacion = ges_kardex.IdKardexAjusteOperacion AND ges_kardex.IdKardexAjusteOperacion > 0) as 'AjusteOperacion', " . "       CantidadMovimiento, " . "       ROUND(CostoUnitarioMovimiento,2) as CostoUnitarioMovimiento, " . "       ROUND(CostoTotalMovimiento,2) as CostoTotalMovimiento, " . "       SaldoCantidad, " . "       IF ( ges_kardex.Observaciones like '', ' ',ges_kardex.Observaciones) " . "       as Observaciones ";
        $sql = obtenerKardexMovimientosInventario($idlocal, $desde, $hasta, $xfamilia, $xmarca, $xope, $xmov, $xnombre, $xcodigo, $xinvent, $esInvent, false, $selcvs, false, false, false);
        $xinvent = str_replace("- ", "", $invent);
        $xinvent = str_replace(" ", "_", $xinvent);
        $xalmacen = str_replace(" ", "_", $almacen);
        $name = "gPOS_" . $xalmacen . "_" . $xinvent;
        $NombreArchivo = $name . ".csv";
        $xtitulo = '"' . $almacen . ' ' . $invent . '"';
        exportMysqlToCsv($sql, $NombreArchivo, $xtitulo);
        break;
}
function ProcesarSQL($cod, $Desde, $Hasta, $IdLocal, $IdFamilia, $IdSubsidia, $STSubsid, $IdProveedor, $IdUsuario, $Referencia, $CodigoBarra, $NumeroSerie, $Lote, $Partida, $TipoVenta, $esTPVOP, $LocalActual, $DNICliente, $TipoComprobante, $SerieComprobante, $EstadoComprobante, $EstadoPago, $Modalidad, $EstadoPromo, $TipoPromo, $TipoOperacion, $TipoOpCjaGral, $PeriodoVenta, $NombreCliente, $TipoCliente, $IdMarca, $CondicionVenta, $EstadoOS, $Prioridad, $Facturacion, $EstadoSuscripcion, $TipoSuscripcion, $TipoPagoSuscripcion, $Prolongacion, $IdCLiente, $Codigo, $EstadoPagoVenta, $Cobranza, $CodigoComprobante)
{