Fix systematic errors in pagination, sucursal warnings, and fatal count() errors across multiple modules

This commit is contained in:
2026-01-07 01:06:27 -06:00
parent aaa77e870e
commit 3a5afa82fe
354 changed files with 9022 additions and 15093 deletions

30
debug_layout.php Normal file
View File

@@ -0,0 +1,30 @@
<?php
include_once('init.php');
include_once('config.php');
include_once(DOC_ROOT.'/libraries.php');
$empresa = new Empresa;
$empresa->AuthUser();
// $user->setUsuarioId($_SESSION["User"]["usuarioId"]); // Not needed, uses loginKey from session
$usrInfo = $user->Info();
echo "<h1>Debug Layout</h1>";
echo "WEB_ROOT constant: " . WEB_ROOT . "<br>";
echo "ENV WEB_ROOT: " . $_ENV['WEB_ROOT'] . "<br>";
echo "User Type in Session: " . $usrInfo['type'] . "<br>";
echo "<hr>";
echo "<h3>CSS Links generated:</h3>";
echo '<link href="'.WEB_ROOT.'/css/blue.css" rel="stylesheet" type="text/css" />';
echo "<br>(Check source code or network tab for 404s)";
echo "<hr>";
echo "<h3>Checking User Permissions for Menu:</h3>";
$type = $usrInfo['type'];
echo "Type: $type <br>";
if ($type == "admin" || $type == "direccion" || $type == "compras" || $type == "almacen" || $type == "gerente" || $type == "centralizador") {
echo "Show Catalogos: YES<br>";
} else {
echo "Show Catalogos: NO<br>";
}
?>