diff --git a/templates/footer.php b/templates/footer.php index 6ba212b..4e41661 100644 --- a/templates/footer.php +++ b/templates/footer.php @@ -427,6 +427,19 @@ if($_SESSION['id']) + + + @@ -4185,13 +4198,11 @@ $user_id = $_SESSION['id']; }); function renderDealCloseContent() { var d = window.dealCloseData; - console.log('[DEAL_CLOSE] renderDealCloseContent called, dealCloseData:', d); if (!d) { console.log('[DEAL_CLOSE] dealCloseData is null/undefined'); return; } var html = ''; if (d.title) html += '
Название: ' + d.title + '
'; if (d.contract_price) html += '
Сумма в договоре: ' + Number(d.contract_price).toLocaleString('ru-RU') + ' руб.
'; if (d.agent_commission) html += '
Комиссия агента: ' + Number(d.agent_commission).toLocaleString('ru-RU') + ' руб.
'; - console.log('[DEAL_CLOSE] basic html:', html); $('#deal_close_content').html(html); // Собираем ID заявок и объектов @@ -4201,14 +4212,12 @@ $user_id = $_SESSION['id']; var objIds = []; if (d.side_one_object_id) objIds.push(d.side_one_object_id); if (d.side_two_object_id) objIds.push(d.side_two_object_id); - console.log('[DEAL_CLOSE] reqIds:', reqIds, 'objIds:', objIds); var pending = 0; if (reqIds.length > 0) pending++; if (objIds.length > 0) pending++; if (pending === 0) { - console.log('[DEAL_CLOSE] no reqs or objects, rendering fact data'); renderFactData(d); return; } @@ -4217,7 +4226,6 @@ $user_id = $_SESSION['id']; var objData = null; function tryRender() { - console.log('[DEAL_CLOSE] tryRender called, reqData:', reqData, 'objData:', objData); if (reqData !== null && objData !== null) { if (reqData.length > 0) { var reqHtml = '
Связанные заявки:
'; @@ -4226,7 +4234,6 @@ $user_id = $_SESSION['id']; reqHtml += req.deleted == 1 ? ' ✓ закрыта' : ' открыта'; reqHtml += ''; }); - console.log('[DEAL_CLOSE] appending reqHtml:', reqHtml); $('#deal_close_content').append(reqHtml); } else { console.log('[DEAL_CLOSE] no requisitions found'); @@ -4236,7 +4243,6 @@ $user_id = $_SESSION['id']; objData.forEach(function(obj) { objHtml += '
' + obj.nazv + ' ' + obj.adres + '
'; }); - console.log('[DEAL_CLOSE] appending objHtml:', objHtml); $('#deal_close_content').append(objHtml); } else { console.log('[DEAL_CLOSE] no objects found'); @@ -4246,7 +4252,6 @@ $user_id = $_SESSION['id']; } if (reqIds.length > 0) { - console.log('[DEAL_CLOSE] loading requisitions...'); $.ajax({ url: '/ajax/ajax_vue_requisitions.php', type: 'POST', @@ -4254,19 +4259,16 @@ $user_id = $_SESSION['id']; dataType: 'json', data: JSON.stringify({ request: 'get_deals_linked_reqs', req_ids: reqIds }), success: function(reqRes) { - console.log('[DEAL_CLOSE] requisitions response:', reqRes); reqData = reqRes.reqs || []; tryRender(); }, error: function(xhr, status, error) { - console.log('[DEAL_CLOSE] requisitions error:', status, error); reqData = []; tryRender(); } }); } if (objIds.length > 0) { - console.log('[DEAL_CLOSE] loading objects...'); $.ajax({ url: '/ajax/ajax_vue_requisitions.php', type: 'POST', @@ -4288,7 +4290,6 @@ $user_id = $_SESSION['id']; } function renderFactData(d) { - console.log('[DEAL_CLOSE] renderFactData called'); var html = '
Фактические данные
'; html += '
'; @@ -5686,12 +5687,12 @@ $user_id = $_SESSION['id'];
-
-
- - +
+
+ + +
-