004 number clean fix

This commit is contained in:
msyu
2025-06-19 16:31:34 +03:00
parent 62de4c0de6
commit c61b42ddfe
3 changed files with 23 additions and 4 deletions
+11 -2
View File
@@ -38,6 +38,15 @@
<cfset queryAddRow(qLastVersion,[0,1,0,""])/>
<!--- <cfdump var=#lastVersion#/> --->
</cfif>
<cfquery name="qAgreement">
select a.agreement, a.dt_agreement, a.contract_id
from specification_item si
join specification s on (si.specification_id=s.specification_id)
join agreement a on (s.contract_id=a.contract_id)
where si.specification_item_uid=<cfqueryparam cfsqltype="cf_sql_other" value="#specification_item_uid#" null=#!IsValid('guid',specification_item_uid)#/>
AND a.agreement_version = <cfqueryparam cfsqltype="cf_sql_integer" value="#agreement_version#" null=#!IsValid('integer',agreement_version)#/>
</cfquery>
<!--- <cfdump var=#pageInfo#/>
@@ -51,7 +60,7 @@
<d:param field="specification_item_version" type="varchar" size="1023" init="#qLastVersion.specification_item_version#" preprocessor=#cleanInput#/>
<d:param field="quantity" type="numeric" init=#qLastVersion.quantity#/>
<d:param field="price" type="numeric" init=#qLastVersion.price# preprocessor=#request.stripWhiteSpace#/>
<d:param field="dt_from" type="timestamp" format="yyyy-MM-dd" forNull="" init="#dateFormat(Now(),'YYYY-MM-DD')#"/> <!--- !!! Important yyyy-MM-dd NOT YYYY-MM-DD --->
<d:param field="dt_from" type="timestamp" format="yyyy-MM-dd" forNull="" init="#qAgreement.dt_agreement#"/> <!--- !!! Important yyyy-MM-dd NOT YYYY-MM-DD --->
<d:param field="dt_to" type="timestamp" format="yyyy-MM-dd" forNull="" init=""/> <!--- !!! Important yyyy-MM-dd NOT YYYY-MM-DD --->
<d:param field="creator_id" type="integer" value="#request.usr_id#" skipUpdate/>
@@ -162,7 +171,7 @@
/>
(версия-номер соглашения)
<!--- *** можно придумать коструктор ссылок с декоратором tr.fwx --->
<cfif d.agreement_version GT 0>
<cfif d.agreement_version GE 0>
<a href="agreement.cfm?agreement_version=#d.agreement_version#&contract_id=#qSpecificationItem.contract_id#&#tr.fwx#">
#d.agreement_version#
</a>