Module switches: Dispatch, Bookkeeping, Purchasing, Trips and Calendar can be switched off in Admin > Settings > Modules, Dispatch coming with ticketing and the other three with invoicing, each hidden from menus, dashboard, search, reports and the API and refused on its pages, windows and handlers while off; Purchasing starts off unless already in use, Bookkeeping off posts the default accounts in place of account pickers, database 3.9.4, new moduleOn, moduleOffText and bookkeepingAccount helpers, purchase order settings tile summary, 26.11.9 changelog entries

This commit is contained in:
johnnyq
2026-11-18 14:27:16 -05:00
parent 00724866e3
commit 9bcf0e433b
108 changed files with 772 additions and 167 deletions

View File

@@ -142,6 +142,13 @@ $config_module_enable_itdoc = intval($row['config_module_enable_itdoc']);
$config_module_enable_ticketing = intval($row['config_module_enable_ticketing']);
$config_module_enable_accounting = intval($row['config_module_enable_accounting']);
$config_client_portal_enable = intval($row['config_client_portal_enable']);
// Purchasing, Bookkeeping, Dispatch, Trips and Calendar - read once database 3.9.4 adds them; moduleOn() takes one not there yet as on
if (version_compare((string) ($row['config_current_database_version'] ?? '0'), '3.9.4', '>=')) {
foreach (mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT config_module_enable_purchasing, config_module_enable_bookkeeping, config_module_enable_dispatch,
config_module_enable_trips, config_module_enable_calendar FROM settings WHERE company_id = 1")) ?: [] as $module_column => $module_on) {
$$module_column = intval($module_on);
}
}
$config_client_portal_require_mfa = intval($row['config_client_portal_require_mfa']);
// The client record that represents this MSP's own company, or 0 for none