041 inmem decimal fix, -m workaround

This commit is contained in:
2026-10-02 00:29:21 +03:00
parent 00977e66cd
commit f94e399cf8
5 changed files with 9 additions and 29 deletions
+4 -4
View File
@@ -87,7 +87,7 @@
<!--- Важно: если в периоде было 2+ цены, то строки должны быть замножены, а цена за период перестает иметь смысл (не показывать же среднее арифметическое, это неправильно) --->
<!--- Left Outer Join with Free Tier --->
<cfquery name="qSpec" dbtype="query">
select s.catalogName as svc, s.component, s.serviceCode as service_code, NULL as sku_code, s.fullCode as code, s.measureShort as unit
select s.catalogName as svc, s.component, s.serviceCode as service_code, s.fullCode as sku_code, s.fullCode as code, s.measureShort as unit
, s.priceWVat as price
,s.componentDiscount as component_discount, s.serviceDiscount as service_discount, s.serviceQuantity as service_quantity, s.componentQuantity as component_quantity
,coalesce(s.serviceQuantity*(100-s.serviceDiscount)/100*s.priceWVat*(100-s.componentDiscount)/100,0) as discounted_price
@@ -98,7 +98,7 @@
UNION
select s.catalogName as svc, s.component, s.serviceCode as service_code, NULL as sku_code, s.fullCode as code, s.measureShort as unit
select s.catalogName as svc, s.component, s.serviceCode as service_code, s.fullCode as sku_code, s.fullCode as code, s.measureShort as unit
, s.priceWVat as price
,s.componentDiscount as component_discount, s.serviceDiscount as service_discount, s.serviceQuantity as service_quantity, s.componentQuantity as component_quantity
,coalesce(s.serviceQuantity*(100-s.serviceDiscount)/100*s.priceWVat*(100-s.componentDiscount)/100,0) as discounted_price
@@ -107,9 +107,9 @@
WHERE s.fullCode NOT IN (<cfqueryparam value="#ValueList(qFreeTier.code)#" cfsqltype="cf_sql_varchar" list="true">)
AND s.serviceType = 3
</cfquery>
<cfloop query="qSpec">
<!--- <cfloop query="qSpec">
<cfset qSpec.sku_code = (len(qSpec.code) GT 2) ? qSpec.code.left(qSpec.code.len() - 2) : qSpec.code/>
</cfloop>
</cfloop> --->
<cfif (ATTRIBUTES.debug)>
qSpec (Left Outer Join with Free Tier)