pricing model

This commit is contained in:
msyu
2025-06-14 16:14:03 +03:00
parent 13cc175dc3
commit b4aa34d24a
8 changed files with 178 additions and 10 deletions
+6 -1
View File
@@ -195,6 +195,8 @@
,svc.svc_id
,svc.svc
,svc.code
,i.pricing_model_id
,p.pricing_model_short
,s.specification_id
,s.contract_id
,(select count(*) from specification_item_version siv where siv.specification_item_uid=i.specification_item_uid) as item_version_count
@@ -209,6 +211,7 @@
,ver.dt_from
,ver.dt_to
from specification_item i
join pricing_model p on (i.pricing_model_id=p.pricing_model_id)
join specification s on (i.specification_id=s.specification_id)
join (select
siv.agreement_version
@@ -238,7 +241,7 @@
<!--- </cfif> --->
AND ia.agreement_version <= <cfqueryparam cfsqltype="cf_sql_integer" value="#agreement_version#"/>
)
) ver on (i.specification_item_uid=ver.specification_item_uid AND s.contract_id=ver.contract_id AND ver.specification_id=s.specification_id)
) ver on (i.specification_item_uid=ver.specification_item_uid /*AND s.contract_id=ver.contract_id*/ AND ver.specification_id=s.specification_id)
left outer join svc on (i.svc_id=svc.svc_id)
where i.specification_id=<cfqueryparam cfsqltype="cf_sql_integer" value="#d.specification_id#"/>
@@ -267,6 +270,7 @@
<th></th>
<th>Ключ строки</th>
<th>Услуга</th>
<th>Модель</th>
<th>Код услуги</th>
<th>Версий</th>
<th>&nbsp;</th>
@@ -288,6 +292,7 @@
</td>
<td>#specification_item_uid#</td>
<td>#svc#</td>
<td class="c">#pricing_model_short#</td>
<td>#code#</td>
<td class="c">#item_version_count#</td>
<td class="c"></td>