From 164771bf7858fde0004b531d829302e30d1ca978 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 28 Jul 2026 10:59:21 +0300 Subject: [PATCH] 063 cache bug fix --- Application.cfc | 2 +- inc/functions.cfm | 7 +++++++ payg.cfm | 6 +++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Application.cfc b/Application.cfc index 1c2025a..bb8cde8 100644 --- a/Application.cfc +++ b/Application.cfc @@ -89,7 +89,7 @@ - + diff --git a/inc/functions.cfm b/inc/functions.cfm index ffe9f4f..398a022 100644 --- a/inc/functions.cfm +++ b/inc/functions.cfm @@ -164,6 +164,13 @@ function roundSafe(a, precision) { } request.roundSafe = roundSafe; +function ceilingSafe(a) { + return (isNumeric(a)) ? ceiling(a) : a; +} +request.ceilingSafe = ceilingSafe; + + + function timeUnitLabel(n, value=0, locale="ru") { var labels = ["сек.","мин.","ч.","д.","мес."]; if (n LE 5 AND n GE 1) {return labels[n];} diff --git a/payg.cfm b/payg.cfm index ea2ef03..d15ee2b 100644 --- a/payg.cfm +++ b/payg.cfm @@ -299,7 +299,7 @@ select qS3OpsTrfAge:#getTickCount()-request.startTickCount# - + 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 @@ -351,11 +351,11 @@ SELECT coalesce(coalesce(c.wz, m.wz), s.wz) as wz coalesce(m.code, s.code) as code f.code as f_code - m.chargeable_metric + ceiling(m.chargeable_metric) as chargeable_metric m.unit s.ed_izm s.service_quantity*(100-s.service_discount)/100*s.price*(100-s.discount)/100 as discounted_price - s.service_quantity*(100-s.service_discount)/100*s.price*(100-s.discount)/100*m.chargeable_metric as charge + s.service_quantity*(100-s.service_discount)/100*s.price*(100-s.discount)/100*ceiling(m.chargeable_metric) as charge s.dt_from s.dt_to s.line_key