212 lines
6.1 KiB
Plaintext
212 lines
6.1 KiB
Plaintext
<cfsilent>
|
|
<cfimport prefix="m" taglib="lib"/>
|
|
<cfimport prefix="c" taglib="lib/controls"/>
|
|
<cfimport prefix="d" taglib="lib/data"/>
|
|
<cfimport prefix="layout" taglib="layout"/>
|
|
</cfsilent><m:silent silent="No">
|
|
|
|
<cffunction name="plain2HtmClean">
|
|
<cfargument name="s" type="string"/>
|
|
<cfreturn request.plain2htm(request.cleanHtm(s))/>
|
|
</cffunction>
|
|
|
|
<cffunction name="cleanInput">
|
|
<cfargument name="s" type="string"/>
|
|
<cfreturn htmlEditFormat(s)/>
|
|
</cffunction>
|
|
|
|
<m:prepare_detail entity="deal" accessObject="" key="__id" pageInfoOut="pageInfo"/>
|
|
|
|
<d:bean readonly=true table="elma.deals" datasource="#request.DS#" output="d" status="status">
|
|
<d:param field="__id" type="uuid" key/>
|
|
<d:param field="__name" type="varchar" size="255" preprocessor=#cleanInput# forNull=""/>
|
|
<d:param field="_companies" type="uuid" forNull=""/>
|
|
<!--- <d:param field="_plannedDueDate" type="timestamp" forNull=""/> --->
|
|
<d:param field="__index" type="integer" forNull="" default="0" init="0"/>
|
|
<d:param field="__status_status" type="integer" forNull="" default="0" init="0"/>
|
|
<d:param field="is_corrective_transaction" type="bit" forNull=""/>
|
|
<d:param field="dt_load" type="timestamp"/>
|
|
</d:bean>
|
|
|
|
|
|
<m:dispatch_detail
|
|
usePRG="No"<!---*** --->
|
|
pageInfo=#pageInfo#
|
|
id="#d.__id#"
|
|
status=#pageInfo.status#
|
|
trackOut="tr"
|
|
idAttributesOut="id"
|
|
/>
|
|
|
|
<!--- decoration --->
|
|
<cfquery name="qDecoration" datasource="#request.DS#">
|
|
select
|
|
k.__name as contragent
|
|
,k.id_klienta as wz
|
|
,d."_plannedDueDate" as _plannedDueDate
|
|
from elma.deals d
|
|
left outer join elma.companies k on (d._companies=k.__id)
|
|
where d.__id=<cfqueryparam cfsqltype="cf_sql_other" value=#d.__id#/>
|
|
</cfquery>
|
|
|
|
|
|
</m:silent><!---
|
|
------------------------------------------------------------------------------------------------------------------------
|
|
------------------------------------------------------------------------------------------------------------------------
|
|
------------------------------------------------------------------------------------------------------------------------
|
|
------------------------------------------------------------------------------------------------------------------------
|
|
------------------------------------------------------------------------------------------------------------------------
|
|
---><layout:page section="header" pageInfo=#pageInfo#>
|
|
<layout:attribute name="title">
|
|
<cfoutput>
|
|
Сделка
|
|
<cfif len(d.__id)>
|
|
<b>#d.__name#</b>
|
|
[#d.__id#]
|
|
</cfif>
|
|
</cfoutput>
|
|
</layout:attribute>
|
|
</layout:page>
|
|
|
|
<!--- <cfif status.errorState GT 0>
|
|
<cfoutput><div class="err">#status.errorMessage#</div></cfoutput>
|
|
</cfif>
|
|
--->
|
|
<cfoutput>
|
|
<input type="hidden" name="__id" value="#d.__id#"/>
|
|
<input type="hidden" name="track" value="#tr.self#"/>
|
|
<input type="hidden" name="pass" value=""/><!--- pass marker to prevent save on submit --->
|
|
|
|
<div class="detail">
|
|
|
|
<div class="tr">
|
|
<div class="th">__id</div>
|
|
<div class="td">#d.__id#</div>
|
|
</div>
|
|
|
|
<div class="tr">
|
|
<div class="th">Название</div>
|
|
<div class="td">#d.__name#</div>
|
|
</div>
|
|
|
|
<div class="tr">
|
|
<div class="th">Контрагент</div>
|
|
<div class="td"><!--- <a href="contract.cfm?__id=#d.contract_uid#&#tr.fwx#"><b>#qDecoration.contract#</b> #dateFormat(qDecoration.date_of_aggrement,'DD.MM.YYYY')#
|
|
[#d.contract_uid#]</a> --->
|
|
#qDecoration.contragent# #qDecoration.wz#
|
|
</div>
|
|
</div>
|
|
|
|
<div class="tr">
|
|
<div class="th">_plannedDueDate</div>
|
|
<div class="td">#qDecoration._plannedDueDate#</div>
|
|
</div>
|
|
|
|
<div class="tr">
|
|
<div class="th">Статус</div>
|
|
<div class="td">#d.__status_status#</div>
|
|
</div>
|
|
|
|
<div class="tr">
|
|
<div class="th">is_corrective_transaction</div>
|
|
<div class="td">#d.is_corrective_transaction#</div>
|
|
</div>
|
|
|
|
<div class="tr">
|
|
<div class="th">dt_load</div>
|
|
<div class="td">#d.dt_load#</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
</cfoutput>
|
|
|
|
<layout:page section="extension" closeForm="Yes"/>
|
|
|
|
<cfif len(d.__id)>
|
|
<cfquery name="qService">
|
|
select
|
|
siv.__id
|
|
,siv.__name
|
|
,siv.user_description
|
|
,siv.discount
|
|
,siv.cnt
|
|
,siv.modifier_code
|
|
,siv.abstractive_service_code
|
|
,siv.is_actual
|
|
,siv.type
|
|
,siv.hash
|
|
,siv.version
|
|
,siv.name_version
|
|
,siv.date_accept
|
|
,siv.__index
|
|
,siv.date_nop
|
|
,siv.date_end
|
|
,siv.is_easy
|
|
,siv.params::text
|
|
,siv.additional_agreement::text
|
|
from elma.deals_services siv
|
|
where <cfqueryparam cfsqltype="cf_sql_other" value="#d.__id#"/>=ANY(siv.deal)
|
|
--and siv.is_actual
|
|
order by version::int
|
|
</cfquery>
|
|
|
|
<cfoutput>
|
|
<h4>Услуги (строки спецификации) (#qService.recordCount#)</h4>
|
|
</cfoutput>
|
|
|
|
<!--- <layout:render_query query=#qService#/> --->
|
|
<table class="worktable">
|
|
<thead>
|
|
<tr>
|
|
<th>__id</th>
|
|
<!--- <th>__name</th> --->
|
|
<th>user_description</th>
|
|
<th>Кол-во</th>
|
|
<th>Скидка</th>
|
|
<th>abstractive_service_code</th>
|
|
<th>modifier_code</th>
|
|
<th>is_actual</th>
|
|
<th>type</th>
|
|
<th>hash</th>
|
|
<th>version</th>
|
|
<th>name_version</th>
|
|
<th>date_accept</th>
|
|
<th>__index</th>
|
|
<th>date_nop</th>
|
|
<th>date_end</th>
|
|
<th>is_easy</th>
|
|
<th>params</th>
|
|
<th>additional_agreement</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<cfoutput query="qService">
|
|
<tr>
|
|
<td class="c"><a href="deal_service.cfm?__id=#__id#&#tr.fwx#">#__id#</a></td>
|
|
<!--- <td class="c">#__name#</td> --->
|
|
<td class="c">#user_description#</td>
|
|
<td class="c">#cnt#</td>
|
|
<td class="c">#discount#</td>
|
|
<td class="c">#abstractive_service_code#</td>
|
|
<td class="c">#modifier_code#</td>
|
|
<td class="c">#is_actual#</td>
|
|
<td class="c">#type#</td>
|
|
<td class="c">#hash#</td>
|
|
<td class="c">#version#</td>
|
|
<td class="c">#name_version#</td>
|
|
<td class="c">#date_accept#</td>
|
|
<td class="c">#__index#</td>
|
|
<td class="c">#dateFormat(date_nop,'YYYY-MM-DD')#</td>
|
|
<td class="c">#dateFormat(date_end,'YYYY-MM-DD')#</td>
|
|
<td class="c"><cfif is_easy GT 0>Простая<cfelse>Композитная</cfif></td>
|
|
<td class="c">#params#</td>
|
|
<td class="c">#additional_agreement#</td>
|
|
</tr>
|
|
</cfoutput>
|
|
</table>
|
|
</cfif>
|
|
|
|
|
|
<layout:page section="footer"/> |