025 interface imptovements

This commit is contained in:
2025-10-14 15:14:14 +03:00
parent ab658a5a48
commit ce44051801
20 changed files with 2459 additions and 99 deletions
+25 -17
View File
@@ -15,7 +15,7 @@
<cfreturn htmlEditFormat(s)/>
</cffunction>
<m:prepare_detail entity="contragent" accessObject="" key="contragent_id" pageInfoOut="pageInfo"/>
<m:prepare_detail entity="contragent" accessObject="" key="__id" pageInfoOut="pageInfo"/>
<d:bean readonly=true table="elma.companies" datasource="#request.DS#" output="d" status="status">
<d:param field="__id" type="uuid" key/>
@@ -179,10 +179,12 @@
component as (select siv.deal as deal_uids, siv.type, (siv.cnt*(100-COALESCE(siv.discount,0))/100*p.price*p.cnt*(100-COALESCE(p.discount,0))) as param_cost
from elma.deals_services siv
join elma.service_parametrs p on (p.__id = ANY(siv.params))
where p."__deletedAt" IS NULL AND siv."__deletedAt" IS NULL AND siv.is_actual
)
select
a.__id::text
,a.__name as additional_agreement
,a.__index
,a.contract_uid::text
,a.is_actual
,a.last_aa
@@ -197,17 +199,17 @@
,s.probability_pc
,u.__name as owner
,(select sum(param_cost)
from component
where d.__id = ANY(component.deal_uids) AND component.type IN (1)
) as install
from component p
where d.__id = p.deal_uids[1] AND p.type IN (1)
) as install
,(select sum(param_cost)
from component
where d.__id = ANY(component.deal_uids) AND component.type IN (2)
) as periodical
from component p
where d.__id = p.deal_uids[1] AND p.type IN (2)
) as periodical
,(select sum(param_cost)
from component
where d.__id = ANY(component.deal_uids) AND component.type IN (3)
) as metered
from component p
where d.__id = p.deal_uids[1] AND p.type IN (3)
) as metered
from elma.additional_agreements a
join elma.aggrements c on (a.contract_uid=c.__id)
join elma.deals d on (a.deal_uid=d.__id)
@@ -215,6 +217,7 @@
left outer join elma.comp_users_ext u on (d._owner=c.__id)
where c.company_uid=<cfqueryparam cfsqltype="cf_sql_other" value=#d.__id# null=#!isValid("guid",d.__id)#/>
AND s.probability_pc > 0
order by a.__index
</cfquery>
@@ -228,6 +231,7 @@
<thead>
<tr>
<th>__id</th>
<th>__index</th>
<th>Доп. соглашение</th>
<th>Внут. н-р дог.</th>
<th>Дата договора</th>
@@ -243,6 +247,7 @@
<cfoutput query="qAdditionalAgreement">
<tr>
<td><a href="additional_agreement.cfm?__id=#__id#&#tr.fwx#">#__id#</a></td>
<td><a href="additional_agreement.cfm?__id=#__id#&#tr.fwx#">#__index#</a></td>
<td>#additional_agreement#</td>
<td><a href="contract.cfm?__id=#contract_uid#&#tr.fwx#">#agreement_id#</a></td>
<td>#dateFormat(date_of_aggrement,"YYYY-MM-DD")#</td>
@@ -250,9 +255,9 @@
<td>#status#</td>
<td>#probability_pc#</td>
<td>#owner#</td>
<td class="r">#nFmt(install)#</td>
<td class="r">#nFmt(periodical)#</td>
<td class="r">#nFmt(metered)#</td>
<td class="r nw">#nFmt(install)#</td>
<td class="r nw">#nFmt(periodical)#</td>
<td class="r nw">#nFmt(metered)#</td>
</tr>
</cfoutput>
</table>
@@ -270,6 +275,7 @@
component as (select siv.deal as deal_uids, siv.type, (siv.cnt*(100-COALESCE(siv.discount,0))/100*p.price*p.cnt*(100-COALESCE(p.discount,0))) as param_cost
from elma.deals_services siv
join elma.service_parametrs p on (p.__id = ANY(siv.params))
where p."__deletedAt" IS NULL AND siv."__deletedAt" IS NULL AND siv.is_actual
)
select
<d:field_set titleMapOut="titleMap" lengthOut="fieldCount">
@@ -353,9 +359,9 @@
<td>#contract#</td>
<td><a href="contract.cfm?__id=#contract_uid#&#tr.fwx#">#agreement_id#</a></td>
<td>#dateFormat(date_of_aggrement,"YYYY-MM-DD")#</td>
<td class="r">#nFmt(install)#</td>
<td class="r">#nFmt(periodical)#</td>
<td class="r">#nFmt(metered)#</td>
<td class="r nw">#nFmt(install)#</td>
<td class="r nw">#nFmt(periodical)#</td>
<td class="r nw">#nFmt(metered)#</td>
</tr>
</cfoutput>
</table>
@@ -396,10 +402,12 @@
sum(siv.cnt*(100-COALESCE(siv.discount,0))/100*p.price*p.cnt*(100-COALESCE(p.discount,0))/100)
from elma.service_parametrs p
where p.__id = ANY (siv.params)
AND p."__deletedAt" IS NULL
) as line_cost
,(select count(*)
from elma.service_parametrs p
where p.__id = ANY (siv.params)
AND p."__deletedAt" IS NULL
) as param_cnt
,s.probability_pc
,d.__index
@@ -414,7 +422,7 @@
</cfquery>
<cfoutput>
<h4>Услуги (версии строк спецификации, только актуальные) (#qService.recordCount#)</h4>
<h4>Услуги (версии строк спецификации, только актуальные) (#qService.recordCount#) *** здесь не учтено дублирование строк в новых версиях</h4>
</cfoutput>
<!--- <layout:render_query query=#qService#/> --->