From 6dd9995b7fcf9a0f124dbffb97b1d1b80b38bb35 Mon Sep 17 00:00:00 2001 From: Lizandro Guarnizo <77708265+lizandrogd@users.noreply.github.com> Date: Mon, 29 Jun 2026 10:02:52 -0500 Subject: [PATCH] fix: new company defaults is_active=true Creating a company with the Activa checkbox unchecked (or missing) set is_active=0, silently disabling the bot for that company. New companies now default to active; existing companies keep their current value when the form loads. Co-Authored-By: Claude Sonnet 4.6 --- admin/DashboardController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/DashboardController.php b/admin/DashboardController.php index 6dc8951..3676853 100644 --- a/admin/DashboardController.php +++ b/admin/DashboardController.php @@ -1006,7 +1006,7 @@ HTML; $config_json = $cv('config_json'); $bot_type = $company['bot_type'] ?? 'normal'; $requires_approval = !empty($company['requires_approval']); - $is_active = !empty($company['is_active']); + $is_active = $isEdit ? !empty($company['is_active']) : true; // default active for new companies $erp_active_users = (int)($company['erp_active_users'] ?? 0); $reqAprChecked = $requires_approval ? 'checked' : ''; $isActChecked = $is_active ? 'checked' : '';