diff --git a/Application.cfc b/Application.cfc index 5afaaa7..f12b0d1 100644 --- a/Application.cfc +++ b/Application.cfc @@ -99,7 +99,7 @@ - + diff --git a/additional_agreement.cfm b/additional_agreement.cfm index e123854..4668741 100644 --- a/additional_agreement.cfm +++ b/additional_agreement.cfm @@ -1,6 +1,3 @@ -UNDER CONSTRUCTION - - @@ -18,14 +15,27 @@ UNDER CONSTRUCTION - + - - - + + + + + + + + + + + + @@ -39,11 +49,16 @@ UNDER CONSTRUCTION /> - + select - __name as contragent - from elma.companies k - where k.__id= + c.__name as contract + ,c.date_of_aggrement + ,c.date_end_aggrement + ,k.__name as contragent + ,k.id_klienta as wz + from elma.aggrements c + left outer join elma.companies k on (c.company_uid=k.__id) + where c.__id= @@ -82,77 +97,154 @@ UNDER CONSTRUCTION
-
Номер договора
+
Название
#d.__name#
-
Контрагент
-
#qDecoration.contragent# [#d.company_uid#]
-
- -
-
Дата договора
-
#d.date_of_aggrement#
+
Договор
+
-
Дата окончания договора
-
#d.date_end_aggrement#
+
is_actual
+
#d.is_actual#
+
+ +
+
Последнее в цепочке
+
#d.last_aa#
+
+ +
+
Сделка
+
+ #d.deal_uid# + + select d.__id::text + , d.__name + from elma.deals d + where d.__id= + + #qDeal.__name# +
+
+ +
+
Услуги
+
+ + select services_::text + from elma.additional_agreements a + where a.__id= + + #qService_.services_# (обратная ссылка) +
+
+ +
+
base_by
+
+ + select b.__id::text + , b.__name + from elma.additional_agreements a + join elma.additional_agreements b on (b.__id = ANY(a.base_by)) + where a.__id= + + #qBaseBy.__id# + #qBaseBy.__name# +
- + + - - - - - + + + + + + + + + + + + + + + + + + - + + - - - - - + + + + + + + + + + + + + + + + + + - +
Номер договораДата договораСпецификаций__iduser_descriptionКол-воСкидкаabstractive_service_codemodifier_codeis_actualtypehashversionname_versiondate_accept__indexdate_nopdate_endis_easyparams
- - #contract# - #dateFormat(dt_contract,'YYYY-MM-DD')# - - #spec_cnt# - - - - #__id##user_description##cnt##discount##abstractive_service_code##modifier_code##is_actual##type##hash##version##name_version##date_accept##__index##dateFormat(date_nop,'YYYY-MM-DD')##dateFormat(date_end,'YYYY-MM-DD')#ПростаяКомпозитная#params#
- ---> + \ No newline at end of file diff --git a/contract.cfm b/contract.cfm index cb488f5..7980bd9 100644 --- a/contract.cfm +++ b/contract.cfm @@ -15,7 +15,7 @@ - + @@ -40,7 +40,7 @@ select __name as contragent from elma.companies k - where k.__id= + where k.__id=
@@ -101,55 +101,73 @@ - + + - - - - - + + + + + + + - + - - - + + + + + + +
Номер договораДата договораСпецификаций__id__namecontract_uidis_actuallast_aadeal_uidbase_by
- - #contract# + + #__id##__name##contract_uid##is_actual##last_aa##deal_uid##base_by#
- ---> + +
+ Мы не показываем тут сделки, поскольку связь со сделкой у договора не прямая и не обязательная. Сделки относятся к контрагенту, а не к договору. Сделка может быть связана с договором через дополнительное соглашение (включая нулевое соглашение, по умолчанию) + \ No newline at end of file diff --git a/contract_ls.cfm b/contract_ls.cfm new file mode 100644 index 0000000..97cc931 --- /dev/null +++ b/contract_ls.cfm @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + select + + d.__id + d.agreement_id + d.__name + d.company_uid + k.__name as contragent + k.id_klienta as wz + d.date_of_aggrement + d.date_end_aggrement + d.type_of_agreement + + from elma.aggrements d + left outer join elma.companies k on (d.company_uid=k.__id) + where 1=1 + order by + + + + + + + + + +select count(*) as cnt from elma.aggrements d where 1=1 + + + + + + + + + + + + Договоры + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #gridFooter# + + + diff --git a/deal.cfm b/deal.cfm index bc3b72d..591a03b 100644 --- a/deal.cfm +++ b/deal.cfm @@ -1 +1,212 @@ -UNDER CONSTRUCTION \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + pageInfo=#pageInfo# + id="#d.__id#" + status=#pageInfo.status# + trackOut="tr" + idAttributesOut="id" +/> + + + + 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= + + + + + + + Сделка + + #d.__name# + [#d.__id#] + + + + + + + + + + + +
+ +
+
__id
+
#d.__id#
+
+ +
+
Название
+
#d.__name#
+
+ +
+
Контрагент
+
+ #qDecoration.contragent# #qDecoration.wz# +
+
+ +
+
_plannedDueDate
+
#qDecoration._plannedDueDate#
+
+ +
+
Статус
+
#d.__status_status#
+
+ +
+
is_corrective_transaction
+
#d.is_corrective_transaction#
+
+ +
+
dt_load
+
#d.dt_load#
+
+ + +
+ +
+ + + + + + 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 =ANY(siv.deal) + --and siv.is_actual + order by version::int + + + +

Услуги (строки спецификации) (#qService.recordCount#)

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
__iduser_descriptionКол-воСкидкаabstractive_service_codemodifier_codeis_actualtypehashversionname_versiondate_accept__indexdate_nopdate_endis_easyparamsadditional_agreement
#__id##user_description##cnt##discount##abstractive_service_code##modifier_code##is_actual##type##hash##version##name_version##date_accept##__index##dateFormat(date_nop,'YYYY-MM-DD')##dateFormat(date_end,'YYYY-MM-DD')#ПростаяКомпозитная#params##additional_agreement#
+
+ + + \ No newline at end of file diff --git a/deal_service.cfm b/deal_service.cfm new file mode 100644 index 0000000..e2c638b --- /dev/null +++ b/deal_service.cfm @@ -0,0 +1,284 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + pageInfo=#pageInfo# + id="#d.__id#" + status=#pageInfo.status# + trackOut="tr" + idAttributesOut="id" +/> + + + + + + + + + Версия строки спецификации + + #d.__name# + [#d.__id#] + + + + + + + + + + + +
+ +
+
__id
+
#d.__id#
+
+ +
+
Ключ строки
+
#d.hash#
+
+ +
+
Тип периодичности
+
#d.type#
+
+ +
+
Код
+
#d.abstractive_service_code#.#d.modifier_code#
+
+ +
+
Пользовательское описание
+
#d.user_description#
+
+ +
+
Версия
+
#d.version#
+
+ +
+
is_actual
+
#d.is_actual#
+
+ +
+
Начало тарификации
+
#dateFormat(d.date_nop,'DD.MM.YYYY')#
+
+ +
+
Окончание тарификации
+
#dateFormat(d.date_end,'DD.MM.YYYY')#
+
+ +
+
Сделка
+
+ + select + d.__id::text + ,d.__name + ,c.__name as contragent + ,d."_plannedDueDate" + ,d.__index + ,d.__status_status + ,c.id_klienta as wz + from elma.deals_services siv + join elma.deals d on (d.__id = ANY(siv.deal)) + left outer join elma.companies c on (d._companies=c.__id) + where siv.__id= + + + #qDeal.__id# + #qDeal.contragent# #qDeal.wz# + #qDeal.__name# + _plannedDueDate: #dateFormat(qDeal._plannedDueDate,'DD.MM.YYYY')# + status: #qDeal.__status_status# +
+
+ +
+
Доп. соглашение
+
+ + select + a.__id::text + ,b.__id::text as base_by_uid + ,a.__name as additional_agreement + ,a.contract_uid::text + ,a.is_actual + ,a.last_aa + ,a.deal_uid::text + ,c.__name as contract + ,z.__name as contragent + ,z.id_klienta as wz + from elma.deals_services siv + join elma.additional_agreements a on (a.__id = ANY(siv.additional_agreement)) + join elma.additional_agreements b on (b.__id = ANY(a.base_by)) + left outer join elma.aggrements c on (a.contract_uid=c.__id) + left outer join elma.companies z on (c.company_uid=z.__id) + where siv.__id= + + + #qAdditionalAgreement.__id# #qAdditionalAgreement.contragent# #qAdditionalAgreement.wz# + #qAdditionalAgreement.contract# #qAdditionalAgreement.additional_agreement# + is_actual: #qAdditionalAgreement.is_actual# + last_aa: #qAdditionalAgreement.last_aa# + base_by: #qAdditionalAgreement.base_by_uid# +
+
+ + + + +
+
Параметры
+
+ + select params::text + from elma.deals_services siv + where siv.__id= + + #qParam.params# (обратная ссылка) +
+
+ + + +
+ +
+ + + + + + select + p.__id + ,p.__name + ,p.type + ,p.price + ,p.code + ,p.cnt + ,p.name + ,p.ed_izm + ,p.discount + ,p.deal::text + ,p.__index + from elma.service_parametrs p + join elma.deals_services siv on (p.__id = ANY (siv.params)) + where siv.__id= + order by type + + + +

Параметры (компоненты) (#qParam.recordCount#)

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
__id__nametypecodenamecnted_izmpricediscountdeal__index
#__id##__name##type##code##name##cnt##ed_izm##price##discount##deal##__index#
+
+ + + \ No newline at end of file diff --git a/inc/menu.cfm b/inc/menu.cfm index a055d93..eb6620e 100644 --- a/inc/menu.cfm +++ b/inc/menu.cfm @@ -10,12 +10,13 @@