diff --git a/engine/classes/Requisitions.php b/engine/classes/Requisitions.php index 3e8c0a0..5ebe09b 100644 --- a/engine/classes/Requisitions.php +++ b/engine/classes/Requisitions.php @@ -4882,6 +4882,11 @@ } $this->db->query("INSERT INTO user_client_events (user_id, req_id, deal_id, type, name, comment, create_date) VALUES ($user_id, $id, $dealId, 'deal', 'Закрытие сделки', '".addslashes($comment)."', NOW())"); } + + if ($dealId) { + $this->db->query("UPDATE user_client_events SET calendar_view = 1 WHERE deal_id = $dealId AND calendar_view = 0"); + $this->db->query("UPDATE user_object_events SET calendar_view = 1 WHERE deal_id = $dealId AND calendar_view = 0"); + } } // Удаление фильтра автопоиска