063 cache bug fix

This commit is contained in:
2026-07-28 10:59:21 +03:00
parent 86500c8630
commit 164771bf78
3 changed files with 11 additions and 4 deletions
+1 -1
View File
@@ -89,7 +89,7 @@
<!--- global settings ---> <!--- global settings --->
<cfset request.RECORDS_PER_PAGE=500/> <cfset request.RECORDS_PER_PAGE=500/>
<cfset request.APP_VERSION="0.00.062"/> <cfset request.APP_VERSION="0.00.063"/>
<cfset request.STAND=getStand()/> <cfset request.STAND=getStand()/>
<cflock scope="application" type="readonly" timeout=3> <cflock scope="application" type="readonly" timeout=3>
+7
View File
@@ -164,6 +164,13 @@ function roundSafe(a, precision) {
} }
request.roundSafe = roundSafe; request.roundSafe = roundSafe;
function ceilingSafe(a) {
return (isNumeric(a)) ? ceiling(a) : a;
}
request.ceilingSafe = ceilingSafe;
function timeUnitLabel(n, value=0, locale="ru") { function timeUnitLabel(n, value=0, locale="ru") {
var labels = ["сек.","мин.","ч.","д.","мес."]; var labels = ["сек.","мин.","ч.","д.","мес."];
if (n LE 5 AND n GE 1) {return labels[n];} if (n LE 5 AND n GE 1) {return labels[n];}
+3 -3
View File
@@ -299,7 +299,7 @@ select
<cfoutput>qS3OpsTrfAge:#getTickCount()-request.startTickCount#</cfoutput><cfif !isDefined("output_xls") AND !isDefined("output_json")><cfflush/></cfif> <cfoutput>qS3OpsTrfAge:#getTickCount()-request.startTickCount#</cfoutput><cfif !isDefined("output_xls") AND !isDefined("output_json")><cfflush/></cfif>
<cfquery name="qUnifiedMetric" dbType="query" cachedWithin=#createTimeSpan(0, 0, 25, 0)#> <cfquery name="qUnifiedMetric" dbType="query">
select wz, code || '.vcpu-m' as code, core_h as raw_metric, core_h as metric, core_h as chargeable_metric, 'core-h' as unit select wz, code || '.vcpu-m' as code, core_h as raw_metric, core_h as metric, core_h as chargeable_metric, 'core-h' as unit
from qComputing from qComputing
@@ -351,11 +351,11 @@ SELECT
<d:field title="WZ">coalesce(coalesce(c.wz, m.wz), s.wz) as wz</d:field> <d:field title="WZ">coalesce(coalesce(c.wz, m.wz), s.wz) as wz</d:field>
<d:field title="Артикул">coalesce(m.code, s.code) as code</d:field> <d:field title="Артикул">coalesce(m.code, s.code) as code</d:field>
<d:field title="Артикул фикс">f.code as f_code</d:field> <d:field title="Артикул фикс">f.code as f_code</d:field>
<d:field title="Кол-во к оплате" cfSqlType="CF_SQL_NUMERIC">m.chargeable_metric</d:field> <d:field title="Кол-во к оплате" cfSqlType="CF_SQL_NUMERIC">ceiling(m.chargeable_metric) as chargeable_metric</d:field>
<d:field title="Ед.изм.">m.unit</d:field> <d:field title="Ед.изм.">m.unit</d:field>
<d:field title="Ед.изм.">s.ed_izm</d:field> <d:field title="Ед.изм.">s.ed_izm</d:field>
<d:field title="Цена &##8381; с НДС" cfSqlType="CF_SQL_NUMERIC">s.service_quantity*(100-s.service_discount)/100*s.price*(100-s.discount)/100 as discounted_price</d:field> <d:field title="Цена &##8381; с НДС" cfSqlType="CF_SQL_NUMERIC">s.service_quantity*(100-s.service_discount)/100*s.price*(100-s.discount)/100 as discounted_price</d:field>
<d:field title="Стоимость &##8381; с НДС" cfSqlType="CF_SQL_NUMERIC">s.service_quantity*(100-s.service_discount)/100*s.price*(100-s.discount)/100*m.chargeable_metric as charge</d:field> <d:field title="Стоимость &##8381; с НДС" cfSqlType="CF_SQL_NUMERIC">s.service_quantity*(100-s.service_discount)/100*s.price*(100-s.discount)/100*ceiling(m.chargeable_metric) as charge</d:field>
<d:field title="Дата НОУ" cfSqlType="CF_SQL_TIMESTAMP">s.dt_from</d:field> <d:field title="Дата НОУ" cfSqlType="CF_SQL_TIMESTAMP">s.dt_from</d:field>
<d:field title="Дата оконч." cfSqlType="CF_SQL_TIMESTAMP">s.dt_to</d:field> <d:field title="Дата оконч." cfSqlType="CF_SQL_TIMESTAMP">s.dt_to</d:field>
<d:field title="Ключ строки">s.line_key</d:field> <d:field title="Ключ строки">s.line_key</d:field>