mirror of
https://github.com/rmontanana/inventario2.git
synced 2025-08-15 23:45:58 +00:00
Merge branch 'release/1.12'
This commit is contained in:
@@ -162,8 +162,6 @@ class AportaContenido {
|
|||||||
public function __call($metodo, $parametros)
|
public function __call($metodo, $parametros)
|
||||||
{
|
{
|
||||||
switch ($metodo) { // Dependiendo del método invocado
|
switch ($metodo) { // Dependiendo del método invocado
|
||||||
case 'titulo': // devolvemos el título
|
|
||||||
return PROGRAMA . " v" . VERSION;
|
|
||||||
case 'usuario':
|
case 'usuario':
|
||||||
if ($this->registrado)
|
if ($this->registrado)
|
||||||
return "Usuario=$this->usuario";
|
return "Usuario=$this->usuario";
|
||||||
@@ -249,7 +247,7 @@ class AportaContenido {
|
|||||||
if (!$this->pefil['Informe']) {
|
if (!$this->pefil['Informe']) {
|
||||||
$this->procesaURL();
|
$this->procesaURL();
|
||||||
$fichero = 'xml/informe' . ucfirst($opcion) . '.xml';
|
$fichero = 'xml/informe' . ucfirst($opcion) . '.xml';
|
||||||
$salida = 'tmp/informe' . ucfirst($opcion) . '.xml';
|
$salida = TMP.'/informe' . ucfirst($opcion) . '.xml';
|
||||||
//Establece los posibles parámetros del listado.
|
//Establece los posibles parámetros del listado.
|
||||||
$orden = $this->datosURL['orden'];
|
$orden = $this->datosURL['orden'];
|
||||||
$sentido = $this->datosURL['sentido'] == "asc" ? ' ' : ' desc ';
|
$sentido = $this->datosURL['sentido'] == "asc" ? ' ' : ' desc ';
|
||||||
@@ -279,7 +277,7 @@ class AportaContenido {
|
|||||||
if (!$this->pefil['Informe']) {
|
if (!$this->pefil['Informe']) {
|
||||||
$this->procesaURL();
|
$this->procesaURL();
|
||||||
$fichero = 'xml/informe' . ucfirst($opcion) . '.xml';
|
$fichero = 'xml/informe' . ucfirst($opcion) . '.xml';
|
||||||
$salida = 'tmp/informe' . ucfirst($opcion) . '.xml';
|
$salida = TMP.'/informe' . ucfirst($opcion) . '.xml';
|
||||||
//Establece los posibles parámetros del listado.
|
//Establece los posibles parámetros del listado.
|
||||||
$orden = $this->datosURL['orden'];
|
$orden = $this->datosURL['orden'];
|
||||||
$sentido = $this->datosURL['sentido'] == "asc" ? ' ' : ' desc ';
|
$sentido = $this->datosURL['sentido'] == "asc" ? ' ' : ' desc ';
|
||||||
@@ -380,7 +378,7 @@ class AportaContenido {
|
|||||||
private function devuelveInforme($informe)
|
private function devuelveInforme($informe)
|
||||||
{
|
{
|
||||||
$letras = "abcefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
|
$letras = "abcefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
|
||||||
$nombre = "tmp/informe" . substr(str_shuffle($letras), 0, 10) . ".pdf";
|
$nombre = TMP."/informe" . substr(str_shuffle($letras), 0, 10) . ".pdf";
|
||||||
$informe->guardaArchivo($nombre);
|
$informe->guardaArchivo($nombre);
|
||||||
return '<div class="container">
|
return '<div class="container">
|
||||||
<!--<a href="' . $nombre . '" target="_blank"><span class="glyphicon glyphicon-cloud-download" style="font-size:1.5em;"></span>Descargar Informe</a>-->
|
<!--<a href="' . $nombre . '" target="_blank"><span class="glyphicon glyphicon-cloud-download" style="font-size:1.5em;"></span>Descargar Informe</a>-->
|
||||||
|
@@ -1,3 +1,12 @@
|
|||||||
|
Versión 1.12 06-05-2014
|
||||||
|
-Mantenimiento muestra el 'Titulo' del campo tanto en Consulta como en el formulario de edición
|
||||||
|
-Muestra cuadro de búsqueda y mensaje correcto cuando no se encuentra la cadena de búsqueda en Mantenimiento
|
||||||
|
-Añadidos mensajes de ayuda en los campos de configuración
|
||||||
|
-Añadida la columna de cantidad ubicada en mantenimiento de artículos
|
||||||
|
-Fix #35. Cambiados los informes de Articulos y Ubicaciones para recoger el campo Nº de elementos
|
||||||
|
-Fix #35. Añadido el campo Nº de elementos en el mantenimiento de Articulos y Ubicaciones a través de archivo xml
|
||||||
|
-Fix #31. Añadido el directorio temporal en el archivo de configuración
|
||||||
|
|
||||||
Versión 1.11b 26-04-2014
|
Versión 1.11b 26-04-2014
|
||||||
-Cambiada la referencia de etiquetas Apli
|
-Cambiada la referencia de etiquetas Apli
|
||||||
|
|
||||||
|
@@ -25,7 +25,7 @@ class Configuracion {
|
|||||||
private $confAnterior = "inc/configuracion.ant";
|
private $confAnterior = "inc/configuracion.ant";
|
||||||
private $datosConf;
|
private $datosConf;
|
||||||
//Campos del fichero de configuración que se van a editar.
|
//Campos del fichero de configuración que se van a editar.
|
||||||
private $lista = array('SERVIDOR', 'PUERTO', 'BASEDATOS', 'BASEDATOSTEST', 'USUARIO', 'CLAVE', 'CENTRO', 'NUMFILAS', 'ESTILO', 'PLANTILLA', 'COLORLAT', 'COLORFON', 'MYSQLDUMP', 'GZIP');
|
private $lista = array('SERVIDOR', 'PUERTO', 'BASEDATOS', 'BASEDATOSTEST', 'USUARIO', 'CLAVE', 'CENTRO', 'NUMFILAS', 'ESTILO', 'PLANTILLA', 'COLORLAT', 'COLORFON', 'MYSQLDUMP', 'GZIP', 'TMP');
|
||||||
private $campos;
|
private $campos;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
@@ -54,6 +54,11 @@ class Configuracion {
|
|||||||
$valor = trim($valor);
|
$valor = trim($valor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function creaTitulo($titulo, $ayuda)
|
||||||
|
{
|
||||||
|
return '<td style="vertical-align:middle"><a class="dato" href="#" data-placement="right" data-content="'.$ayuda.'">'.$titulo.'</a></td>';
|
||||||
|
}
|
||||||
|
|
||||||
public function ejecuta() {
|
public function ejecuta() {
|
||||||
$fichero = $this->obtieneFichero();
|
$fichero = $this->obtieneFichero();
|
||||||
$datos = explode("\n", $fichero);
|
$datos = explode("\n", $fichero);
|
||||||
@@ -107,17 +112,17 @@ class Configuracion {
|
|||||||
//$salida.='<p align="center"><table border=1 class="tablaDatos"><tbody>';
|
//$salida.='<p align="center"><table border=1 class="tablaDatos"><tbody>';
|
||||||
$salida.='<p align="center"><table border=2 class="table table-hover"><tbody>';
|
$salida.='<p align="center"><table border=2 class="table table-hover"><tbody>';
|
||||||
$salida.='<th colspan=2 class="info"><center><b>Preferencias</b></center></th>';
|
$salida.='<th colspan=2 class="info"><center><b>Preferencias</b></center></th>';
|
||||||
$salida.='<tr><td>Nombre del Centro</td><td><input type="text" name="CENTRO" value="' . $this->datosConf['CENTRO'] . '" size="30" /></td></tr>';
|
$salida.='<tr>'.$this->creaTitulo("Nombre del Centro","Nombre que aparecerá en los informes y en la página principal de la aplicación").'<td><input type="text" name="CENTRO" value="' . $this->datosConf['CENTRO'] . '" size="30" /></td></tr>';
|
||||||
$salida.='<tr><td>Número de filas</td><td><input type="text" name="NUMFILAS" value="' . $this->datosConf['NUMFILAS'] . '" size="3" /></td></tr>';
|
$salida.='<tr>'.$this->creaTitulo("Número de filas","Número de filas que aparecerán en la pantalla de consulta de los maestros. Valor entre 10 y 25.").'<td><input type="number" max="25" min="10" name="NUMFILAS" value="' . $this->datosConf['NUMFILAS'] . '" size="3" /></td></tr>';
|
||||||
$salida.='<tr><td style="vertical-align:middle">Plantilla</td><td><select name="PLANTILLA" class="form-control">';
|
$salida.='<tr>'.$this->creaTitulo("Plantilla","Plantilla html utilizada para mostrar el contenido de la aplicación.").'<td><select name="PLANTILLA" class="form-control">';
|
||||||
$salida.='<option value="normal" ' . $normal . '>normal</option>';
|
$salida.='<option value="normal" ' . $normal . '>normal</option>';
|
||||||
$salida.='<option ' . $bootstrap . '>bootstrap</option></select></td></tr>';
|
$salida.='<option ' . $bootstrap . '>bootstrap</option></select></td></tr>';
|
||||||
$salida.='<tr><td style="vertical-align:middle">Estilo</td><td><select name="ESTILO" class="form-control">';
|
$salida.='<tr>'.$this->creaTitulo("Estilo","Estilo de los botones de control en los mantenimientos de los maestros").'<td><select name="ESTILO" class="form-control">';
|
||||||
$salida.='<option value="personal" ' . $personal . '>personal</option>';
|
$salida.='<option value="personal" ' . $personal . '>personal</option>';
|
||||||
$salida.='<option ' . $bluecurve . '>bluecurve</option>';
|
$salida.='<option ' . $bluecurve . '>bluecurve</option>';
|
||||||
$salida.='<option ' . $bootst . '>bootstrap</option>';
|
$salida.='<option ' . $bootst . '>bootstrap</option>';
|
||||||
$salida.='<option ' . $cristal . '>cristal</option></select></td></tr>';
|
$salida.='<option ' . $cristal . '>cristal</option></select></td></tr>';
|
||||||
$salida.='<tr><td style="vertical-align:middle">Color Lateral (bootstrap)</td><td style="vertical-align:middle"><select name="COLORLAT" id="COLORLAT" class="form-control">';
|
$salida.='<tr>'.$this->creaTitulo("Color Lateral","Color que se aplicará a la parte izquierda de la aplicación donde aparece el menú").'<td style="vertical-align:middle"><select name="COLORLAT" id="COLORLAT" class="form-control">';
|
||||||
foreach ($coloresLateral as $color => $codigo) {
|
foreach ($coloresLateral as $color => $codigo) {
|
||||||
$selec = "";
|
$selec = "";
|
||||||
if (trim($this->datosConf['COLORLAT']) == $codigo) {
|
if (trim($this->datosConf['COLORLAT']) == $codigo) {
|
||||||
@@ -126,7 +131,7 @@ class Configuracion {
|
|||||||
$salida.='<option value="' . $codigo . '" ' . $selec . ' >' . $color . '</option>';
|
$salida.='<option value="' . $codigo . '" ' . $selec . ' >' . $color . '</option>';
|
||||||
}
|
}
|
||||||
$salida.='</select></td></tr>';
|
$salida.='</select></td></tr>';
|
||||||
$salida.='<tr><td style="vertical-align:middle">Color Fondo (bootstrap)</td><td style="vertical-align:middle"><select name="COLORFON" id="COLORFON" class="form-control">';
|
$salida.='<tr>'.$this->creaTitulo("Color Fondo","Color que aparecerá como fondo en todas las pantallas de la aplicación").'<td style="vertical-align:middle"><select name="COLORFON" id="COLORFON" class="form-control">';
|
||||||
foreach ($coloresFondo as $color => $codigo) {
|
foreach ($coloresFondo as $color => $codigo) {
|
||||||
$selec = "";
|
$selec = "";
|
||||||
if (trim($this->datosConf['COLORFON']) == $codigo) {
|
if (trim($this->datosConf['COLORFON']) == $codigo) {
|
||||||
@@ -135,15 +140,16 @@ class Configuracion {
|
|||||||
$salida.='<option value="' . $codigo . '" ' . $selec . ' >' . $color . '</option>';
|
$salida.='<option value="' . $codigo . '" ' . $selec . ' >' . $color . '</option>';
|
||||||
}
|
}
|
||||||
$salida.='</select></td></tr>';
|
$salida.='</select></td></tr>';
|
||||||
|
$salida.='<tr>'.$this->creaTitulo("Directorio tmp","Directorio donde se almacenarán los archivos temporales de la aplicación y también los archivos e informes que genera").'<td><input type="text" name="TMP" value="' . $this->datosConf['TMP'] . '" size="30" /></td></tr>';
|
||||||
$salida.='<th colspan=2 class="danger"><center><b>Base de datos</b></center></th>';
|
$salida.='<th colspan=2 class="danger"><center><b>Base de datos</b></center></th>';
|
||||||
$salida.='<tr><td>Servidor</td><td><input type="text" name="SERVIDOR" value="' . $this->datosConf['SERVIDOR'] . '" size="30" /></td></tr>';
|
$salida.='<tr>'.$this->creaTitulo("Servidor","Nombre o dirección IP del servidor MySQL. Normalmente localhost").'<td><input type="text" name="SERVIDOR" value="' . $this->datosConf['SERVIDOR'] . '" size="30" /></td></tr>';
|
||||||
$salida.='<tr><td>Puerto</td><td><input type="text" name="PUERTO" value="' . $this->datosConf['PUERTO'] . '" size="30" /></td></tr>';
|
$salida.='<tr>'.$this->creaTitulo("Puerto","Número de puerto donde el servidor admite conexiones MySQL. Normalmente 3306").'<td><input type="text" name="PUERTO" value="' . $this->datosConf['PUERTO'] . '" size="30" /></td></tr>';
|
||||||
$salida.='<tr><td>Base de datos</td><td><input type="text" name="BASEDATOS" value="' . $this->datosConf['BASEDATOS'] . '" size="30" /></td></tr>';
|
$salida.='<tr>'.$this->creaTitulo("Base de datos","Nombre de la base de datos donde se almacenarán los datos de la aplicación").'<td><input type="text" name="BASEDATOS" value="' . $this->datosConf['BASEDATOS'] . '" size="30" /></td></tr>';
|
||||||
$salida.='<tr><td>Base de datos Tests</td><td><input type="text" name="BASEDATOSTEST" value="' . $this->datosConf['BASEDATOSTEST'] . '" size="30" /></td></tr>';
|
$salida.='<tr>'.$this->creaTitulo("Base de datos Tests","Nombre de la base de datos donde se almacenarán los datos de prueba de la aplicación").'<td><input type="text" name="BASEDATOSTEST" value="' . $this->datosConf['BASEDATOSTEST'] . '" size="30" /></td></tr>';
|
||||||
$salida.='<tr><td>Usuario</td><td><input type="text" name="USUARIO" value="' . $this->datosConf['USUARIO'] . '" size="30" /></td></tr>';
|
$salida.='<tr>'.$this->creaTitulo("Usuario","Usuario con permisos de lectura/escritura en la base de datos").'<td><input type="text" name="USUARIO" value="' . $this->datosConf['USUARIO'] . '" size="30" /></td></tr>';
|
||||||
$salida.='<tr><td>Clave</td><td><input type="text" name="CLAVE" value="' . $this->datosConf['CLAVE'] . '" size="30" /></td></tr>';
|
$salida.='<tr>'.$this->creaTitulo("Clave","Contraseña del usuario con permisos sobre la base de datos").'<td><input type="text" name="CLAVE" value="' . $this->datosConf['CLAVE'] . '" size="30" /></td></tr>';
|
||||||
$salida.='<tr><td>mysqldump</td><td><input type="text" name="MYSQLDUMP" value="' . $this->datosConf['MYSQLDUMP'] . '" size="30" /></td></tr>';
|
$salida.='<tr>'.$this->creaTitulo("mysqldump","Ruta completa a la utilidad mysqldump. Este programa es necesario para que se puedan hacer las copias de seguridad de la aplicación").'<td><input type="text" name="MYSQLDUMP" value="' . $this->datosConf['MYSQLDUMP'] . '" size="30" /></td></tr>';
|
||||||
$salida.='<tr><td>gzip</td><td><input type="text" name="GZIP" value="' . $this->datosConf['GZIP'] . '" size="30" /></td></tr>';
|
$salida.='<tr>'.$this->creaTitulo("gzip","Ruta completa a la utilidad gzip. Este programa es necesario para que se puedan comprimir las copias de seguridad de la aplicación").'<td><input type="text" name="GZIP" value="' . $this->datosConf['GZIP'] . '" size="30" /></td></tr>';
|
||||||
$salida.='<tr align=center><td colspan=2><button type="submit" class="btn btn-primary" name="aceptar"><span class="glyphicon glyphicon-ok"></span> Aceptar</td></tr></p>';
|
$salida.='<tr align=center><td colspan=2><button type="submit" class="btn btn-primary" name="aceptar"><span class="glyphicon glyphicon-ok"></span> Aceptar</td></tr></p>';
|
||||||
$salida.='</form></div></center>';
|
$salida.='</form></div></center>';
|
||||||
$salida.="<script>
|
$salida.="<script>
|
||||||
@@ -157,6 +163,7 @@ class Configuracion {
|
|||||||
});
|
});
|
||||||
$('select[name=" . '"COLORLAT"' . "]').simplecolorpicker({theme: 'glyphicons'});
|
$('select[name=" . '"COLORLAT"' . "]').simplecolorpicker({theme: 'glyphicons'});
|
||||||
$('select[name=" . '"COLORFON"' . "]').simplecolorpicker({theme: 'glyphicons'});
|
$('select[name=" . '"COLORFON"' . "]').simplecolorpicker({theme: 'glyphicons'});
|
||||||
|
$('.dato').popover({trigger: 'hover'});
|
||||||
});
|
});
|
||||||
</script>";
|
</script>";
|
||||||
return $salida;
|
return $salida;
|
||||||
|
@@ -53,7 +53,7 @@ class CopiaSeguridad {
|
|||||||
}
|
}
|
||||||
private function copiaBaseDatos()
|
private function copiaBaseDatos()
|
||||||
{
|
{
|
||||||
$archivo_sql = "tmp/baseDatos" . BASEDATOS . ".sql";
|
$archivo_sql = TMP."/baseDatos" . BASEDATOS . ".sql";
|
||||||
$baseDatosComprimida = $archivo_sql . ".gz";
|
$baseDatosComprimida = $archivo_sql . ".gz";
|
||||||
$this->baseDatos = $baseDatosComprimida;
|
$this->baseDatos = $baseDatosComprimida;
|
||||||
if (file_exists($baseDatosComprimida)) {
|
if (file_exists($baseDatosComprimida)) {
|
||||||
@@ -78,7 +78,7 @@ class CopiaSeguridad {
|
|||||||
}
|
}
|
||||||
private function copiaImagenes()
|
private function copiaImagenes()
|
||||||
{
|
{
|
||||||
$copiaImagenes = "tmp/Imagenes.tbz";
|
$copiaImagenes = TMP."/Imagenes.tbz";
|
||||||
$this->imagenes = $copiaImagenes;
|
$this->imagenes = $copiaImagenes;
|
||||||
if (file_exists($copiaImagenes)) {
|
if (file_exists($copiaImagenes)) {
|
||||||
unlink($copiaImagenes);
|
unlink($copiaImagenes);
|
||||||
@@ -98,7 +98,7 @@ class CopiaSeguridad {
|
|||||||
private function empaqueta()
|
private function empaqueta()
|
||||||
{
|
{
|
||||||
// Empaqueta los dos archivos en el que va a devolver
|
// Empaqueta los dos archivos en el que va a devolver
|
||||||
$nombreCopia = "tmp/Copia" . BASEDATOS . strftime("%Y%m%d%H%M") . ".tar";
|
$nombreCopia = TMP."/Copia" . BASEDATOS . strftime("%Y%m%d%H%M") . ".tar";
|
||||||
if (file_exists($nombreCopia)) {
|
if (file_exists($nombreCopia)) {
|
||||||
unlink($nombreCopia);
|
unlink($nombreCopia);
|
||||||
}
|
}
|
||||||
|
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -37,7 +36,7 @@ class EtiquetasPDF {
|
|||||||
private $docu;
|
private $docu;
|
||||||
private $pdf;
|
private $pdf;
|
||||||
private $def;
|
private $def;
|
||||||
private $nombreFichero = "tmp/informeEtiquetas.pdf";
|
private $nombreFichero;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* El constructor recibe como argumento el nombre del archivo XML con la definición, encargándose de recuperarla y guardar toda la información localmente
|
* El constructor recibe como argumento el nombre del archivo XML con la definición, encargándose de recuperarla y guardar toda la información localmente
|
||||||
@@ -52,6 +51,7 @@ class EtiquetasPDF {
|
|||||||
if (!$registrado) {
|
if (!$registrado) {
|
||||||
return 'Debe registrarse para acceder a este apartado';
|
return 'Debe registrarse para acceder a este apartado';
|
||||||
}
|
}
|
||||||
|
$this->nombreFichero = TMP."/informeEtiquetas.pdf";
|
||||||
// Recuperamos la definición del informe
|
// Recuperamos la definición del informe
|
||||||
$this->def = simplexml_load_file($definicion);
|
$this->def = simplexml_load_file($definicion);
|
||||||
$this->bdd = $bdd;
|
$this->bdd = $bdd;
|
||||||
@@ -105,7 +105,7 @@ class EtiquetasPDF {
|
|||||||
}
|
}
|
||||||
$py = 6 + 41 * $fila;
|
$py = 6 + 41 * $fila;
|
||||||
$enlace2=$enlace.$tupla['idEl'];
|
$enlace2=$enlace.$tupla['idEl'];
|
||||||
$fichero = "tmp/etiq".rand(1000,9999).".png";
|
$fichero = TMP."/etiq".rand(1000,9999).".png";
|
||||||
QRcode::png($enlace2, $fichero);
|
QRcode::png($enlace2, $fichero);
|
||||||
$this->pdf->image($fichero, $etiq2, $py, 30, 30);
|
$this->pdf->image($fichero, $etiq2, $py, 30, 30);
|
||||||
unlink($fichero);
|
unlink($fichero);
|
||||||
@@ -155,7 +155,7 @@ class EtiquetasPDF {
|
|||||||
return $cabecera;
|
return $cabecera;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function guardaArchivo($nombre = "tmp/Informe.pdf")
|
public function guardaArchivo($nombre)
|
||||||
{
|
{
|
||||||
$fichero = fopen($nombre, "w");
|
$fichero = fopen($nombre, "w");
|
||||||
fwrite($fichero, $this->getCabecera());
|
fwrite($fichero, $this->getCabecera());
|
||||||
|
@@ -44,7 +44,7 @@ class Importacion {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private function importarFichero() {
|
private function importarFichero() {
|
||||||
$uploadfile = "tmp/" . basename($_FILES['fichero']['name']);
|
$uploadfile = TMP."/" . basename($_FILES['fichero']['name']);
|
||||||
if (!move_uploaded_file($_FILES['fichero']['tmp_name'], $uploadfile)) {
|
if (!move_uploaded_file($_FILES['fichero']['tmp_name'], $uploadfile)) {
|
||||||
die('No se pudo subir el fichero ' . $_FILES['userfile']['tmp_name']);
|
die('No se pudo subir el fichero ' . $_FILES['userfile']['tmp_name']);
|
||||||
}
|
}
|
||||||
|
@@ -54,7 +54,7 @@ class InformeInventario {
|
|||||||
private function devuelveInforme($informe)
|
private function devuelveInforme($informe)
|
||||||
{
|
{
|
||||||
$letras = "abcefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
|
$letras = "abcefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
|
||||||
$nombre = "tmp/informe" . substr(str_shuffle($letras), 0, 10) . ".pdf";
|
$nombre = TMP."/informe" . substr(str_shuffle($letras), 0, 10) . ".pdf";
|
||||||
$informe->guardaArchivo($nombre);
|
$informe->guardaArchivo($nombre);
|
||||||
return '<div class="container">
|
return '<div class="container">
|
||||||
<!--<a href="' . $nombre . '" target="_blank"><span class="glyphicon glyphicon-cloud-download" style="font-size:1.5em;"></span>Descargar Informe</a>-->
|
<!--<a href="' . $nombre . '" target="_blank"><span class="glyphicon glyphicon-cloud-download" style="font-size:1.5em;"></span>Descargar Informe</a>-->
|
||||||
@@ -69,15 +69,15 @@ class InformeInventario {
|
|||||||
switch ($salidaInforme) {
|
switch ($salidaInforme) {
|
||||||
case "pantalla":
|
case "pantalla":
|
||||||
$fichero = "xml/inventarioUbicacion.xml";
|
$fichero = "xml/inventarioUbicacion.xml";
|
||||||
$salida = "tmp/inventarioUbicacion.xml";
|
$salida = TMP."/inventarioUbicacion.xml";
|
||||||
break;
|
break;
|
||||||
case "csv":
|
case "csv":
|
||||||
$fichero = "xml/inventarioUbicacionCSV.xml";
|
$fichero = "xml/inventarioUbicacionCSV.xml";
|
||||||
$salida = "tmp/inventarioUbicacionCSV.xml";
|
$salida = TMP."/inventarioUbicacionCSV.xml";
|
||||||
break;
|
break;
|
||||||
case "etiquetas":
|
case "etiquetas":
|
||||||
$fichero = "xml/inventarioUbicacionEtiquetas.xml";
|
$fichero = "xml/inventarioUbicacionEtiquetas.xml";
|
||||||
$salida = "tmp/inventarioUbicacionEtiquetas.xml";
|
$salida = TMP."/inventarioUbicacionEtiquetas.xml";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$plantilla = file_get_contents($fichero) or die('Fallo en la apertura de la plantilla ' . $fichero);
|
$plantilla = file_get_contents($fichero) or die('Fallo en la apertura de la plantilla ' . $fichero);
|
||||||
@@ -99,7 +99,7 @@ class InformeInventario {
|
|||||||
return $this->devuelveInforme($informe);
|
return $this->devuelveInforme($informe);
|
||||||
case "csv":
|
case "csv":
|
||||||
//Genera una hoja de cálculo en formato csv
|
//Genera una hoja de cálculo en formato csv
|
||||||
$nombre = "tmp/Ubicacion" . strftime("%Y%m%d") . rand(100, 999) . ".csv";
|
$nombre = TMP."/Ubicacion" . strftime("%Y%m%d") . rand(100, 999) . ".csv";
|
||||||
$hoja = new Csv($this->bdd);
|
$hoja = new Csv($this->bdd);
|
||||||
$hoja->crea($nombre);
|
$hoja->crea($nombre);
|
||||||
$hoja->ejecutaConsulta($salida);
|
$hoja->ejecutaConsulta($salida);
|
||||||
@@ -119,15 +119,15 @@ class InformeInventario {
|
|||||||
switch ($salidaInforme) {
|
switch ($salidaInforme) {
|
||||||
case "pantalla":
|
case "pantalla":
|
||||||
$fichero = "xml/inventarioArticulo.xml";
|
$fichero = "xml/inventarioArticulo.xml";
|
||||||
$salida = "tmp/inventarioArticulo.xml";
|
$salida = TMP."/inventarioArticulo.xml";
|
||||||
break;
|
break;
|
||||||
case "csv":
|
case "csv":
|
||||||
$fichero = "xml/inventarioArticuloCSV.xml";
|
$fichero = "xml/inventarioArticuloCSV.xml";
|
||||||
$salida = "tmp/inventarioArticuloCSV.xml";
|
$salida = TMP."/inventarioArticuloCSV.xml";
|
||||||
break;
|
break;
|
||||||
case "etiquetas":
|
case "etiquetas":
|
||||||
$fichero = "xml/inventarioArticuloEtiquetas.xml";
|
$fichero = "xml/inventarioArticuloEtiquetas.xml";
|
||||||
$salida = "tmp/inventarioArticuloEtiquetas.xml";
|
$salida = TMP."/inventarioArticuloEtiquetas.xml";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$plantilla = file_get_contents($fichero) or die('Fallo en la apertura de la plantilla ' . $fichero);
|
$plantilla = file_get_contents($fichero) or die('Fallo en la apertura de la plantilla ' . $fichero);
|
||||||
@@ -151,7 +151,7 @@ class InformeInventario {
|
|||||||
return $this->devuelveInforme($informe);
|
return $this->devuelveInforme($informe);
|
||||||
case "csv":
|
case "csv":
|
||||||
//Genera una hoja de cálculo en formato csv
|
//Genera una hoja de cálculo en formato csv
|
||||||
$nombre = "tmp/Articulo" . strftime("%Y%m%d") . rand(100, 999) . ".csv";
|
$nombre = TMP."/Articulo" . strftime("%Y%m%d") . rand(100, 999) . ".csv";
|
||||||
$hoja = new Csv($this->bdd);
|
$hoja = new Csv($this->bdd);
|
||||||
$hoja->crea($nombre);
|
$hoja->crea($nombre);
|
||||||
$hoja->ejecutaConsulta($salida);
|
$hoja->ejecutaConsulta($salida);
|
||||||
@@ -237,7 +237,7 @@ class InformeInventario {
|
|||||||
<p>¿Desea obtener el inventario de todo el centro?</p>
|
<p>¿Desea obtener el inventario de todo el centro?</p>
|
||||||
<p><a class="btn btn-primary btn-lg" role="button" onClick="location.href=' . "'index.php'" . '"><span class="glyphicon glyphicon-arrow-left"></span> Volver</a>
|
<p><a class="btn btn-primary btn-lg" role="button" onClick="location.href=' . "'index.php'" . '"><span class="glyphicon glyphicon-arrow-left"></span> Volver</a>
|
||||||
<a class="btn btn-success btn-lg" role="button" onClick="location.href=' . "'index.php?informeInventario&opc=listarTotal'" . '">
|
<a class="btn btn-success btn-lg" role="button" onClick="location.href=' . "'index.php?informeInventario&opc=listarTotal'" . '">
|
||||||
<span class="glyphicon glyphicon-cloud-download"></span> Continuar</a></p>
|
<span class="glyphicon glyphicon-list-alt"></span> Continuar</a></p>
|
||||||
</div></div>';
|
</div></div>';
|
||||||
return $dialogo;
|
return $dialogo;
|
||||||
}
|
}
|
||||||
@@ -245,7 +245,7 @@ class InformeInventario {
|
|||||||
private function listarTotal()
|
private function listarTotal()
|
||||||
{
|
{
|
||||||
$fichero = "xml/inventarioUbicacion.xml";
|
$fichero = "xml/inventarioUbicacion.xml";
|
||||||
$salida = "tmp/inventarioUbicacion.xml";
|
$salida = TMP."/inventarioUbicacion.xml";
|
||||||
$comando = "select * from Ubicaciones ;";
|
$comando = "select * from Ubicaciones ;";
|
||||||
$resultado = $this->bdd->ejecuta($comando);
|
$resultado = $this->bdd->ejecuta($comando);
|
||||||
if (!$resultado) {
|
if (!$resultado) {
|
||||||
|
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -94,11 +93,13 @@ class InformePDF {
|
|||||||
public function getCabecera() {
|
public function getCabecera() {
|
||||||
$cabecera = "Content-type: application/pdf";
|
$cabecera = "Content-type: application/pdf";
|
||||||
$cabecera = $cabecera . "Content-length: " . strlen($this->docu);
|
$cabecera = $cabecera . "Content-length: " . strlen($this->docu);
|
||||||
$cabecera = $cabecera . "Content-Disposition: inline; filename=tmp/Informe.pdf";
|
$cabecera = $cabecera . "Content-Disposition: inline; filename=".TMP."/Informe.pdf";
|
||||||
return $cabecera;
|
return $cabecera;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function guardaArchivo($nombre = "tmp/Informe.pdf") {
|
public function guardaArchivo($nombre) {
|
||||||
|
if (!isset($nombre))
|
||||||
|
$nombre = TMP . "/Informe.pdf";
|
||||||
$fichero = fopen($nombre, "w");
|
$fichero = fopen($nombre, "w");
|
||||||
fwrite($fichero, $this->getCabecera());
|
fwrite($fichero, $this->getCabecera());
|
||||||
fwrite($fichero, $this->getContenido(), strlen($this->getContenido()));
|
fwrite($fichero, $this->getContenido(), strlen($this->getContenido()));
|
||||||
@@ -109,7 +110,7 @@ class InformePDF {
|
|||||||
header("Content-type: application/pdf");
|
header("Content-type: application/pdf");
|
||||||
$longitud = strlen($this->docu);
|
$longitud = strlen($this->docu);
|
||||||
header("Content-length: $longitud");
|
header("Content-length: $longitud");
|
||||||
header("Content-Disposition: inline; filename=tmp/Informe.pdf");
|
header("Content-Disposition: inline; filename=".TMP."/Informe.pdf");
|
||||||
}
|
}
|
||||||
|
|
||||||
public function imprimeInforme() {
|
public function imprimeInforme() {
|
||||||
|
@@ -31,8 +31,7 @@ define('NUMPASOS', 3);
|
|||||||
define('MINBYTES', 4096000); // post_max_size y max_upload van con esto
|
define('MINBYTES', 4096000); // post_max_size y max_upload van con esto
|
||||||
define('CADENAMINBYTES', '4M');
|
define('CADENAMINBYTES', '4M');
|
||||||
define('CONFIGURACION', 'inc/configuracion.inc');
|
define('CONFIGURACION', 'inc/configuracion.inc');
|
||||||
define('CONFIGTMP', 'tmp/config.tmp');
|
define('CONFIGTMP', TMP.'/config.tmp');
|
||||||
define('TMP', './tmp');
|
|
||||||
define('INC', './inc');
|
define('INC', './inc');
|
||||||
|
|
||||||
$instalar = new Instalar();
|
$instalar = new Instalar();
|
||||||
|
@@ -161,7 +161,6 @@ class Mantenimiento {
|
|||||||
$salida = $this->cargaComplementos();
|
$salida = $this->cargaComplementos();
|
||||||
//Introduce un botón para hacer búsquedas y el número de la página
|
//Introduce un botón para hacer búsquedas y el número de la página
|
||||||
$salida.= $this->enlaceBusqueda($pagSigte);
|
$salida.= $this->enlaceBusqueda($pagSigte);
|
||||||
$salida.= $cabecera;
|
|
||||||
//Consulta paginada de todas las tuplas
|
//Consulta paginada de todas las tuplas
|
||||||
$comando = str_replace('{inferior}', $pagina * NUMFILAS, $comando);
|
$comando = str_replace('{inferior}', $pagina * NUMFILAS, $comando);
|
||||||
$comando = str_replace('{superior}', NUMFILAS, $comando);
|
$comando = str_replace('{superior}', NUMFILAS, $comando);
|
||||||
@@ -185,8 +184,10 @@ class Mantenimiento {
|
|||||||
$this->datosURL['pag'] = $totalPags;
|
$this->datosURL['pag'] = $totalPags;
|
||||||
header('Location: ' . $this->montaURL());
|
header('Location: ' . $this->montaURL());
|
||||||
} else {
|
} else {
|
||||||
$salida = "<p align=\"center\"><center><h2>No hay registros</h2></center></p><br>";
|
$salida .= '<br><br><div class="alert alert-danger">No hay registros</div>';
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$salida.= $cabecera;
|
||||||
}
|
}
|
||||||
//$salida.=$comando;
|
//$salida.=$comando;
|
||||||
//$salida.=var_export($this->campos,true);
|
//$salida.=var_export($this->campos,true);
|
||||||
@@ -581,7 +582,8 @@ class Mantenimiento {
|
|||||||
foreach ($def->Campos->Col as $columna) {
|
foreach ($def->Campos->Col as $columna) {
|
||||||
$this->campos[(string) $columna['Nombre']] = array("Field" => (string) $columna['Titulo'], "Comment" => (string) $columna['Varios'],
|
$this->campos[(string) $columna['Nombre']] = array("Field" => (string) $columna['Titulo'], "Comment" => (string) $columna['Varios'],
|
||||||
"Type" => (string) $columna['Tipo'] . "(" . $columna['Ancho'] . ")", "Editable" => (string) $columna['Editable'],
|
"Type" => (string) $columna['Tipo'] . "(" . $columna['Ancho'] . ")", "Editable" => (string) $columna['Editable'],
|
||||||
"Campo" => (string) $columna['Campo'], "Visible" => (string) $columna['Visible'], "Ajuste" => (string) $columna['Ajuste']);
|
"Campo" => (string) $columna['Campo'], "Visible" => (string) $columna['Visible'], "Ajuste" => (string) $columna['Ajuste'],
|
||||||
|
"Titulo" => (string) $columna['Titulo']);
|
||||||
}
|
}
|
||||||
$this->comandoConsulta = $def->Consulta;
|
$this->comandoConsulta = $def->Consulta;
|
||||||
} else {
|
} else {
|
||||||
@@ -632,18 +634,20 @@ class Mantenimiento {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$clave2 = $clave;
|
$clave2 = $clave;
|
||||||
$clave = str_ireplace("descripcion", "Descripción", $clave);
|
/*$clave = str_ireplace("descripcion", "Descripción", $clave);
|
||||||
$clave = str_ireplace("ubicacion", "Ubicación", $clave);
|
$clave = str_ireplace("ubicacion", "Ubicación", $clave);
|
||||||
$clave = str_ireplace("articulo", "Artículo", $clave);
|
$clave = str_ireplace("articulo", "Artículo", $clave);*/
|
||||||
$ordenActual = $this->datosURL['orden'];
|
$ordenActual = $this->datosURL['orden'];
|
||||||
if ($ordenable) {
|
if ($ordenable) {
|
||||||
$this->backupURL();
|
$this->backupURL();
|
||||||
$this->datosURL['orden'] = $clave2;
|
$this->datosURL['orden'] = $clave2;
|
||||||
$resFlecha = $clave2 == $ordenActual ? $flecha : '';
|
$resFlecha = $clave2 == $ordenActual ? $flecha : '';
|
||||||
$salida.="<th><b><a title=\"Establece orden por $clave \" href=\"". $this->montaURL() . "\"> " . ucfirst($clave) . $resFlecha . " </a></b></th>\n";
|
$salida.="<th><b><a title=\"Establece orden por $clave \" href=\"". $this->montaURL() . "\"> " . $datos["Titulo"] . $resFlecha . " </a></b></th>\n";
|
||||||
|
//$salida.="<th><b><a title=\"Establece orden por $clave \" href=\"". $this->montaURL() . "\"> " . ucfirst($clave) . $resFlecha . " </a></b></th>\n";
|
||||||
$this->restoreURL();
|
$this->restoreURL();
|
||||||
} else {
|
} else {
|
||||||
$salida.='<th><b>' . ucfirst($clave) . '</b></th>' . "\n";
|
$salida.='<th><b>' . $datos["Titulo"] . '</b></th>' . "\n";
|
||||||
|
//$salida.='<th><b>' . ucfirst($clave) . '</b></th>' . "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -675,6 +679,7 @@ class Mantenimiento {
|
|||||||
$accion = $this->montaURL();
|
$accion = $this->montaURL();
|
||||||
$salida.='<div class="col-sm-8"><form name="mantenimiento.form" enctype="multipart/form-data" class="form-horizontal" role="form" method="post" action="' . $accion . '">' . "\n";
|
$salida.='<div class="col-sm-8"><form name="mantenimiento.form" enctype="multipart/form-data" class="form-horizontal" role="form" method="post" action="' . $accion . '">' . "\n";
|
||||||
$salida.="<fieldset style=\"width: 96%;\"><p><legend style=\"color: red;\"><b>$tipo</b></legend>\n";
|
$salida.="<fieldset style=\"width: 96%;\"><p><legend style=\"color: red;\"><b>$tipo</b></legend>\n";
|
||||||
|
//$salida.= var_export($datos,true);
|
||||||
foreach ($this->campos as $clave => $valor) {
|
foreach ($this->campos as $clave => $valor) {
|
||||||
if ($valor["Editable"] == "no") {
|
if ($valor["Editable"] == "no") {
|
||||||
//Se salta los campos que no deben aparecer
|
//Se salta los campos que no deben aparecer
|
||||||
@@ -684,7 +689,8 @@ class Mantenimiento {
|
|||||||
$salida .='<div class="form-group">';
|
$salida .='<div class="form-group">';
|
||||||
$campo = $valor['Campo'];
|
$campo = $valor['Campo'];
|
||||||
$campos.="$campo&";
|
$campos.="$campo&";
|
||||||
$salida.='<label class="col-sm-2 control-label" for="' . $campo . '">' . ucfirst($clave) . "</label> ";
|
$salida.='<label class="col-sm-2 control-label" for="' . $campo . '">' . $valor['Titulo'] . "</label> ";
|
||||||
|
//$salida.='<label class="col-sm-2 control-label" for="' . $campo . '">' . ucfirst($clave) . "</label> ";
|
||||||
$salida.='<div class="col-sm-5">';
|
$salida.='<div class="col-sm-5">';
|
||||||
//Se asegura que el id no se pueda modificar.
|
//Se asegura que el id no se pueda modificar.
|
||||||
$modoEfectivo = $clave == 'id' ? "readonly" : $modo;
|
$modoEfectivo = $clave == 'id' ? "readonly" : $modo;
|
||||||
|
@@ -33,12 +33,13 @@ define('PROGRAMA', 'Gestión de Inventario.');
|
|||||||
define('CENTRO', 'I.E.S.O. Pascual Serrano');
|
define('CENTRO', 'I.E.S.O. Pascual Serrano');
|
||||||
define('NUMFILAS', '17'); // Número de registros a mostrar en las pantallas de consulta iniciales
|
define('NUMFILAS', '17'); // Número de registros a mostrar en las pantallas de consulta iniciales
|
||||||
define('PAUSA', '2'); //Nº segundos de pausa para mostrar mensaje id insertado
|
define('PAUSA', '2'); //Nº segundos de pausa para mostrar mensaje id insertado
|
||||||
define('ESTILO', 'personal'); //Estilo de los iconos de edición (personal, personal, personal)
|
define('ESTILO', 'bootstrap'); //Estilo de los iconos de edición (bootstrap, bootstrap, bootstrap)
|
||||||
define('PLANTILLA', 'bootstrap'); //Estilo de la plantilla y recursos a utilizar
|
define('PLANTILLA', 'bootstrap'); //Estilo de la plantilla y recursos a utilizar
|
||||||
define('COLORLAT', '#a4bdfc'); //Color de la barra de menú lateral
|
define('COLORLAT', '#a4bdfc'); //Color de la barra de menú lateral
|
||||||
define('COLORFON', '#ffb878'); //Color del fondo de la pantalla
|
define('COLORFON', '#ffb878'); //Color del fondo de la pantalla
|
||||||
define('MYSQLDUMP', '/usr/local/bin/mysqldump'); //camino a mysqldump
|
define('MYSQLDUMP', '/usr/local/bin/mysqldump'); //camino a mysqldump
|
||||||
define('GZIP', '/usr/bin/gzip'); //Camino a gzip
|
define('GZIP', '/usr/bin/gzip'); //Camino a gzip
|
||||||
define('IMAGEDATA', 'img.data'); //Directorio donde se almacenarán las imágenes
|
define('IMAGEDATA', 'img.data'); //Directorio donde se almacenarán las imágenes
|
||||||
define('INSTALADO', 'sí') //Indicador que permite ejecutar instalar.php
|
define('TMP', './tmp'); //Directorio para archivos temporales
|
||||||
|
define('INSTALADO', 'sí'); //Indicador que permite ejecutar instalar.php
|
||||||
?>
|
?>
|
||||||
|
@@ -23,5 +23,5 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
define('AUTOR', 'Ricardo Montañana Gómez');
|
define('AUTOR', 'Ricardo Montañana Gómez');
|
||||||
define('VERSION', '1.11b');
|
define('VERSION', '1.12');
|
||||||
?>
|
?>
|
||||||
|
@@ -2,7 +2,11 @@
|
|||||||
<Informe>
|
<Informe>
|
||||||
<Titulo Texto="Informe de Artículos" />
|
<Titulo Texto="Informe de Artículos" />
|
||||||
<Datos>
|
<Datos>
|
||||||
<Consulta>select * from Articulos where descripcion like '%{filtro}%' order by {orden};</Consulta>
|
<Consulta>
|
||||||
|
select A.id as id,A.descripcion as descripcion, A.marca as marca, A.modelo as modelo, A.cantidad as cantidad,
|
||||||
|
(select count(E.id) from Elementos E where E.id_Articulo=A.id) as Numero from Articulos A
|
||||||
|
where A.descripcion like '%{filtro}%' order by {orden};
|
||||||
|
</Consulta>
|
||||||
</Datos>
|
</Datos>
|
||||||
<Pagina Orientacion="P" Formato="A4">
|
<Pagina Orientacion="P" Formato="A4">
|
||||||
<Cabecera>Relación Artículos</Cabecera>
|
<Cabecera>Relación Artículos</Cabecera>
|
||||||
@@ -10,8 +14,9 @@
|
|||||||
<Col Nombre="id" Ancho="10" Ajuste="D" Titulo="id"/>
|
<Col Nombre="id" Ancho="10" Ajuste="D" Titulo="id"/>
|
||||||
<Col Nombre="descripcion" Ancho="70" Ajuste="I" Titulo="Descripción"/>
|
<Col Nombre="descripcion" Ancho="70" Ajuste="I" Titulo="Descripción"/>
|
||||||
<Col Nombre="marca" Ancho="40" Ajuste="I" Titulo="Marca"/>
|
<Col Nombre="marca" Ancho="40" Ajuste="I" Titulo="Marca"/>
|
||||||
<Col Nombre="modelo" Ancho="50" Ajuste="I" Titulo="Modelo"/>
|
<Col Nombre="modelo" Ancho="40" Ajuste="I" Titulo="Modelo"/>
|
||||||
<Col Nombre="cantidad" Ancho="20" Ajuste="D" Titulo="cantidad"/>
|
<Col Nombre="cantidad" Ancho="20" Ajuste="D" Titulo="Cantidad"/>
|
||||||
|
<Col Nombre="Numero" Ancho="15" Ajuste="D" Titulo="NºElem"/>
|
||||||
</Cuerpo>
|
</Cuerpo>
|
||||||
</Pagina>
|
</Pagina>
|
||||||
</Informe>
|
</Informe>
|
||||||
|
@@ -2,13 +2,16 @@
|
|||||||
<Informe>
|
<Informe>
|
||||||
<Titulo Texto="Informe de Ubicaciones" />
|
<Titulo Texto="Informe de Ubicaciones" />
|
||||||
<Datos>
|
<Datos>
|
||||||
<Consulta>select * from Ubicaciones where descripcion like '%{filtro}%' order by {orden};</Consulta>
|
<Consulta>select U.id as id, U.Descripcion as Descripcion,(select count(E.id) from Elementos E where E.id_Ubicacion=U.id) as Numero
|
||||||
|
from Ubicaciones U where U.descripcion like '%{filtro}%' order by {orden};
|
||||||
|
</Consulta>
|
||||||
</Datos>
|
</Datos>
|
||||||
<Pagina Orientacion="P" Formato="A4">
|
<Pagina Orientacion="P" Formato="A4">
|
||||||
<Cabecera>Relación de Ubicaciones</Cabecera>
|
<Cabecera>Relación de Ubicaciones</Cabecera>
|
||||||
<Cuerpo>
|
<Cuerpo>
|
||||||
<Col Nombre="id" Ancho="10" Ajuste="D" Titulo="id"/>
|
<Col Nombre="id" Ancho="10" Ajuste="D" Titulo="id"/>
|
||||||
<Col Nombre="Descripcion" Ancho="80" Ajuste="I" Titulo="Descripción"/>
|
<Col Nombre="Descripcion" Ancho="80" Ajuste="I" Titulo="Descripción"/>
|
||||||
|
<Col Nombre="Numero" Ancho="15" Ajuste="D" Titulo="Nº Elem"/>
|
||||||
</Cuerpo>
|
</Cuerpo>
|
||||||
</Pagina>
|
</Pagina>
|
||||||
</Informe>
|
</Informe>
|
||||||
|
20
xml/mantenimientoArticulos.xml
Normal file
20
xml/mantenimientoArticulos.xml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<Mantenimiento>
|
||||||
|
<Titulo>Mantenimiento de Artículos</Titulo>
|
||||||
|
<Consulta>
|
||||||
|
select SQL_CALC_FOUND_ROWS A.id as id,A.descripcion as descripcion, A.marca as marca, A.modelo as modelo, A.cantidad as cantidad,
|
||||||
|
(select sum(E.cantidad) from Elementos E where E.id_Articulo=A.id) as cantubi,
|
||||||
|
(select count(E.id) from Elementos E where E.id_Articulo=A.id) as numero,A.imagen as imagen from Articulos A
|
||||||
|
{buscar} {orden} limit {inferior},{superior};
|
||||||
|
</Consulta>
|
||||||
|
<Campos>
|
||||||
|
<Col Campo="id" Nombre="id" Ancho="5" Ajuste="D" Titulo="id" Tipo="smallint(6)" Varios="ordenable,link/Articulo" Visible="si"/>
|
||||||
|
<Col Campo="descripcion" Nombre="descripcion" Ancho="50" Ajuste="L" Titulo="Descripción" Visible="si" Varios="ordenable,ajax/text" Editable="si"/>
|
||||||
|
<Col Campo="marca" Nombre="marca" Ancho="40" Ajuste="L" Titulo="Marca" Varios="ordenable,ajax/text" Editable="si" Visible="si"/>
|
||||||
|
<Col Campo="modelo" Nombre="modelo" Ancho="40" Ajuste="L" Titulo="Modelo" Varios="ordenable,ajax/text" Editable="si" Visible="si"/>
|
||||||
|
<Col Campo="cantidad" Nombre="cantidad" Ancho="15" Ajuste="D" Titulo="Cantidad" Tipo="Int(11)" Visible="si" Editable="si" Varios="ordenable,ajax/number"/>
|
||||||
|
<Col Campo="cantubi" Nombre="cantubi" Ancho="15" Ajuste="D" Titulo="Cant. ubicada" Editable="no" Varios="ordenable" Visible="si"/>
|
||||||
|
<Col Campo="numero" Nombre="numero" Ancho="15" Ajuste="D" Titulo="Nº Elementos" Editable="no" Varios="ordenable" Visible="si"/>
|
||||||
|
<Col Campo="imagen" Nombre="imagen" Ancho="10" Ajuste="C" Titulo="Imagen" Visible="si" Tipo="imagen" Varios="imagen" Editable="si"/>
|
||||||
|
</Campos>
|
||||||
|
</Mantenimiento>
|
14
xml/mantenimientoUbicaciones.xml
Normal file
14
xml/mantenimientoUbicaciones.xml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<Mantenimiento>
|
||||||
|
<Titulo>Mantenimiento de Ubicaciones</Titulo>
|
||||||
|
<Consulta>
|
||||||
|
select SQL_CALC_FOUND_ROWS U.id as id, U.descripcion as Descripcion, U.imagen as imagen, (select count(E.id) from Elementos E where E.id_Ubicacion=U.id) as numero from Ubicaciones U
|
||||||
|
{buscar} {orden} limit {inferior},{superior};
|
||||||
|
</Consulta>
|
||||||
|
<Campos>
|
||||||
|
<Col Campo="id" Nombre="id" Ancho="5" Ajuste="D" Titulo="id" Tipo="smallint(6)" Varios="ordenable,link/Ubicacion" Visible="si"/>
|
||||||
|
<Col Campo="Descripcion" Nombre="Descripcion" Ancho="50" Ajuste="L" Titulo="Descripción" Visible="si" Varios="ordenable,ajax/text" Editable="si"/>
|
||||||
|
<Col Campo="imagen" Nombre="imagen" Ancho="10" Ajuste="C" Titulo="Imagen" Tipo="imagen" Visible="si" Varios="imagen" Editable="si"/>
|
||||||
|
<Col Campo="numero" Nombre="numero" Ancho="10" Ajuste="D" Titulo="Nº Elementos" Varios="ordenable" Editable="no" Visible="si"/>
|
||||||
|
</Campos>
|
||||||
|
</Mantenimiento>
|
Reference in New Issue
Block a user