From ec2d8a1ee421738ae3f6b1788d0d1ef6c76dd239 Mon Sep 17 00:00:00 2001 From: mac Date: Tue, 30 Jun 2026 18:54:25 +0300 Subject: [PATCH] Fix calendar_view --- engine/classes/Requisitions.php | 5 +++++ 1 file changed, 5 insertions(+) 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"); + } } // Удаление фильтра автопоиска