018 some costs added

This commit is contained in:
msyu
2025-08-29 09:56:27 +03:00
parent 517585258d
commit 791a652a9b
4 changed files with 82 additions and 12 deletions
+15 -4
View File
@@ -231,6 +231,15 @@
,siv.params::text
,a.__id::text as additional_agreement_uid
,a.__name as additional_agreement
,(select
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)
) as line_cost
,(select count(*)
from elma.service_parametrs p
where p.__id = ANY (siv.params)
) as param_cnt
from elma.deals_services siv
left outer join elma.additional_agreements a on (a.__id=ANY(siv.additional_agreement))
where <cfqueryparam cfsqltype="cf_sql_other" value="#d.__id#"/>=ANY(siv.deal)
@@ -260,10 +269,11 @@
<th>name_version</th>
<th>date_accept</th>
<th>__index</th>
<th>date_nop</th>
<th>date_end</th>
<th width="5%">date_nop</th>
<th width="5%">date_end</th>
<th>is_easy</th>
<th>params</th>
<th>Компонентов</th>
<th width="5%">Сумма</th>
<!--- <th>additional_agreement_uid</th> --->
<th>additional_agreement</th>
</tr>
@@ -288,7 +298,8 @@
<td class="c">#dateFormat(date_nop,'YYYY-MM-DD')#</td>
<td class="c">#dateFormat(date_end,'YYYY-MM-DD')#</td>
<td class="c"><cfif is_easy GT 0>Простая<cfelseif is_easy EQ 0>Композитная<cfelse>is_easy=#is_easy#</cfif></td>
<td class="c">#params#</td>
<td class="c">#param_cnt#</td>
<td class="r">#nFmt(line_cost)#</td>
<!--- <td class="c">#additional_agreement_uid#</td> --->
<td class="c"><a href="additional_agreement.cfm?__id=#additional_agreement_uid#&#tr.fwx#">#additional_agreement#</a></td>
</tr>