v1.0.99: шаг7 — isNumeric валидация price/qty/sum
This commit is contained in:
+6
-6
@@ -75,9 +75,9 @@
|
|||||||
<cfif action EQ "ADD">
|
<cfif action EQ "ADD">
|
||||||
<cfset nr = op.new_row>
|
<cfset nr = op.new_row>
|
||||||
<cfset nm = structKeyExists(nr, 'name') ? nr.name : ''>
|
<cfset nm = structKeyExists(nr, 'name') ? nr.name : ''>
|
||||||
<cfset pr = (structKeyExists(nr, 'price') AND len(nr.price)) ? nr.price : ''>
|
<cfset pr = (structKeyExists(nr, 'price') AND isNumeric(nr.price)) ? nr.price : ''>
|
||||||
<cfset qt = (structKeyExists(nr, 'qty') AND len(nr.qty)) ? nr.qty : ''>
|
<cfset qt = (structKeyExists(nr, 'qty') AND isNumeric(nr.qty)) ? nr.qty : ''>
|
||||||
<cfset sm = (structKeyExists(nr, 'sum') AND len(nr.sum)) ? nr.sum : ''>
|
<cfset sm = (structKeyExists(nr, 'sum') AND isNumeric(nr.sum)) ? nr.sum : ''>
|
||||||
<cfset ds = (structKeyExists(nr, 'date_start') AND len(nr.date_start)) ? nr.date_start : ''>
|
<cfset ds = (structKeyExists(nr, 'date_start') AND len(nr.date_start)) ? nr.date_start : ''>
|
||||||
|
|
||||||
<cfquery name="evt" datasource="baza">
|
<cfquery name="evt" datasource="baza">
|
||||||
@@ -120,9 +120,9 @@
|
|||||||
<cfthrow message="UPDATE target not found: #th#">
|
<cfthrow message="UPDATE target not found: #th#">
|
||||||
</cfif>
|
</cfif>
|
||||||
<cfset nv = structKeyExists(op, 'new_values') ? op.new_values : {}>
|
<cfset nv = structKeyExists(op, 'new_values') ? op.new_values : {}>
|
||||||
<cfset newPrice = structKeyExists(nv, 'price') AND len(nv.price) ? nv.price : old.price>
|
<cfset newPrice = structKeyExists(nv, 'price') AND isNumeric(nv.price) ? nv.price : old.price>
|
||||||
<cfset newQty = structKeyExists(nv, 'qty') AND len(nv.qty) ? nv.qty : old.qty>
|
<cfset newQty = structKeyExists(nv, 'qty') AND isNumeric(nv.qty) ? nv.qty : old.qty>
|
||||||
<cfset newSum = structKeyExists(nv, 'sum') AND len(nv.sum) ? nv.sum : old.sum>
|
<cfset newSum = structKeyExists(nv, 'sum') AND isNumeric(nv.sum) ? nv.sum : old.sum>
|
||||||
<cfset newDate = structKeyExists(nv, 'date_start') AND len(nv.date_start) ? nv.date_start : old.date_start>
|
<cfset newDate = structKeyExists(nv, 'date_start') AND len(nv.date_start) ? nv.date_start : old.date_start>
|
||||||
|
|
||||||
<cfquery name="evt" datasource="baza">
|
<cfquery name="evt" datasource="baza">
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
<body>
|
<body>
|
||||||
<div class="topbar">
|
<div class="topbar">
|
||||||
<img src="/nubes-logo.svg" alt="Nubes">
|
<img src="/nubes-logo.svg" alt="Nubes">
|
||||||
<span class="title">Сверка договоров — LLM AI-driven Event Sourcing <span style="font-weight:400;color:var(--muted);font-size:12px;">v1.0.98 — Lucee</span></span>
|
<span class="title">Сверка договоров — LLM AI-driven Event Sourcing <span style="font-weight:400;color:var(--muted);font-size:12px;">v1.0.99 — Lucee</span></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|||||||
Reference in New Issue
Block a user