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 (isset($table) === true && $rowTable >= 1) {
|
||||
if (isset($table) === true && $rowTable > 1) {
|
||||
html_print_table($table);
|
||||
unset($table);
|
||||
$rowTable = 1;
|
||||
$printedTables++;
|
||||
|
@ -309,17 +310,16 @@ foreach ($rows as $row) {
|
|||
$rowTable++;
|
||||
}
|
||||
|
||||
if ($iterator1 > 5) {
|
||||
// PRINT COUNT TOTAL.
|
||||
$table->colspan[$rowTable][0] = 10;
|
||||
$table->data[$rowTable][0] = '<b>'.__('Total').': </b>'.$iterator1;
|
||||
$rowTable++;
|
||||
}
|
||||
}
|
||||
|
||||
$idModuleInventory = $row['id_module_inventory'];
|
||||
}
|
||||
|
||||
if (isset($table) === true && $rowTable >= 1) {
|
||||
if (isset($table) === true && $rowTable > 1) {
|
||||
html_print_table($table);
|
||||
$printedTables++;
|
||||
}
|
||||
|
|
|
@ -1443,10 +1443,21 @@ $alerttab['active'] = ($tab === 'alert');
|
|||
// Inventory.
|
||||
$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) {
|
||||
$inventorytab = '';
|
||||
if ($tab === 'inventory') {
|
||||
$inventorytab['active'] = true;
|
||||
} else {
|
||||
$inventorytab['active'] = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Collection.
|
||||
|
|
Loading…
Reference in New Issue