067 end customer

This commit is contained in:
2026-08-05 09:50:54 +03:00
parent 7ac2c85238
commit 5cc71b6587
7 changed files with 70 additions and 47 deletions
+8 -1
View File
@@ -52,10 +52,14 @@ WITH
,d.__status_status AS deal_status_id
,siv.user_description
,siv.params
,siv.end_customer as end_customer_uid
,z.id_klienta as end_customer_wz
,z.__name as end_customer_name
FROM elma.deals_services siv
JOIN elma.deals d ON (d.__id = ANY (siv.deal))
JOIN STATUS s ON (d.__status_status = s.status_id)
LEFT JOIN elma.additional_agreements a ON (a.__id = ANY (siv.additional_agreement))
LEFT OUTER JOIN elma.additional_agreements a ON (a.__id = ANY (siv.additional_agreement))
LEFT OUTER JOIN elma.companies z on (siv.end_customer=z.__id)
WHERE siv.is_actual
AND siv."__deletedAt" IS NULL
AND d."__deletedAt" IS NULL
@@ -274,6 +278,7 @@ select
<d:field_set titleMapOut="titleMap" lengthOut="fieldCount">
<d:field title="WZ Elma">r.wz as wz_sold</d:field>
<d:field title="Клиент">r.client as client_sold</d:field>
<d:field title="Конечник">r.end_customer_wz</d:field>
<d:field>r.company_uid</d:field>
<d:field title="WZ Cloud">a.wz as wz_alloc</d:field>
<d:field title="Manager">u.manager</d:field>
@@ -367,6 +372,7 @@ S3 операции и трафик: <b>#dateFormat(qS3OpsTrfAge.dt_load,'YYYY-M
<th width="5%"><layout:column_head name="wz_sold"/></th>
<th width="10%"><layout:column_head name="client_sold"/></th>
<th width="3%"><layout:column_head name="end_customer_wz"/></th>
<th width="5%"><layout:column_head name="wz_alloc"/></th>
<th width="5%"><layout:column_head name="manager"/></th>
<th width="3%"><layout:column_head name="status_ids"/></th>
@@ -408,6 +414,7 @@ S3 операции и трафик: <b>#dateFormat(qS3OpsTrfAge.dt_load,'YYYY-M
<a href="contragent_rpt.cfm?__id=#alloc_company_uid#&#tr.fwx#">#alloc_company#</a>
</cfif>
</td>
<td class="c"><a href="contragent.cfm?__id=#end_customer_uid#&#tr.fwx#" title="#replace(end_customer_name,'"','&quot;','ALL')#">#end_customer_wz#</td>
<td>#wz_alloc#</td>
<td><a href="mailto:#email#"<cfif qRead.status NEQ 2> title="не работает"</cfif>><span<cfif qRead.status NEQ 2> class="err"</cfif>>#manager#</span></a></td>
<td>#status_ids#</td>