015 improvements

This commit is contained in:
msyu
2025-08-23 22:05:03 +03:00
parent 9e474a67f5
commit f5371d96c0
3 changed files with 72 additions and 13 deletions
+17 -5
View File
@@ -106,6 +106,11 @@
<cfif len(d.__id)>
<cfquery name="qAdditionalAgreement">
with
s(status, status_id, probability_pc) as (VALUES
('Закрыта неуспешно',7,0),('Закрыта успешно',6,100),('Договор подписан',5,100),('Договор на подписании',15,90),('Договор на согласовании',12,70),
('Тестирование',8,50),('Отправлено ТКП',10,20),('Внутреннее согласование',37,10),('Проработка решения',4,10),('Сбор потребностей',1,0)
)
select
a.__id::text
,a.__name
@@ -117,8 +122,11 @@
,base_by::text
,d.__name as deal
,d.__status_status as status_id
, s.status
, s.probability_pc
from elma.additional_agreements a
left outer join elma.deals d on (a.deal_uid=d.__id)
left outer join s on (d.__status_status=s.status_id)
where a.contract_uid=<cfqueryparam cfsqltype="cf_sql_other" value="#d.__id#"/>
order by 1
</cfquery>
@@ -133,13 +141,15 @@
<tr>
<th>__id</th>
<th>__name</th>
<th>index</th>
<th>версия</th>
<th>contract_uid</th>
<th>is_actual</th>
<th>last_aa</th>
<th>deal_uid</th>
<th>deal</th>
<th>status_id</th>
<th>status</th>
<th>вер-ть</th>
<th>base_by</th>
</tr>
</thead>
@@ -148,13 +158,15 @@
<td><a href="additional_agreement.cfm?__id=#__id#&#tr.fwx#">#__id#</a></td>
<td>#__name#</td>
<td>#index#</td>
<td class="c">#index#</td>
<td>#contract_uid#</td>
<td>#is_actual#</td>
<td>#last_aa#</td>
<td class="c">#is_actual#</td>
<td class="c">#last_aa#</td>
<td><a href="deal.cfm?__id=#deal_uid#&#tr.fwx#">#deal_uid#</a></td>
<td>#deal#</td>
<td>#status_id#</td>
<td class="c">#status_id#</td>
<td>#status#</td>
<td class="r">#probability_pc#</td>
<td>#base_by#</td>
<!--- <td class="c">
#dateFormat(dt_contract,'YYYY-MM-DD')#