21 with asymmetric time and local version

This commit is contained in:
msyu
2025-07-11 10:21:05 +03:00
parent e96eedece5
commit 2d270ef24f
9 changed files with 240 additions and 83 deletions
+3 -4
View File
@@ -193,7 +193,7 @@
join agreement a on (siv.agreement_version=a.agreement_version AND a.contract_id=s.contract_id)
where siv.specification_item_uid=i.specification_item_uid AND a.is_actual
order by siv.agreement_version desc limit 1) as cost
,(select siv.price*siv.quantity*a.probability_perc/100 from specification_item_version siv
,(select siv.price*siv.quantity*(case when a.is_actual then 100 else a.probability_perc end)/100 from specification_item_version siv
join agreement a on (siv.agreement_version=a.agreement_version AND a.contract_id=s.contract_id)
where siv.specification_item_uid=i.specification_item_uid AND a.is_actual
order by siv.agreement_version desc limit 1) as cost_p
@@ -233,11 +233,11 @@
</p>
</cfoutput>
(количество, цена, даты актуальности, версия/соглашение, имя для печати - для последней актуальной версии)
<span class="err">Внимание! При расчетах вероятность действительной версии принимается за 100%</span>
<table class="worktable">
<thead>
<tr>
<th></th>
<th></th>
<th>Ключ строки</th>
<th>Код услуги</th>
<th>Услуга</th>
@@ -255,7 +255,6 @@
<th>Тек. версия</th>
<th>Дата с</th>
<th>Дата по</th>
<th></th>
</tr>
</thead>