diff --git a/Application.cfc b/Application.cfc index 3e28d77..4b9bdf9 100644 --- a/Application.cfc +++ b/Application.cfc @@ -69,7 +69,7 @@ - + diff --git a/specification.cfm b/specification.cfm index d2d6f9e..89aa5e9 100644 --- a/specification.cfm +++ b/specification.cfm @@ -225,21 +225,24 @@ + Ключ строки - Услуга - Модель Код услуги - Версий + Услуга + Имя для печати + Модель + Количество + Цена + Стоимость +   + + Версий Тек. соглашение Тек. версия Дата с - Дата по - Количество - Цена - Стоимость - Имя для печати - + Дата по + @@ -248,12 +251,19 @@ - #specification_item_uid# - #svc# - #pricing_model_short# - #code# - #item_version_count# + + #specification_item_uid# + #code# + #svc# + #specification_item# + #pricing_model_short# + #quantity# + #price# + #cost# + + + #item_version_count# #agreement# /#dateFormat(dt_agreement,'DD.MM.YYYY')# #agreement_version# @@ -261,10 +271,7 @@ #dateFormat(dt_from,'DD.MM.YYYY')# #dateFormat(dt_to,'DD.MM.YYYY')# - #quantity# - #price# - #cost# - #specification_item# + diff --git a/specification_item.cfm b/specification_item.cfm index 044ef2c..94e6a64 100644 --- a/specification_item.cfm +++ b/specification_item.cfm @@ -17,6 +17,8 @@ + + @@ -90,6 +92,7 @@ + @@ -142,7 +145,7 @@ select s.pricing_model_id, s.pricing_model, s.pricing_model_short from pricing_model s - order by 2 + order by 1 select agreement_version, quantity, price, specification_item_version from specification_item_version where specification_item_uid= + + AND agreement_version= + order by agreement_version desc limit 1 - + 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= + + AND agreement_version= + order by a.agreement_version desc limit 1 - - diff --git a/specification_version.cfm b/specification_version.cfm index 1d68ff1..2c92b47 100644 --- a/specification_version.cfm +++ b/specification_version.cfm @@ -144,7 +144,8 @@ @@ -178,6 +179,9 @@   + + + @@ -208,6 +212,7 @@ ,ver.specification_item_version as specification_item ,ver.quantity ,ver.price + ,ver.quantity*ver.price as cost ,ver.dt_from ,ver.dt_to from specification_item i @@ -255,7 +260,7 @@ Строки спецификации (#qItem.recordCount#) - + @@ -269,18 +274,25 @@ Ключ строки - Услуга - Модель Код услуги - Версий -   - Тек. соглашение - Тек. версия + Услуга + Имя для печати + Модель + Кол-во + Цена + Стоимость + Дата с Дата по - Количество - Цена - Имя для печати + +   + + Версий + Тек. соглашение + Тек. версия + + + @@ -290,19 +302,25 @@ - #specification_item_uid# - #svc# - #pricing_model_short# - #code# - #item_version_count# - + #specification_item_uid# + #code# + #svc# + #specification_item# + #pricing_model_short# + #quantity# + #price# + #cost# + + #dateFormat(dt_from,'DD.MM.YYYY')# + #dateFormat(dt_to,'DD.MM.YYYY')# + + + + #item_version_count# #agreement# #dateFormat(dt_agreement,'DD.MM.YYYY')# #qItem.agreement_version# - #dateFormat(dt_from,'DD.MM.YYYY')# - #dateFormat(dt_to,'DD.MM.YYYY')# - #quantity# - #price# - #specification_item# + +