Example #1
0
header("Content-type: application/vnd.mozilla.xul+xml");
//StartXul(_("Compras"));
echo '<?xml version="1.0" encoding="UTF-8"?>';
echo '<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>';
echo '<?xml-stylesheet href="' . $_BasePath . 'css/xul.css" type="text/css"?>';
define("TALLAJE_DEFECTO", 5);
$TallajeDefecto = "Varios";
$op = new Producto();
$op->Crea();
$modo = CleanText($_GET["modo"]);
$Referencia = $op->get("Referencia");
//$Nombre              = $op->get("Nombre");
$Marca = _("Generico");
$FamDefecto = _("Varias");
$primerCB = $op->get("CodigoBarras");
$IdFamiliaDefecto = getFirstNotNull("ges_familias", "IdFamilia");
$IdSubFamiliaDefecto = getSubFamiliaAleatoria($IdFamiliaDefecto);
$FamDefecto = getIdFamilia2Texto($IdFamiliaDefecto) . " - " . getIdSubFamilia2Texto($IdFamiliaDefecto, $IdSubFamiliaDefecto);
$Nombre = '';
$txtMoDet = getModeloDetalle2txt();
$esBTCA = $txtMoDet[0] == "BTCA";
$txtModelo = $txtMoDet[1];
$txtDetalle = $txtMoDet[2];
$txtalias = $txtMoDet[3];
$txtref = $txtMoDet[4];
$btca = $esBTCA ? 'false' : 'true';
$esInvent = $modo == 'altainventario' ? true : false;
$btnAlta = $esInvent ? "AltaProductoInventario()" : "AltaProducto()";
$lbtnAlta = $esInvent ? " Registrar..." : " Comprar...";
$ibtnAlta = $esInvent ? "{$_BasePath}" . "img/gpos_registrarinventarioalta.png" : "{$_BasePath}" . "img/gpos_compras.png";
$btnVaciar = $esInvent ? "parent.volverStock()" : "volverPresupuestos()";
Example #2
0
 function Crea()
 {
     $this->Init();
     $this->regeneraCodigos();
     $this->setNombre(_("Nuevo producto"));
     $this->setPrecioVenta(0);
     $this->setPrecioOnline(0);
     $this->set("Costo", 0, FORCE);
     $fam = getFirstNotNull("ges_familias", "IdFamilia");
     $this->set("IdFamilia", $fam, FORCE);
     $this->set("IdSubFamilia", getSubFamiliaAleatoria($fam), FORCE);
     $this->set("IdProvHab", getFirstNotNull("ges_proveedores", "IdProveedor"), FORCE);
     $this->set("IdLabHab", getFirstNotNull("ges_laboratorios", "IdLaboratorio"), FORCE);
     $this->set("IdMarca", getFirstNotNull("ges_marcas", "IdMarca"), FORCE);
     $this->set("IdContenedor", getFirstNotNull("ges_contenedores", "IdContenedor"), FORCE);
     $this->set("IdProductoAlias0", getFirstNotNull("ges_productos_alias", "IdProductoAlias"), FORCE);
     $this->set("IdProductoAlias1", getFirstNotNull("ges_productos_alias", "IdProductoAlias"), FORCE);
     $this->set("IdTallaje", TALLAJE_VARIOS, FORCE);
     $this->set("IdTalla", TALLAJE_VARIOS_TALLA, FORCE);
     $oAlmacen = getSesionDato("AlmacenCentral");
     if ($oAlmacen) {
         //$this->set("");
         $this->set("TipoImpuesto", getTipoImpuesto(), FORCE);
         $this->set("Impuesto", getValorImpuestoDefectoCentral(), FORCE);
     }
     //$this->set("IdProvHab",
 }