20 prices from contract

This commit is contained in:
2026-05-13 10:28:36 +03:00
parent caaab5e0f7
commit 90aa268918
3 changed files with 185 additions and 113 deletions
+54 -42
View File
@@ -85,14 +85,15 @@ S3 операции и трафик: <b>#dateFormat(report.qS3OpsTrfAge.dt_load,
<th width="7%">Артикул</th>
<th width="3%">Кол-во (метрика)</td>
<th width="7%">Оплачиваемый объем</th>
<th width="3%">Ед.изм.</th>
<th width="3%">Цена &#8381; с НДС</th>
<th width="3%">Стоимость &#8381; с НДС</th>
<td width="3%">&nbsp;&nbsp;&nbsp;</td>
<th width="3%">&nbsp;&nbsp;&nbsp;</th>
<td width="10%">Услуга</td>
<td width="10%">Компонент</td>
<th width="10%">Услуга</th>
<th width="10%">Компонент</th>
<th width="3%">Ед.изм.</th>
<!--- <td width="10%">Клиентс. назв.</td> --->
<!--- <td width="3%">GPL с НДС</td>
@@ -110,46 +111,57 @@ S3 операции и трафик: <b>#dateFormat(report.qS3OpsTrfAge.dt_load,
<td width="10%">Сделка</td> --->
</thead>
<cfoutput query="report.qCharge" group="svc">
<cfset var acc=0/>
<tr>
<td bgcolor="##ccc"></td>
<td bgcolor="##ccc" colspan="5" class="b"> #svc#</td>
<td></td>
<td bgcolor="##ccc" colspan="99"></td>
</tr>
<cfoutput>
<cfset acc=acc+charge/>
<tr>
<td>#currentRow#</a></td>
<td>#code#</td>
<td class="r">#metric#</td>
<td class="r" style="font-size:120%; padding:0 1em;">#chargeable_metric#</td>
<td class="c" style="font-size:90%;">#unit#</td>
<td class="r">#discounted_price#</td>
<td class="r">#charge#</td>
<td></td>
<td>#svc#</td>
<td>#component#</td>
<!--- <td>#user_description#</td> --->
<!--- <td class="r">#price#</td>
<td class="r">#discount#</td> --->
</tr>
<!--- видимо, Free Tier и единицу измерения нужно брать и для строк, которые не найдены в договоре
(еше можно было бы туда для полноты добавлять GPL цену, но для этого нужен каталог)
Добавить реквизиты договора? --->
<cfoutput query="report.qCharge" group="year">
<cfoutput group="month">
<tr><td colspan="99"><b>#year#-#numberFormat(month,"00")#</b></td></tr>
<cfoutput group="svc">
<cfset var acc = 0/>
<tr>
<td bgcolor="##ccc"></td>
<td bgcolor="##ccc" colspan="9">
<b>#svc#</b>
<cfif len(serviceCustomName)>(#serviceCustomName#)</cfif>
<cfif serviceHash EQ "">(не найдено в договоре)</cfif>
</td>
</tr>
<cfoutput>
<cfset acc += isNumeric(charge) ? charge : 0/>
<tr>
<td>#currentRow#</a></td>
<td>#code# <cfif code EQ "">(#m_code#)</cfif></td>
<td class="r">#metric#</td>
<td class="r" style="font-size:120%; padding:0 1em;">#chargeable_metric#</td>
<td class="r">#discounted_price#</td>
<td class="r">#numberFormat(charge,".00")#</td>
<td><!--- #acc# ---></td>
<td>#svc#</td>
<td>#component#</td>
<td class="c">#unit#</td>
<!--- <td>#user_description#</td> --->
<!--- <td class="r">#price#</td>
<td class="r">#discount#</td> --->
</tr>
</cfoutput>
<tr>
<td bgcolor="##eee" style="border-bottom:2px solid gray;"></td>
<td bgcolor="##eee" colspan="4" class="r" style="border-bottom:2px solid gray;"><b>Итого</b> &nbsp;&nbsp;&nbsp; #svc#:</td>
<td bgcolor="##eee" colspan="1" class="r b" style="border-bottom:2px solid gray;">#NumFmt(acc,2)#</td>
<td colspan="12" style="border-bottom:2px solid gray;"></td>
</tr >
</cfoutput>
</cfoutput>
<tr>
<td bgcolor="##eee" style="border-bottom:2px solid gray;"></td>
<td bgcolor="##eee" colspan="4" class="r" style="border-bottom:2px solid gray;"><b>Итого</b> #svc#:</td>
<td bgcolor="##eee" colspan="1" class="r b" style="border-bottom:2px solid gray;">#NumFmt(acc,2)#</td>
<td colspan="14" style="border-bottom:2px solid gray;"></td>
</tr >
</cfoutput>
</table>