019 fine debug

This commit is contained in:
msyu
2025-06-30 10:31:42 +03:00
parent 1c96679c29
commit e96eedece5
6 changed files with 117 additions and 12 deletions
+20 -5
View File
@@ -62,7 +62,7 @@
<d:param field="specification_item_uid" type="guid" key/>
<d:param field="agreement_version" type="integer" key/> <!--- init=#qLastVersion.agreement_version# --->
<d:param field="specification_item_version" type="varchar" size="1023" init="#qLastVersion.specification_item_version#" preprocessor=#cleanInput#/>
<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="#qAgreement.dt_agreement#"/> <!--- !!! Important yyyy-MM-dd NOT YYYY-MM-DD --->
@@ -103,10 +103,24 @@
where i.specification_item_uid=<cfqueryparam cfsqltype="cf_sql_other" value="#d.specification_item_uid#" null=#!IsValid('guid',d.specification_item_uid)#/>
</cfquery>
<cfquery name="qAgreement" datasource="#request.DS#">
select
iv.agreement_version, a.probability_perc, a.is_actual
from specification_item_version iv
join specification_item si on (iv.specification_item_uid=si.specification_item_uid)
join specification s on (si.specification_id=s.specification_id)
join agreement a on (iv.agreement_version=a.agreement_version and s.contract_id=a.contract_id)
where iv.specification_item_uid=<cfqueryparam cfsqltype="cf_sql_other" value="#d.specification_item_uid#" null=#!isValid('guid', d.specification_item_uid)#/>
AND iv.agreement_version=<cfqueryparam cfsqltype="cf_sql_integer" value="#d.agreement_version#" null=#!isValid('integer', d.agreement_version)#/>
</cfquery>
<cfquery name="qVersion" datasource="#request.DS#">
select
iv.agreement_version
iv.agreement_version, a.probability_perc, a.is_actual
from specification_item_version iv
join specification_item si on (iv.specification_item_uid=si.specification_item_uid)
join specification s on (si.specification_id=s.specification_id)
join agreement a on (iv.agreement_version=a.agreement_version and s.contract_id=a.contract_id)
where iv.specification_item_uid=<cfqueryparam cfsqltype="cf_sql_other" value="#d.specification_item_uid#" null=#!isValid('guid', d.specification_item_uid)#/>
order by 1
</cfquery>
@@ -186,7 +200,7 @@
<!--- *** можно придумать коструктор ссылок с декоратором tr.fwx --->
<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#
#d.agreement_version# (#qAgreement.probability_perc#% <cfif qAgreement.is_actual GT 0><img src="img/ok.png"title="Действует"/></cfif>)
</a>
</cfif>
<a href="agreement.cfm?contract_id=#qSpecificationItem.contract_id#&#tr.fwx#">
@@ -239,9 +253,10 @@
<layout:detail_line title="Версии">
<cfoutput query=#qVersion#>
<cfif qVersion.agreement_version EQ d.agreement_version>
<b>#agreement_version#</b>
<b>#agreement_version# (#qAgreement.probability_perc#% <cfif qAgreement.is_actual GT 0><img src="img/ok.png"title="Действует"/></cfif>)</b>
<cfelse>
<a href="specification_item_version.cfm?specification_item_uid=#d.specification_item_uid#&agreement_version=#agreement_version#&track=#tr.self#">#agreement_version#</a>
<a href="specification_item_version.cfm?specification_item_uid=#d.specification_item_uid#&agreement_version=#agreement_version#&track=#tr.self#">#agreement_version# (#probability_perc#%
<cfif is_actual GT 0><img src="img/ok.png"title="Действует"/></cfif>)</a>
</cfif>
&nbsp;
</cfoutput>