Conflict solution inventory
This commit is contained in:
parent
17a9d6020f
commit
a0ae7327c7
|
@ -218,7 +218,8 @@ foreach ($rows as $row) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($idModuleInventory != $row['id_module_inventory']) {
|
if ($idModuleInventory != $row['id_module_inventory']) {
|
||||||
if (isset($table) === true && $rowTable >= 1) {
|
if (isset($table) === true && $rowTable > 1) {
|
||||||
|
html_print_table($table);
|
||||||
unset($table);
|
unset($table);
|
||||||
$rowTable = 1;
|
$rowTable = 1;
|
||||||
$printedTables++;
|
$printedTables++;
|
||||||
|
@ -309,17 +310,16 @@ foreach ($rows as $row) {
|
||||||
$rowTable++;
|
$rowTable++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($iterator1 > 5) {
|
|
||||||
// PRINT COUNT TOTAL.
|
// PRINT COUNT TOTAL.
|
||||||
|
$table->colspan[$rowTable][0] = 10;
|
||||||
$table->data[$rowTable][0] = '<b>'.__('Total').': </b>'.$iterator1;
|
$table->data[$rowTable][0] = '<b>'.__('Total').': </b>'.$iterator1;
|
||||||
$rowTable++;
|
$rowTable++;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$idModuleInventory = $row['id_module_inventory'];
|
$idModuleInventory = $row['id_module_inventory'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($table) === true && $rowTable >= 1) {
|
if (isset($table) === true && $rowTable > 1) {
|
||||||
html_print_table($table);
|
html_print_table($table);
|
||||||
$printedTables++;
|
$printedTables++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1443,10 +1443,21 @@ $alerttab['active'] = ($tab === 'alert');
|
||||||
// Inventory.
|
// Inventory.
|
||||||
$inventoryCount = db_get_num_rows('SELECT id_agent_module_inventory FROM tagent_module_inventory WHERE id_agente = '.$agent['id_agente']);
|
$inventoryCount = db_get_num_rows('SELECT id_agent_module_inventory FROM tagent_module_inventory WHERE id_agente = '.$agent['id_agente']);
|
||||||
|
|
||||||
$inventorytab = enterprise_hook('inventory_tab');
|
if ($inventoryCount > 0) {
|
||||||
|
$inventorytab['text'] = html_print_menu_button(
|
||||||
|
[
|
||||||
|
'href' => 'index.php?sec=estado&sec2=operation/agentes/ver_agente&tab=inventory&id_agente='.$id_agente,
|
||||||
|
'image' => 'images/hardware-software-component@svg.svg',
|
||||||
|
'title' => __('Inventory'),
|
||||||
|
],
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
if ($inventorytab === ENTERPRISE_NOT_HOOK || $inventoryCount === 0) {
|
if ($tab === 'inventory') {
|
||||||
$inventorytab = '';
|
$inventorytab['active'] = true;
|
||||||
|
} else {
|
||||||
|
$inventorytab['active'] = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Collection.
|
// Collection.
|
||||||
|
|
Loading…
Reference in New Issue