public function __construct($a = FALSE) { parent::__construct('articulosprov', 'plugins/facturacion_base/'); if (!isset(self::$impuestos)) { self::$impuestos = array(); } if (!isset(self::$nombres)) { self::$nombres = array(); } if ($a) { $this->id = $this->intval($a['id']); $this->referencia = $a['referencia']; $this->codproveedor = $a['codproveedor']; $this->refproveedor = $a['refproveedor']; $this->descripcion = $a['descripcion']; /// En algunos módulos de eneboo se usa coste como precio if (is_null($a['precio']) and isset($a['coste'])) { $this->precio = floatval($a['coste']); } else { $this->precio = floatval($a['precio']); } $this->dto = floatval($a['dto']); $this->codimpuesto = $a['codimpuesto']; $this->stock = floatval($a['stock']); $this->nostock = $this->str2bool($a['nostock']); $this->codbarras = $a['codbarras']; $this->partnumber = $a['partnumber']; } else { $this->id = NULL; $this->referencia = NULL; $this->codproveedor = NULL; $this->refproveedor = NULL; $this->descripcion = NULL; $this->precio = 0; $this->dto = 0; $this->codimpuesto = NULL; $this->stock = 0; $this->nostock = TRUE; $this->codbarras = NULL; $this->partnumber = NULL; } $this->iva = NULL; }