Compare commits
2 Commits
e74c625d68
...
ee4945578e
| Author | SHA1 | Date | |
|---|---|---|---|
| ee4945578e | |||
| 1b723f0643 |
6
.env
6
.env
@@ -10,18 +10,18 @@
|
|||||||
|
|
||||||
# Base de datos Master (para autenticación y catálogos globales)
|
# Base de datos Master (para autenticación y catálogos globales)
|
||||||
DB_MASTER_HOST=10.10.4.17
|
DB_MASTER_HOST=10.10.4.17
|
||||||
DB_MASTER_DATABASE=avantikads_nmgen
|
DB_MASTER_DATABASE=ventas_nmgen
|
||||||
DB_MASTER_USER=nickpons666
|
DB_MASTER_USER=nickpons666
|
||||||
DB_MASTER_PASSWORD=MiPo6425@@
|
DB_MASTER_PASSWORD=MiPo6425@@
|
||||||
|
|
||||||
# Configuración general de conexión
|
# Configuración general de conexión
|
||||||
DB_HOST=10.10.4.17
|
DB_HOST=10.10.4.17
|
||||||
DB_PORT=3390
|
DB_PORT=3391
|
||||||
DB_CHARSET=utf8mb4
|
DB_CHARSET=utf8mb4
|
||||||
|
|
||||||
# Prefijo para bases de datos de empresas
|
# Prefijo para bases de datos de empresas
|
||||||
# Patón real: avantikads_nm{empresaId} donde empresaId viene del usuario
|
# Patón real: avantikads_nm{empresaId} donde empresaId viene del usuario
|
||||||
DB_EMPRESA_PREFIX=avantikads_nm
|
DB_EMPRESA_PREFIX=ventas_nm
|
||||||
DB_EMPRESA_USER=nickpons666
|
DB_EMPRESA_USER=nickpons666
|
||||||
DB_EMPRESA_PASSWORD=MiPo6425@@
|
DB_EMPRESA_PASSWORD=MiPo6425@@
|
||||||
|
|
||||||
|
|||||||
@@ -15,18 +15,13 @@
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CAMBIO CRÍTICO: Obtener empresaId dinámicamente del usuario
|
||||||
|
// en lugar de hardcodearlo como "15"
|
||||||
$empresa->setEmail($email);
|
$empresa->setEmail($email);
|
||||||
$empresa->setPassword($password);
|
$empresa->setPassword($password);
|
||||||
$empresa->setEmpresaId("15");
|
|
||||||
|
|
||||||
// Check for validation errors set by setEmail, setPassword, setEmpresaId
|
|
||||||
if($empresa->Util()->GetError())
|
|
||||||
{
|
|
||||||
$empresa->Util()->PrintErrors();
|
|
||||||
echo 'fail[#]';
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// El método DoLogin ahora debe obtener el empresaId desde la base de datos
|
||||||
|
// basado en el email y password del usuario
|
||||||
if(!$empresa->DoLogin())
|
if(!$empresa->DoLogin())
|
||||||
{
|
{
|
||||||
// If DoLogin itself sets errors (e.g., incorrect credentials), print them here
|
// If DoLogin itself sets errors (e.g., incorrect credentials), print them here
|
||||||
|
|||||||
@@ -294,3 +294,21 @@ Stack trace:
|
|||||||
[07-Jan-2026 01:06:20 America/Mexico_City] PHP Warning: Undefined array key "sucursal" in /var/www/html/ventas/templates_c/e85f9d694d4f200f132b4040dda6b61222954514.file.usuarios-base.tpl.php on line 28
|
[07-Jan-2026 01:06:20 America/Mexico_City] PHP Warning: Undefined array key "sucursal" in /var/www/html/ventas/templates_c/e85f9d694d4f200f132b4040dda6b61222954514.file.usuarios-base.tpl.php on line 28
|
||||||
[07-Jan-2026 01:06:20 America/Mexico_City] PHP Warning: Undefined array key "sucursal" in /var/www/html/ventas/templates_c/e85f9d694d4f200f132b4040dda6b61222954514.file.usuarios-base.tpl.php on line 28
|
[07-Jan-2026 01:06:20 America/Mexico_City] PHP Warning: Undefined array key "sucursal" in /var/www/html/ventas/templates_c/e85f9d694d4f200f132b4040dda6b61222954514.file.usuarios-base.tpl.php on line 28
|
||||||
[07-Jan-2026 01:06:20 America/Mexico_City] PHP Warning: Undefined array key "sucursal" in /var/www/html/ventas/templates_c/e85f9d694d4f200f132b4040dda6b61222954514.file.usuarios-base.tpl.php on line 28
|
[07-Jan-2026 01:06:20 America/Mexico_City] PHP Warning: Undefined array key "sucursal" in /var/www/html/ventas/templates_c/e85f9d694d4f200f132b4040dda6b61222954514.file.usuarios-base.tpl.php on line 28
|
||||||
|
[07-Jan-2026 01:10:27 America/Mexico_City] PHP Warning: Undefined variable $sqlFilter in /var/www/html/ventas/classes/reportes.class.php on line 193
|
||||||
|
[07-Jan-2026 01:10:38 America/Mexico_City] PHP Warning: Undefined array key "tipoUsr" in /var/www/html/ventas/ajax/logout.php on line 10
|
||||||
|
[07-Jan-2026 01:10:49 America/Mexico_City] PHP Warning: Undefined array key "tipoUsr" in /var/www/html/ventas/ajax/logout.php on line 10
|
||||||
|
[07-Jan-2026 17:55:16 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/classes/db.class.php on line 208
|
||||||
|
[07-Jan-2026 17:55:16 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/classes/empresa.class.php on line 407
|
||||||
|
[07-Jan-2026 17:55:16 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/classes/empresa.class.php on line 409
|
||||||
|
[07-Jan-2026 17:55:27 America/Mexico_City] Base de datos ventas_nm15 no encontrada, usando fallback a master
|
||||||
|
[07-Jan-2026 17:55:27 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/classes/db.class.php on line 208
|
||||||
|
[07-Jan-2026 17:55:27 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/classes/empresa.class.php on line 407
|
||||||
|
[07-Jan-2026 17:55:27 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/classes/empresa.class.php on line 409
|
||||||
|
[07-Jan-2026 17:56:34 America/Mexico_City] Base de datos ventas_nm15 no encontrada, usando fallback a master
|
||||||
|
[07-Jan-2026 17:56:34 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/classes/db.class.php on line 208
|
||||||
|
[07-Jan-2026 17:56:34 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/classes/empresa.class.php on line 407
|
||||||
|
[07-Jan-2026 17:56:34 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/classes/empresa.class.php on line 409
|
||||||
|
[07-Jan-2026 17:57:51 America/Mexico_City] Base de datos ventas_nm15 no encontrada, usando fallback a master
|
||||||
|
[07-Jan-2026 17:57:51 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/classes/db.class.php on line 208
|
||||||
|
[07-Jan-2026 17:57:51 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/classes/empresa.class.php on line 407
|
||||||
|
[07-Jan-2026 17:57:51 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/classes/empresa.class.php on line 409
|
||||||
|
|||||||
@@ -57,6 +57,8 @@ class DatabaseManager {
|
|||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
// Crear una conexión falsa para desarrollo sin BD
|
// Crear una conexión falsa para desarrollo sin BD
|
||||||
// die("CRITICAL DB ERROR: " . $e->getMessage()); // Debug removed
|
// die("CRITICAL DB ERROR: " . $e->getMessage()); // Debug removed
|
||||||
|
$logFile = __DIR__ . '/../logs/php_errors.log';
|
||||||
|
ini_set('error_log', $logFile);
|
||||||
error_log("WARNING: No hay conexión a base de datos. Usando modo desarrollo. " . $e->getMessage());
|
error_log("WARNING: No hay conexión a base de datos. Usando modo desarrollo. " . $e->getMessage());
|
||||||
$this->masterConnection = new MockDatabase();
|
$this->masterConnection = new MockDatabase();
|
||||||
}
|
}
|
||||||
@@ -78,6 +80,8 @@ class DatabaseManager {
|
|||||||
if (!SystemConfig::validateDatabaseExists($config['database'])) {
|
if (!SystemConfig::validateDatabaseExists($config['database'])) {
|
||||||
// Intentar fallback a base de datos master
|
// Intentar fallback a base de datos master
|
||||||
$masterConfig = SystemConfig::getMasterDatabaseConfig();
|
$masterConfig = SystemConfig::getMasterDatabaseConfig();
|
||||||
|
$logFile = __DIR__ . '/../logs/php_errors.log';
|
||||||
|
ini_set('error_log', $logFile);
|
||||||
error_log("Base de datos {$config['database']} no encontrada, usando fallback a master");
|
error_log("Base de datos {$config['database']} no encontrada, usando fallback a master");
|
||||||
$config = array_merge($config, [
|
$config = array_merge($config, [
|
||||||
'database' => $masterConfig['database'],
|
'database' => $masterConfig['database'],
|
||||||
@@ -175,8 +179,6 @@ class DatabaseManager {
|
|||||||
*/
|
*/
|
||||||
class ModernDB {
|
class ModernDB {
|
||||||
private $connection;
|
private $connection;
|
||||||
private $isMaster = false;
|
|
||||||
private $empresaId = null;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
@@ -188,7 +190,6 @@ class ModernDB {
|
|||||||
|
|
||||||
if ($useMaster) {
|
if ($useMaster) {
|
||||||
$this->connection = $dbManager->getMasterConnection();
|
$this->connection = $dbManager->getMasterConnection();
|
||||||
$this->isMaster = true;
|
|
||||||
} else {
|
} else {
|
||||||
if ($empresaId === null) {
|
if ($empresaId === null) {
|
||||||
$empresaId = $dbManager->getEmpresaId();
|
$empresaId = $dbManager->getEmpresaId();
|
||||||
@@ -199,7 +200,6 @@ class ModernDB {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->connection = $dbManager->getEmpresaConnection($empresaId);
|
$this->connection = $dbManager->getEmpresaConnection($empresaId);
|
||||||
$this->empresaId = $empresaId;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -212,6 +212,8 @@ class ModernDB {
|
|||||||
$result = $this->connection->query($sql);
|
$result = $this->connection->query($sql);
|
||||||
|
|
||||||
if ($result === false) {
|
if ($result === false) {
|
||||||
|
$logFile = __DIR__ . '/../logs/php_errors.log';
|
||||||
|
ini_set('error_log', $logFile);
|
||||||
error_log("Error en consulta: " . $this->connection->error);
|
error_log("Error en consulta: " . $this->connection->error);
|
||||||
error_log("SQL: " . $sql);
|
error_log("SQL: " . $sql);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -376,15 +376,17 @@ $this->Util()->ValidateMail($value, "Email");
|
|||||||
{
|
{
|
||||||
$generalDb = new DB(true);
|
$generalDb = new DB(true);
|
||||||
|
|
||||||
$sql = "SELECT usuarioId FROM usuario
|
// CAMBIO CRÍTICO: Obtener empresaId dinámicamente del usuario
|
||||||
|
// Buscar usuario por email y password sin filtrar por empresaId fijo
|
||||||
|
$sql = "SELECT usuarioId, empresaId FROM usuario
|
||||||
WHERE email = '".$this->email."'
|
WHERE email = '".$this->email."'
|
||||||
AND password = '".$this->password."'
|
AND password = '".$this->password."'
|
||||||
AND empresaId = '".$this->empresaId."'
|
|
||||||
AND baja = '0'";
|
AND baja = '0'";
|
||||||
$generalDb->setQuery($sql);
|
$generalDb->setQuery($sql);
|
||||||
$usuarioId = $generalDb->GetSingle();
|
$result = $generalDb->GetSingle();
|
||||||
|
|
||||||
if(!$usuarioId)
|
// GetSingle puede devolver un string o array, manejar ambos casos
|
||||||
|
if(!$result)
|
||||||
{
|
{
|
||||||
unset($_SESSION["loginKey"]);
|
unset($_SESSION["loginKey"]);
|
||||||
unset($_SESSION["empresaId"]);
|
unset($_SESSION["empresaId"]);
|
||||||
@@ -397,6 +399,24 @@ $this->Util()->ValidateMail($value, "Email");
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Si result es array, obtener valores; si es string, es usuarioId viejo
|
||||||
|
if(is_array($result))
|
||||||
|
{
|
||||||
|
$usuarioId = $result['usuarioId'];
|
||||||
|
$empresaIdFromUser = $result['empresaId'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Compatibilidad con sistema antiguo - obtener empresaId separadamente
|
||||||
|
$usuarioId = $result;
|
||||||
|
$sql2 = "SELECT empresaId FROM usuario WHERE usuarioId = '".$usuarioId."'";
|
||||||
|
$generalDb->setQuery($sql2);
|
||||||
|
$empresaIdFromUser = $generalDb->GetSingle();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Establecer el empresaId real del usuario
|
||||||
|
$this->empresaId = $empresaIdFromUser;
|
||||||
|
|
||||||
$sql = "SELECT * FROM usuario
|
$sql = "SELECT * FROM usuario
|
||||||
LEFT JOIN empresa ON usuario.empresaId = empresa.empresaId
|
LEFT JOIN empresa ON usuario.empresaId = empresa.empresaId
|
||||||
WHERE usuarioId = '".$usuarioId."'";
|
WHERE usuarioId = '".$usuarioId."'";
|
||||||
@@ -453,6 +473,7 @@ $this->Util()->ValidateMail($value, "Email");
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function AuthUser()
|
function AuthUser()
|
||||||
{
|
{
|
||||||
if(!$this->IsLoggedIn())
|
if(!$this->IsLoggedIn())
|
||||||
|
|||||||
@@ -35,6 +35,11 @@ function loadEnv($path = '.env') {
|
|||||||
try {
|
try {
|
||||||
loadEnv(__DIR__ . '/../.env');
|
loadEnv(__DIR__ . '/../.env');
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
// Configurar log antes de morir
|
||||||
|
$logFile = __DIR__ . '/../logs/php_errors.log';
|
||||||
|
ini_set('error_log', $logFile);
|
||||||
|
ini_set('log_errors', 1);
|
||||||
|
error_log("Error cargando configuración: " . $e->getMessage());
|
||||||
die("Error cargando configuración: " . $e->getMessage());
|
die("Error cargando configuración: " . $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -88,9 +93,18 @@ class SystemConfig {
|
|||||||
'charset' => $_ENV['DB_CHARSET'] ?? 'utf8mb4'
|
'charset' => $_ENV['DB_CHARSET'] ?? 'utf8mb4'
|
||||||
];
|
];
|
||||||
|
|
||||||
// Patón:avantikads_nm{empresaId} donde empresaId viene del usuario
|
// PATRÓN DINÁMICO:
|
||||||
$prefix = $_ENV['DB_EMPRESA_PREFIX'] ?? 'avantikads_nm';
|
// - empresaId = 1 → usa ventas_nm (sin número)
|
||||||
|
// - empresaId > 1 → usa ventas_nm{empresaId}
|
||||||
|
$prefix = $_ENV['DB_EMPRESA_PREFIX'] ?? 'ventas_nm';
|
||||||
|
|
||||||
|
if ($empresaId == 1) {
|
||||||
|
// Regla especial: empresaId = 1 usa base sin número
|
||||||
|
$database = $prefix;
|
||||||
|
} else {
|
||||||
|
// Regla general: empresaId > 1 usa base con número
|
||||||
$database = $prefix . $empresaId;
|
$database = $prefix . $empresaId;
|
||||||
|
}
|
||||||
|
|
||||||
// Configuración de usuario/password
|
// Configuración de usuario/password
|
||||||
$user = $_ENV['DB_EMPRESA_USER'] ?? $_ENV['DB_USER'] ?? 'root';
|
$user = $_ENV['DB_EMPRESA_USER'] ?? $_ENV['DB_USER'] ?? 'root';
|
||||||
@@ -123,6 +137,8 @@ class SystemConfig {
|
|||||||
$mysqli = new mysqli($config['host'], $config['user'], $config['password'], "", $config['port']);
|
$mysqli = new mysqli($config['host'], $config['user'], $config['password'], "", $config['port']);
|
||||||
|
|
||||||
if ($mysqli->connect_error) {
|
if ($mysqli->connect_error) {
|
||||||
|
$logFile = __DIR__ . '/../logs/php_errors.log';
|
||||||
|
ini_set('error_log', $logFile);
|
||||||
error_log("Error conexión validación: " . $mysqli->connect_error);
|
error_log("Error conexión validación: " . $mysqli->connect_error);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -135,6 +151,8 @@ class SystemConfig {
|
|||||||
return $exists;
|
return $exists;
|
||||||
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
$logFile = __DIR__ . '/../logs/php_errors.log';
|
||||||
|
ini_set('error_log', $logFile);
|
||||||
error_log("Error validando BD $database: " . $e->getMessage());
|
error_log("Error validando BD $database: " . $e->getMessage());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -175,6 +193,8 @@ class SystemConfig {
|
|||||||
return null;
|
return null;
|
||||||
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
$logFile = __DIR__ . '/../logs/php_errors.log';
|
||||||
|
ini_set('error_log', $logFile);
|
||||||
error_log("Error obteniendo empresaId para usuario $userId: " . $e->getMessage());
|
error_log("Error obteniendo empresaId para usuario $userId: " . $e->getMessage());
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
5
init.php
5
init.php
@@ -14,6 +14,11 @@ defineLegacyConstants();
|
|||||||
ini_set("display_errors", "ON");
|
ini_set("display_errors", "ON");
|
||||||
error_reporting(E_ALL & ~E_DEPRECATED & ~E_NOTICE);
|
error_reporting(E_ALL & ~E_DEPRECATED & ~E_NOTICE);
|
||||||
|
|
||||||
|
// Configurar logs para que se guarden en la carpeta logs/
|
||||||
|
$logFile = __DIR__ . '/logs/php_errors.log';
|
||||||
|
ini_set('error_log', $logFile);
|
||||||
|
ini_set('log_errors', 1);
|
||||||
|
|
||||||
date_default_timezone_set('America/Mexico_City');
|
date_default_timezone_set('America/Mexico_City');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
8
logs/php_errors.log
Normal file
8
logs/php_errors.log
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
[07-Jan-2026 18:01:53 America/Mexico_City] Base de datos ventas_nm15 no encontrada, usando fallback a master
|
||||||
|
[07-Jan-2026 18:01:53 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/classes/db.class.php on line 208
|
||||||
|
[07-Jan-2026 18:01:53 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/classes/empresa.class.php on line 407
|
||||||
|
[07-Jan-2026 18:01:53 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/classes/empresa.class.php on line 409
|
||||||
|
[07-Jan-2026 18:01:53 America/Mexico_City] Base de datos ventas_nm15 no encontrada, usando fallback a master
|
||||||
|
[07-Jan-2026 18:01:53 America/Mexico_City] Base de datos ventas_nm15 no encontrada, usando fallback a master
|
||||||
|
[07-Jan-2026 18:02:40 America/Mexico_City] Base de datos ventas_nm15 no encontrada, usando fallback a master
|
||||||
|
[07-Jan-2026 18:34:20 America/Mexico_City] Base de datos ventas_nm15 no encontrada, usando fallback a master
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,24 +0,0 @@
|
|||||||
[Tue Jan 06 20:55:12.642490 2026] [core:alert] [pid 300912] [client 127.0.0.1:45310] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration
|
|
||||||
[Tue Jan 06 20:55:18.499950 2026] [core:alert] [pid 300913] [client 127.0.0.1:45316] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration
|
|
||||||
[Tue Jan 06 20:55:19.826537 2026] [core:alert] [pid 300916] [client 127.0.0.1:45322] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration, referer: http://ventas-test.local:82/
|
|
||||||
[Tue Jan 06 20:58:22.029797 2026] [core:alert] [pid 300913] [client 127.0.0.1:52732] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration
|
|
||||||
[Tue Jan 06 20:58:34.532284 2026] [core:alert] [pid 300914] [client 127.0.0.1:36380] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration
|
|
||||||
[Tue Jan 06 20:58:35.797082 2026] [core:alert] [pid 300915] [client 127.0.0.1:36392] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration, referer: http://ventas-test.local:82/
|
|
||||||
[Tue Jan 06 21:00:53.165245 2026] [core:alert] [pid 300915] [client 127.0.0.1:53066] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration
|
|
||||||
[Tue Jan 06 21:00:54.011411 2026] [core:alert] [pid 300916] [client 127.0.0.1:53074] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration, referer: http://ventas-test.local:82/
|
|
||||||
[Tue Jan 06 21:03:17.455208 2026] [core:alert] [pid 300916] [client 127.0.0.1:37962] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration
|
|
||||||
[Tue Jan 06 21:03:18.651512 2026] [core:alert] [pid 300912] [client 127.0.0.1:37972] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration, referer: http://ventas-test.local:82/
|
|
||||||
[Tue Jan 06 21:05:11.964406 2026] [core:alert] [pid 300912] [client 127.0.0.1:54494] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration
|
|
||||||
[Tue Jan 06 21:05:12.869652 2026] [core:alert] [pid 300913] [client 127.0.0.1:51936] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration, referer: http://ventas-test.local:82/
|
|
||||||
[Tue Jan 06 21:06:00.061994 2026] [core:alert] [pid 300916] [client 127.0.0.1:46682] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration
|
|
||||||
[Tue Jan 06 21:06:00.919190 2026] [core:alert] [pid 300912] [client 127.0.0.1:46696] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration, referer: http://ventas-test.local:82/
|
|
||||||
[Tue Jan 06 21:06:58.388473 2026] [core:alert] [pid 308773] [client 127.0.0.1:57340] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration
|
|
||||||
[Tue Jan 06 21:06:59.524099 2026] [core:alert] [pid 308774] [client 127.0.0.1:57348] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration, referer: http://ventas-test.local:82/
|
|
||||||
[Tue Jan 06 21:09:49.944789 2026] [core:alert] [pid 308776] [client 127.0.0.1:46258] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration
|
|
||||||
[Tue Jan 06 21:09:50.896716 2026] [core:alert] [pid 308777] [client 127.0.0.1:46260] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration, referer: http://ventas-test.local:82/
|
|
||||||
[Tue Jan 06 21:09:52.118620 2026] [core:alert] [pid 308773] [client 127.0.0.1:46274] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration
|
|
||||||
[Tue Jan 06 21:09:52.916213 2026] [core:alert] [pid 308774] [client 127.0.0.1:52678] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration, referer: http://ventas-test.local:82/
|
|
||||||
[Tue Jan 06 21:13:13.243306 2026] [core:alert] [pid 308776] [client 127.0.0.1:37338] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration
|
|
||||||
[Tue Jan 06 21:13:14.306815 2026] [core:alert] [pid 308777] [client 127.0.0.1:37344] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration, referer: http://ventas-test.local:82/
|
|
||||||
[Tue Jan 06 21:13:51.515493 2026] [core:alert] [pid 308775] [client 127.0.0.1:52296] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration
|
|
||||||
[Tue Jan 06 21:13:52.508047 2026] [core:alert] [pid 308776] [client 127.0.0.1:53168] /var/www/html/ventas/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration, referer: http://ventas-test.local:82/
|
|
||||||
119
md/plan-accion-multi-empresa.md
Normal file
119
md/plan-accion-multi-empresa.md
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
# Plan de Acción - Sistema Multi-Empresa Dinámico
|
||||||
|
|
||||||
|
## Objetivo
|
||||||
|
Eliminar código hardcodeado con `empresaId = 15` y implementar sistema dinámico que obtenga el `empresaId` del usuario logueado.
|
||||||
|
|
||||||
|
## Reglas de Base de Datos
|
||||||
|
- `empresaId = 1` → usa base de datos `ventas_nm` (sin número)
|
||||||
|
- `empresaId > 1` → usa base de datos `ventas_nm{empresaId}` (con número)
|
||||||
|
|
||||||
|
## Estructura del Sistema
|
||||||
|
- **Base Master**: `ventas_nmgen` (usuarios, empresas, configuración)
|
||||||
|
- **Base Empresa**: `ventas_nm{empresaId}` (datos operativos)
|
||||||
|
|
||||||
|
## Fases del Proyecto
|
||||||
|
|
||||||
|
### Fase 1: Análisis y Diagnóstico (En Progreso)
|
||||||
|
- [x] Identificar todos los archivos con código hardcodeado
|
||||||
|
- [ ] Mapear flujo actual de autenticación
|
||||||
|
- [ ] Analizar cómo se obtiene el `empresaId` del usuario
|
||||||
|
- [ ] Revisar configuración actual de base de datos
|
||||||
|
|
||||||
|
### Fase 2: Implementación Core (En Progreso)
|
||||||
|
- [x] Modificar `ajax/login.php` para obtener empresaId dinámico
|
||||||
|
- [ ] Actualizar `Empresa.class.php` para manejo dinámico
|
||||||
|
- [ ] Implementar lógica de base de datos dinámica
|
||||||
|
- [ ] Actualizar `SystemConfig` para empresaId dinámico
|
||||||
|
- [ ] Probar login dinámico con diferentes empresas
|
||||||
|
|
||||||
|
### Fase 3: Actualización de Módulos (Pendiente)
|
||||||
|
- [ ] Actualizar módulos de catálogos
|
||||||
|
- [ ] Actualizar módulos de ventas
|
||||||
|
- [ ] Actualizar módulos de inventarios
|
||||||
|
- [ ] Actualizar módulos de reportes
|
||||||
|
|
||||||
|
### Fase 4: Pruebas y Validación (Pendiente)
|
||||||
|
- [ ] Pruebas con `empresaId = 1` (base `ventas_nm`)
|
||||||
|
- [ ] Pruebas con `empresaId > 1` (base `ventas_nm{numero}`)
|
||||||
|
- [ ] Validar flujo completo de autenticación
|
||||||
|
- [ ] Verificar funcionamiento de todos los módulos
|
||||||
|
|
||||||
|
### Fase 5: Documentación y Limpieza (Pendiente)
|
||||||
|
- [ ] Documentar nueva arquitectura
|
||||||
|
- [ ] Limpiar código obsoleto
|
||||||
|
- [ ] Actualizar comentarios
|
||||||
|
- [ ] Crear guía de implementación
|
||||||
|
|
||||||
|
## Archivos Críticos a Revisar
|
||||||
|
- `classes/system-config.class.php`
|
||||||
|
- `classes/database-manager.class.php`
|
||||||
|
- `init.php`
|
||||||
|
- `config.php`
|
||||||
|
- Módulos principales (`modules/`)
|
||||||
|
|
||||||
|
## Control de Versiones
|
||||||
|
- Cada fase completada = 1 commit
|
||||||
|
- No hacer push hasta autorización explícita
|
||||||
|
- Esperar pruebas funcionales antes de subir
|
||||||
|
|
||||||
|
## Notas Importantes
|
||||||
|
- Mantener compatibilidad con código existente
|
||||||
|
- Preservar seguridad del sistema
|
||||||
|
- No romper funcionalidades actuales
|
||||||
|
- Testing exhaustivo antes de producción
|
||||||
|
|
||||||
|
## Hallazgos de Fase 1
|
||||||
|
|
||||||
|
### 🚨 Problema Principal Identificado
|
||||||
|
**Archivo crítico**: `ajax/login.php:20`
|
||||||
|
```php
|
||||||
|
$empresa->setEmpresaId("15"); // HARDCODEADO
|
||||||
|
```
|
||||||
|
|
||||||
|
### 📋 Lista Completa de Archivos con empresaId = 15
|
||||||
|
**Login y Autenticación:**
|
||||||
|
- `ajax/login.php:20` - **CRÍTICO** - Seteo hardcodeado en login
|
||||||
|
|
||||||
|
**Crons (13 archivos):**
|
||||||
|
- `crons/reporte-inventario*.php` (5 archivos)
|
||||||
|
- `crons/rep-prods-prov*.php` (6 archivos)
|
||||||
|
- `crons/liberar-productos.php`
|
||||||
|
|
||||||
|
**AJAX:**
|
||||||
|
- `ajax/facturas.php:9`
|
||||||
|
|
||||||
|
### 🔍 Análisis del Flujo de Login
|
||||||
|
1. **Usuario ingresa email/password** → `login.js`
|
||||||
|
2. **AJAX envía a** `ajax/login.php`
|
||||||
|
3. **❌ PROBLEMA**: `$empresa->setEmpresaId("15")` forza empresaId=15
|
||||||
|
4. **Consulta**: `usuario` WHERE `empresaId = 15` (solo busca en empresa 15)
|
||||||
|
5. **Establece sesión**: `$_SESSION["empresaId"] = 15`
|
||||||
|
|
||||||
|
### 🎯 Solución Requerida
|
||||||
|
El login debe:
|
||||||
|
1. Obtener `empresaId` de la tabla `usuario` basado en email/password
|
||||||
|
2. NO forzar empresaId=15
|
||||||
|
3. Usar el `empresaId` real del usuario para conectar a su base de datos
|
||||||
|
|
||||||
|
## Resultados de Pruebas Fase 2
|
||||||
|
|
||||||
|
### ⚠️ Problemas Identificados
|
||||||
|
- Login funciona pero obtiene `empresaId = 0` (incorrecto)
|
||||||
|
- Errores de PHP warnings en acceso a arrays nulos
|
||||||
|
- Mensaje de "usuario o contraseña incorrecta" pero login continúa
|
||||||
|
- Base de datos resultante: `ventas_nm0` (incorrecto)
|
||||||
|
|
||||||
|
### 🔍 Análisis de Problemas
|
||||||
|
1. **GetSingle()**: Devuelve valor escalar no array como se esperaba
|
||||||
|
2. **Compatibilidad**: Sistema viejo vs nuevo en consulta SQL
|
||||||
|
3. **Warnings**: Acceso a arrays nulos en db.class.php
|
||||||
|
|
||||||
|
### 🛠️ Soluciones Requeridas
|
||||||
|
- Revisar método `GetSingle()` en DB class
|
||||||
|
- Ajustar compatibilidad en consulta SQL
|
||||||
|
- Corregir manejo de nulos
|
||||||
|
|
||||||
|
---
|
||||||
|
**Estado**: Fase 2 en progreso - Problemas de compatibilidad detectados
|
||||||
|
**Creado**: 07-01-2026
|
||||||
|
**Última actualización**: 07-01-2026
|
||||||
180
php_errors.log
180
php_errors.log
@@ -2936,3 +2936,183 @@ Stack trace:
|
|||||||
[07-Jan-2026 01:06:14 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
[07-Jan-2026 01:06:14 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
[07-Jan-2026 01:06:14 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
[07-Jan-2026 01:06:14 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
[07-Jan-2026 01:06:14 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
[07-Jan-2026 01:06:14 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:03 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:03 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:03 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:03 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:03 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:03 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:03 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:03 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:03 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:03 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:03 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:03 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:03 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:03 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:03 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:03 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:03 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:03 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:03 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:03 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:03 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:03 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:03 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:03 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:03 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:03 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:03 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:03 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:10 America/Mexico_City] PHP Fatal error: Uncaught Error: Call to undefined method Util::FormatDateDMMMY() in /var/www/html/ventas/modules/pedidos.php:55
|
||||||
|
Stack trace:
|
||||||
|
#0 /var/www/html/ventas/index.php(149): include_once()
|
||||||
|
#1 {main}
|
||||||
|
thrown in /var/www/html/ventas/modules/pedidos.php on line 55
|
||||||
|
[07-Jan-2026 01:10:11 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:11 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:11 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:11 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:11 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:11 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:11 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:11 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:11 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:11 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:11 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:11 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:11 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:11 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:11 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:11 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:11 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:11 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:11 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:11 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:11 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:11 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:11 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:11 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:11 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:11 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:11 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:11 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:12 America/Mexico_City] PHP Fatal error: Uncaught Error: Call to a member function HandleMultipages() on null in /var/www/html/ventas/classes/inventario.class.php:1014
|
||||||
|
Stack trace:
|
||||||
|
#0 /var/www/html/ventas/modules/inventario-wizard-list.php(7): Inventario->EnumWizard()
|
||||||
|
#1 /var/www/html/ventas/index.php(149): include_once('...')
|
||||||
|
#2 {main}
|
||||||
|
thrown in /var/www/html/ventas/classes/inventario.class.php on line 1014
|
||||||
|
[07-Jan-2026 01:10:14 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:14 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:14 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:14 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:14 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:14 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:14 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:14 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:14 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:14 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:14 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:14 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:14 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:14 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:14 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:14 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:14 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:14 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:14 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:14 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:14 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:14 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:14 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:14 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:14 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:14 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:14 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:14 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:15 America/Mexico_City] PHP Warning: Undefined array key "msgI" in /var/www/html/ventas/modules/ventas.php on line 12
|
||||||
|
[07-Jan-2026 01:10:15 America/Mexico_City] PHP Warning: Undefined array key "p" in /var/www/html/ventas/modules/ventas.php on line 17
|
||||||
|
[07-Jan-2026 01:10:15 America/Mexico_City] PHP Fatal error: Uncaught Error: Call to a member function HandleMultipages() on null in /var/www/html/ventas/classes/venta.class.php:174
|
||||||
|
Stack trace:
|
||||||
|
#0 /var/www/html/ventas/modules/ventas.php(19): Venta->Enumerate()
|
||||||
|
#1 /var/www/html/ventas/index.php(149): include_once('...')
|
||||||
|
#2 {main}
|
||||||
|
thrown in /var/www/html/ventas/classes/venta.class.php on line 174
|
||||||
|
[07-Jan-2026 01:10:17 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:17 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:17 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:17 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:17 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:17 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:17 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:17 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:17 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:17 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:17 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:17 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:17 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:17 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:17 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:17 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:17 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:17 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:17 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:17 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:17 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:17 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:17 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:17 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:17 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:17 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:17 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:17 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:19 America/Mexico_City] PHP Warning: Undefined array key "p" in /var/www/html/ventas/modules/envios.php on line 10
|
||||||
|
[07-Jan-2026 01:10:20 America/Mexico_City] PHP Fatal error: Uncaught Error: Call to a member function HandleMultipages() on null in /var/www/html/ventas/classes/envio.class.php:299
|
||||||
|
Stack trace:
|
||||||
|
#0 /var/www/html/ventas/modules/envios.php(20): Envio->Enumerate()
|
||||||
|
#1 /var/www/html/ventas/index.php(149): include_once('...')
|
||||||
|
#2 {main}
|
||||||
|
thrown in /var/www/html/ventas/classes/envio.class.php on line 299
|
||||||
|
[07-Jan-2026 01:10:22 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:22 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:22 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:22 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:22 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:22 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:22 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:22 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:22 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:22 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:22 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:22 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:22 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:22 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:22 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:22 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:22 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:22 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:22 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:22 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:22 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:22 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:22 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:22 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:22 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:22 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:22 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:22 America/Mexico_City] PHP Warning: Trying to access array offset on null in /var/www/html/ventas/templates_c/6ee39a69f93600ffc67951af38acf5d081a06bfd.file.search-usuarios.tpl.php on line 70
|
||||||
|
[07-Jan-2026 01:10:23 America/Mexico_City] PHP Warning: Undefined array key "showAll" in /var/www/html/ventas/modules/reportes-ventas.php on line 10
|
||||||
|
[07-Jan-2026 01:10:38 America/Mexico_City] PHP Warning: Undefined array key "loginKey" in /var/www/html/ventas/classes/empresa.class.php on line 422
|
||||||
|
[07-Jan-2026 01:10:49 America/Mexico_City] PHP Warning: Undefined array key "loginKey" in /var/www/html/ventas/classes/empresa.class.php on line 422
|
||||||
|
[07-Jan-2026 01:10:55 America/Mexico_City] PHP Warning: Undefined array key "loginKey" in /var/www/html/ventas/classes/empresa.class.php on line 422
|
||||||
|
[07-Jan-2026 17:55:16 America/Mexico_City] Base de datos ventas_nm15 no encontrada, usando fallback a master
|
||||||
|
[07-Jan-2026 17:55:16 America/Mexico_City] Base de datos ventas_nm15 no encontrada, usando fallback a master
|
||||||
|
[07-Jan-2026 17:55:28 America/Mexico_City] Base de datos ventas_nm15 no encontrada, usando fallback a master
|
||||||
|
[07-Jan-2026 17:55:28 America/Mexico_City] Base de datos ventas_nm15 no encontrada, usando fallback a master
|
||||||
|
[07-Jan-2026 17:56:34 America/Mexico_City] Base de datos ventas_nm15 no encontrada, usando fallback a master
|
||||||
|
[07-Jan-2026 17:56:34 America/Mexico_City] Base de datos ventas_nm15 no encontrada, usando fallback a master
|
||||||
|
[07-Jan-2026 17:56:44 America/Mexico_City] Base de datos ventas_nm15 no encontrada, usando fallback a master
|
||||||
|
[07-Jan-2026 17:56:44 America/Mexico_City] Base de datos ventas_nm15 no encontrada, usando fallback a master
|
||||||
|
[07-Jan-2026 17:57:51 America/Mexico_City] Base de datos ventas_nm15 no encontrada, usando fallback a master
|
||||||
|
[07-Jan-2026 17:57:51 America/Mexico_City] Base de datos ventas_nm15 no encontrada, usando fallback a master
|
||||||
|
|||||||
@@ -0,0 +1,97 @@
|
|||||||
|
<?php /* Smarty version Smarty3-b7, created on 2026-01-07 01:10:27
|
||||||
|
compiled from "/var/www/html/ventas/templates/forms/filtro-gral.tpl" */ ?>
|
||||||
|
<?php /*%%SmartyHeaderCode:1467259720695e06e31dbca4-65586659%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
|
||||||
|
$_smarty_tpl->decodeProperties(array (
|
||||||
|
'file_dependency' =>
|
||||||
|
array (
|
||||||
|
'b15d3336a8ab4c05bbc96723cd4058fac285d14d' =>
|
||||||
|
array (
|
||||||
|
0 => '/var/www/html/ventas/templates/forms/filtro-gral.tpl',
|
||||||
|
1 => 1767753171,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
'nocache_hash' => '1467259720695e06e31dbca4-65586659',
|
||||||
|
'function' =>
|
||||||
|
array (
|
||||||
|
),
|
||||||
|
'has_nocache_code' => false,
|
||||||
|
)); /*/%%SmartyHeaderCode%%*/?>
|
||||||
|
<form name="formV" id="formV" method="post" action="export/ventas-general.php">
|
||||||
|
<input type="hidden" name="type" id="type" value="tipoGral" />
|
||||||
|
|
||||||
|
<table width="100%" cellpadding="0" cellspacing="0" id="box-table-a" style="border-top:1px solid #999999">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th width="500" align="center" colspan="2"><div align="center">Periodo</div></th>
|
||||||
|
<th width="400" align="center"><div align="center">Sucursal</div></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div style="float:left">
|
||||||
|
Inicial:<input type="text" style="text-align:center" name="fechaI" id="fechaI" class="smallInput" style="width:140px" maxlength="10" readonly="readonly" value="<?php echo $_smarty_tpl->getVariable('dateNow')->value;?>
|
||||||
|
" align="middle"/>
|
||||||
|
</div>
|
||||||
|
<div style="float:left; padding-left:15px; padding-top:5px">
|
||||||
|
<a href="javascript:void(0)" onclick="NewCal('fechaI','ddmmyyyy')">
|
||||||
|
<img src="<?php echo $_smarty_tpl->getVariable('WEB_ROOT')->value;?>
|
||||||
|
/images/icons/calendar.gif" /></a>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div style="float:left">
|
||||||
|
Final: <input type="text" style="text-align:center" name="fechaF" id="fechaF" class="smallInput" style="width:140px" maxlength="10" readonly="readonly" value="<?php echo $_smarty_tpl->getVariable('dateNow')->value;?>
|
||||||
|
" align="middle"/>
|
||||||
|
</div>
|
||||||
|
<div style="float:left; padding-left:15px; padding-top:5px">
|
||||||
|
<a href="javascript:void(0)" onclick="NewCal('fechaF','ddmmyyyy')">
|
||||||
|
<img src="<?php echo $_smarty_tpl->getVariable('WEB_ROOT')->value;?>
|
||||||
|
/images/icons/calendar.gif" /></a>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<?php if ($_smarty_tpl->getVariable('tipo')->value=="admin"){?>
|
||||||
|
<td align="center">
|
||||||
|
<select name="idSucursal" id="idSucursal" class="largeInput">
|
||||||
|
<option selected="selected" value=""> Todas</option>
|
||||||
|
<?php $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable;
|
||||||
|
$_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
|
||||||
|
$_from = $_smarty_tpl->getVariable('resSuc')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||||||
|
if (count($_from) > 0){
|
||||||
|
foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value){
|
||||||
|
$_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['item']->key;
|
||||||
|
?>
|
||||||
|
<option value="<?php echo $_smarty_tpl->getVariable('item')->value['sucursalId'];?>
|
||||||
|
"> <?php echo $_smarty_tpl->getVariable('item')->value['nombre'];?>
|
||||||
|
</option>
|
||||||
|
<?php }} ?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
<?php }elseif($_smarty_tpl->getVariable('tipo')->value=="gerente"||$_smarty_tpl->getVariable('tipo')->value=="vendedor"){?>
|
||||||
|
<td align="center">
|
||||||
|
<?php $_smarty_tpl->tpl_vars['item'] = new Smarty_Variable;
|
||||||
|
$_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
|
||||||
|
$_from = $_smarty_tpl->getVariable('resSuc')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||||||
|
if (count($_from) > 0){
|
||||||
|
foreach ($_from as $_smarty_tpl->tpl_vars['item']->key => $_smarty_tpl->tpl_vars['item']->value){
|
||||||
|
$_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['item']->key;
|
||||||
|
?>
|
||||||
|
<input type="text" disabled="disabled" style="text-align:center" name="nomSucursal" id="nomSucursal" class="smallInput" value="<?php echo $_smarty_tpl->getVariable('item')->value['nombre'];?>
|
||||||
|
"/>
|
||||||
|
<input type="hidden" name="idSucursal" id="idSucursal" value="<?php echo $_smarty_tpl->getVariable('item')->value['sucursalId'];?>
|
||||||
|
" />
|
||||||
|
<?php }} ?>
|
||||||
|
</td>
|
||||||
|
<?php }?>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center" colspan="7">
|
||||||
|
<input type="button" name="btnReporte" id="btnReporte" value="Generar" class="btnSearch" onclick="ReporteGral();"/>
|
||||||
|
<div style="float:right; padding-right:50px"><a href="#" onclick="ExportGral(); return false;"><img src="<?php echo $_smarty_tpl->getVariable('WEB_ROOT')->value;?>
|
||||||
|
/images/icons/excel.png" title="Exportar Reporte"/></a></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
<?php /* Smarty version Smarty3-b7, created on 2026-01-07 01:10:23
|
||||||
|
compiled from "/var/www/html/ventas/templates/reportes-ventas.tpl" */ ?>
|
||||||
|
<?php /*%%SmartyHeaderCode:441191332695e06df5d21a4-76042716%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
|
||||||
|
$_smarty_tpl->decodeProperties(array (
|
||||||
|
'file_dependency' =>
|
||||||
|
array (
|
||||||
|
'ccf0b494e74a50bccde0de0cd4dd231d1bef1d24' =>
|
||||||
|
array (
|
||||||
|
0 => '/var/www/html/ventas/templates/reportes-ventas.tpl',
|
||||||
|
1 => 1767753171,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
'nocache_hash' => '441191332695e06df5d21a4-76042716',
|
||||||
|
'function' =>
|
||||||
|
array (
|
||||||
|
),
|
||||||
|
'has_nocache_code' => false,
|
||||||
|
)); /*/%%SmartyHeaderCode%%*/?>
|
||||||
|
<div class="grid_16" id="content">
|
||||||
|
|
||||||
|
<div class="grid_9">
|
||||||
|
<h1 class="reportes">Reportes de Ventas</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="clear"></div>
|
||||||
|
|
||||||
|
<?php $_template = new Smarty_Internal_Template("forms/filtro-reporte-ventas.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
|
||||||
|
echo $_template->getRenderedTemplate();?><?php $_template->updateParentVariables(0);?><?php unset($_template);?>
|
||||||
|
|
||||||
|
<div class="clear"></div>
|
||||||
|
<div id="tipoRv"></div>
|
||||||
|
<div class="grid_15" id="contenido">
|
||||||
|
</div>
|
||||||
|
<div align="center">
|
||||||
|
<div id="loadBusqueda" style="display:none">
|
||||||
|
<br />
|
||||||
|
<img src="<?php echo $_smarty_tpl->getVariable('WEB_ROOT')->value;?>
|
||||||
|
/images/loading.gif" width="16" height="16" />
|
||||||
|
<br />Cargando...
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="clear"></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
<?php /* Smarty version Smarty3-b7, created on 2026-01-07 01:10:23
|
||||||
|
compiled from "/var/www/html/ventas/templates/forms/filtro-reporte-ventas.tpl" */ ?>
|
||||||
|
<?php /*%%SmartyHeaderCode:500331629695e06df5dbc40-16413947%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
|
||||||
|
$_smarty_tpl->decodeProperties(array (
|
||||||
|
'file_dependency' =>
|
||||||
|
array (
|
||||||
|
'dbdfd297efb2893b027490b37993c07fa578153e' =>
|
||||||
|
array (
|
||||||
|
0 => '/var/www/html/ventas/templates/forms/filtro-reporte-ventas.tpl',
|
||||||
|
1 => 1767753171,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
'nocache_hash' => '500331629695e06df5dbc40-16413947',
|
||||||
|
'function' =>
|
||||||
|
array (
|
||||||
|
),
|
||||||
|
'has_nocache_code' => false,
|
||||||
|
)); /*/%%SmartyHeaderCode%%*/?>
|
||||||
|
<table width="100%" cellpadding="0" cellspacing="0" id="box-table-a" style="border-top:1px solid #999999">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th align="center"><div align="center">Selecciona el Tipo de Reporte</div></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td style="text-align:center">
|
||||||
|
<div style=" text-align:center">
|
||||||
|
<form action="" id="formRventas" name="formRventas" method="post">
|
||||||
|
<input type="hidden" name="type" id="type" value="tipoReporte" />
|
||||||
|
<select class="largeInput" name="selectRventas" id="selectRventas" onchange="TipoReporte();">
|
||||||
|
<option disabled="disabled" selected="selected">Selecciona el tipo de reporte</option>
|
||||||
|
<option value="gral">General</option>
|
||||||
|
<option value="fpago">Formas de Pago</option>
|
||||||
|
|
||||||
|
<?php if ($_smarty_tpl->getVariable('Usr')->value['type']=="admin"||$_smarty_tpl->getVariable('Usr')->value['type']=="centralizador"||$_smarty_tpl->getVariable('Usr')->value['type']=="almacen"){?>
|
||||||
|
<option value="prodProv">Productos por Proveedor</option>
|
||||||
|
<option value="prodProv2">Prods. Más y Menos Vendidos por Prov.</option>
|
||||||
|
<?php }?>
|
||||||
|
|
||||||
|
<option value="gralDias">General por Días</option>
|
||||||
|
<option value="vend">Por vendedor</option>
|
||||||
|
<option value="temp">Por temporada</option>
|
||||||
|
|
||||||
|
<option value="proMasVend">Productos</option>
|
||||||
|
<?php if ($_smarty_tpl->getVariable('Usr')->value['type']=="admin"){?>
|
||||||
|
<option value="buenFinProv">Buen Fin por Proveedor</option>
|
||||||
|
<option value="prodsTransito">Productos en Tránsito</option>
|
||||||
|
<?php }?>
|
||||||
|
</select>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
60
test_login_dinamico.php
Normal file
60
test_login_dinamico.php
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Test de login dinámico para verificar funcionamiento
|
||||||
|
* Este script permite probar el login con diferentes empresas
|
||||||
|
*/
|
||||||
|
|
||||||
|
require_once 'init.php';
|
||||||
|
require_once 'libraries.php';
|
||||||
|
|
||||||
|
// Datos de prueba - ajustar según necesidad
|
||||||
|
$testUsers = [
|
||||||
|
['email' => 'test@empresa1.com', 'password' => '1234', 'expectedEmpresaId' => 1],
|
||||||
|
['email' => 'test@empresa2.com', 'password' => '1234', 'expectedEmpresaId' => 2],
|
||||||
|
// Agregar más casos de prueba según sea necesario
|
||||||
|
];
|
||||||
|
|
||||||
|
echo "=== TEST DE LOGIN DINÁMICO ===\n\n";
|
||||||
|
|
||||||
|
foreach ($testUsers as $test) {
|
||||||
|
echo "Test con email: {$test['email']}\n";
|
||||||
|
|
||||||
|
// Crear instancia de empresa
|
||||||
|
$empresa = new Empresa();
|
||||||
|
$empresa->setEmail($test['email']);
|
||||||
|
$empresa->setPassword($test['password']);
|
||||||
|
|
||||||
|
// Intentar login
|
||||||
|
if ($empresa->DoLogin()) {
|
||||||
|
$actualEmpresaId = $_SESSION['empresaId'];
|
||||||
|
$loginKey = $_SESSION['loginKey'];
|
||||||
|
|
||||||
|
echo "✅ Login exitoso\n";
|
||||||
|
echo " empresaId obtenido: $actualEmpresaId\n";
|
||||||
|
echo " empresaId esperado: {$test['expectedEmpresaId']}\n";
|
||||||
|
echo " loginKey: $loginKey\n";
|
||||||
|
|
||||||
|
// Verificar base de datos correspondiente
|
||||||
|
$config = SystemConfig::getEmpresaDatabaseConfig($actualEmpresaId);
|
||||||
|
echo " Base de datos: {$config['database']}\n";
|
||||||
|
|
||||||
|
if ($actualEmpresaId == $test['expectedEmpresaId']) {
|
||||||
|
echo "✅ CORRECTO: empresaId coincide\n";
|
||||||
|
} else {
|
||||||
|
echo "❌ ERROR: empresaId no coincide\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Limpiar sesión para siguiente test
|
||||||
|
unset($_SESSION['loginKey']);
|
||||||
|
unset($_SESSION['empresaId']);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
echo "❌ Login fallido\n";
|
||||||
|
echo " Revisar credenciales o disponibilidad del usuario\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
echo str_repeat("-", 50) . "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "=== FIN DEL TEST ===\n";
|
||||||
|
?>
|
||||||
Reference in New Issue
Block a user