# Date: 12/07/06 # Version: 105 $DOC(SD_VIOLATION) name=Журнал нарушений class=1 product=ALD_FUND name_formula=$TEXT(17575085) 'Нарушение:'+@viol_name+' Совершено:'+convert(varchar,@commit_date,3) +' Устранено:'+isnull(convert(varchar,@clear_date,3),'нет')+' Фонд:'+(select partner_code from t_partners where id=@fund_id) $ENDTEXT(17575085) remark_formula=null $STATE(BEG) name=Начальный class=1 $ENDSTATE $STATE(CORR) name=Устранено class=0 $ENDSTATE $STATE(DETECT) name=Выявлено class=0 $ENDSTATE $STATE(ED) name=В обработке class=0 $ENDSTATE $PROP(FUND_ID) name=Фонд field_name=fund_id table_name=t_sd_violation field_type=numeric field_length=9 field_scale=0 field_prec=18 page=1 order=1 init_class=1 init_formula=.ORGANIZATION unique_index=null numerator=null import_type=null import_table=null import_field=null import_where=null ref_table=null ref_key=null ref_display=null ref_alias=null ref_where=null $ENDPROP $PROP(DOC_ID) name=Документ по которому выявлено field_name=doc_id table_name=t_sd_violation field_type=numeric field_length=9 field_scale=0 field_prec=18 page=1 order=2 init_class=0 init_formula=null unique_index=null numerator=null import_type=null import_table=null import_field=null import_where=null ref_table=null ref_key=null ref_display=null ref_alias=null ref_where=null $ENDPROP $PROP(LIM_ID) name=Ограничение field_name=lim_id table_name=t_sd_violation field_type=numeric field_length=9 field_scale=0 field_prec=18 page=1 order=3 init_class=0 init_formula=null unique_index=null numerator=null import_type=null import_table=null import_field=null import_where=null ref_table=null ref_key=null ref_display=null ref_alias=null ref_where=null $ENDPROP $PROP(REP_DETECT_ID) name=Уведомление о выявлении field_name=rep_detect_id table_name=t_sd_violation field_type=numeric field_length=9 field_scale=0 field_prec=18 page=1 order=4 init_class=0 init_formula=null unique_index=null numerator=null import_type=null import_table=null import_field=null import_where=null ref_table=null ref_key=null ref_display=null ref_alias=null ref_where=null $ENDPROP $PROP(REP_CORR_ID) name=Уведомление об устранении field_name=rep_corr_id table_name=t_sd_violation field_type=numeric field_length=9 field_scale=0 field_prec=18 page=1 order=5 init_class=0 init_formula=null unique_index=null numerator=null import_type=null import_table=null import_field=null import_where=null ref_table=null ref_key=null ref_display=null ref_alias=null ref_where=null $ENDPROP $PROP(REP_UNCORR_ID) name=Уведомление о неустранении field_name=rep_uncorr_id table_name=t_sd_violation field_type=numeric field_length=9 field_scale=0 field_prec=18 page=1 order=6 init_class=0 init_formula=null unique_index=null numerator=null import_type=null import_table=null import_field=null import_where=null ref_table=null ref_key=null ref_display=null ref_alias=null ref_where=null $ENDPROP $PROP(VIOL_TYPE_ID) name=Тип нарушения field_name=viol_type_id table_name=t_sd_violation field_type=numeric field_length=9 field_scale=0 field_prec=18 page=1 order=7 init_class=0 init_formula=null unique_index=null numerator=null import_type=null import_table=null import_field=null import_where=null ref_table=null ref_key=null ref_display=null ref_alias=null ref_where=null $ENDPROP $PROP(ITEM_ID) name=Объект нарушения field_name=item_id table_name=t_sd_violation field_type=numeric field_length=9 field_scale=0 field_prec=18 page=1 order=8 init_class=0 init_formula=null unique_index=null numerator=null import_type=null import_table=null import_field=null import_where=null ref_table=null ref_key=null ref_display=null ref_alias=null ref_where=null $ENDPROP $PROP(VIOL_NAME) name=Описание нарушения field_name=viol_name table_name=t_sd_violation field_type=varchar field_length=255 field_scale=null field_prec=255 page=1 order=9 init_class=0 init_formula=null unique_index=null numerator=null import_type=null import_table=null import_field=null import_where=null ref_table=null ref_key=null ref_display=null ref_alias=null ref_where=null $ENDPROP $PROP(FIND_DATE) name=Дата выявления field_name=find_date table_name=t_sd_violation field_type=datetime field_length=8 field_scale=3 field_prec=23 page=1 order=10 init_class=0 init_formula=null unique_index=null numerator=null import_type=null import_table=null import_field=null import_where=null ref_table=null ref_key=null ref_display=null ref_alias=null ref_where=null $ENDPROP $PROP(DAYS_QTY) name=Срок устранения field_name=days_qty table_name=t_sd_violation field_type=int field_length=4 field_scale=0 field_prec=10 page=1 order=12 init_class=0 init_formula=null unique_index=null numerator=null import_type=null import_table=null import_field=null import_where=null ref_table=null ref_key=null ref_display=null ref_alias=null ref_where=null $ENDPROP $PROP(CLEAR_DATE) name=Дата устранения field_name=clear_date table_name=t_sd_violation field_type=datetime field_length=8 field_scale=3 field_prec=23 page=1 order=13 init_class=0 init_formula=null unique_index=null numerator=null import_type=null import_table=null import_field=null import_where=null ref_table=null ref_key=null ref_display=null ref_alias=null ref_where=null $ENDPROP $PROP(ACTION_STR) name=Меры для устранения field_name=action_str table_name=t_sd_violation field_type=varchar field_length=255 field_scale=null field_prec=255 page=1 order=14 init_class=0 init_formula=null unique_index=null numerator=null import_type=null import_table=null import_field=null import_where=null ref_table=null ref_key=null ref_display=null ref_alias=null ref_where=null $ENDPROP $PROP(COMMIT_DATE) name=Дата совершения (возникновения) field_name=commit_date table_name=t_sd_violation field_type=datetime field_length=8 field_scale=3 field_prec=23 page=1 order=11 init_class=0 init_formula=null unique_index=null numerator=null import_type=null import_table=null import_field=null import_where=null ref_table=null ref_key=null ref_display=null ref_alias=null ref_where=null $ENDPROP $PROP(ORDER_DATE) name=Дата предписания об устранении field_name=order_date table_name=t_sd_violation field_type=datetime field_length=8 field_scale=3 field_prec=23 page=1 order=15 init_class=0 init_formula=null unique_index=null numerator=null import_type=null import_table=null import_field=null import_where=null ref_table=null ref_key=null ref_display=null ref_alias=null ref_where=null $ENDPROP $PROP(ORDER_NO) name=Номер предписания об устранении field_name=order_no table_name=t_sd_violation field_type=varchar field_length=50 field_scale=null field_prec=50 page=1 order=16 init_class=0 init_formula=null unique_index=null numerator=null import_type=null import_table=null import_field=null import_where=null ref_table=null ref_key=null ref_display=null ref_alias=null ref_where=null $ENDPROP $PROP(REP_DETECT_NAME) name=Реквизиты уведомления о выявлении field_name=rep_detect_name table_name=t_sd_violation field_type=varchar field_length=100 field_scale=null field_prec=100 page=1 order=17 init_class=0 init_formula=null unique_index=null numerator=null import_type=null import_table=null import_field=null import_where=null ref_table=null ref_key=null ref_display=null ref_alias=null ref_where=null $ENDPROP $PROP(REP_CORR_NAME) name=Реквизиты уведомления об устранении field_name=rep_corr_name table_name=t_sd_violation field_type=varchar field_length=100 field_scale=null field_prec=100 page=1 order=18 init_class=0 init_formula=null unique_index=null numerator=null import_type=null import_table=null import_field=null import_where=null ref_table=null ref_key=null ref_display=null ref_alias=null ref_where=null $ENDPROP $PROP(REP_UNCORR_NAME) name=Реквизиты уведомления о неустранении field_name=rep_uncorr_name table_name=t_sd_violation field_type=varchar field_length=100 field_scale=null field_prec=100 page=1 order=19 init_class=0 init_formula=null unique_index=null numerator=null import_type=null import_table=null import_field=null import_where=null ref_table=null ref_key=null ref_display=null ref_alias=null ref_where=null $ENDPROP $PROP(FACT_PROC) name=Фактическое значение % field_name=fact_proc table_name=t_sd_violation field_type=money field_length=8 field_scale=4 field_prec=19 page=1 order=20 init_class=0 init_formula=null unique_index=null numerator=null import_type=null import_table=null import_field=null import_where=null ref_table=null ref_key=null ref_display=null ref_alias=null ref_where=null $ENDPROP $PROP(MIN_PROC) name=Минимальное значение % field_name=min_proc table_name=t_sd_violation field_type=money field_length=8 field_scale=4 field_prec=19 page=1 order=21 init_class=0 init_formula=null unique_index=null numerator=null import_type=null import_table=null import_field=null import_where=null ref_table=null ref_key=null ref_display=null ref_alias=null ref_where=null $ENDPROP $PROP(MAX_PROC) name=Максимальное значение % field_name=max_proc table_name=t_sd_violation field_type=money field_length=8 field_scale=4 field_prec=19 page=1 order=22 init_class=0 init_formula=null unique_index=null numerator=null import_type=null import_table=null import_field=null import_where=null ref_table=null ref_key=null ref_display=null ref_alias=null ref_where=null $ENDPROP $PROP(IS_SET_DETECT) name=Включить в уведомление о выявлении field_name=is_set_detect table_name=t_sd_violation field_type=int field_length=4 field_scale=0 field_prec=10 page=-100 order=24 init_class=0 init_formula=null unique_index=null numerator=null import_type=null import_table=null import_field=null import_where=null ref_table=null ref_key=null ref_display=null ref_alias=null ref_where=null $ENDPROP $PROP(IS_SET_CORR) name=Включить в уведомление об устранении field_name=is_set_corr table_name=t_sd_violation field_type=int field_length=4 field_scale=0 field_prec=10 page=-100 order=25 init_class=0 init_formula=null unique_index=null numerator=null import_type=null import_table=null import_field=null import_where=null ref_table=null ref_key=null ref_display=null ref_alias=null ref_where=null $ENDPROP $PROP(IS_SET_UNCORR) name=Включить в уведомление о неустранении field_name=is_set_uncorr table_name=t_sd_violation field_type=int field_length=4 field_scale=0 field_prec=10 page=-100 order=26 init_class=0 init_formula=null unique_index=null numerator=null import_type=null import_table=null import_field=null import_where=null ref_table=null ref_key=null ref_display=null ref_alias=null ref_where=null $ENDPROP $PROP(UNCORR_DATE) name=Дата уведомления о неустранении field_name=uncorr_date table_name=t_sd_violation field_type=datetime field_length=8 field_scale=3 field_prec=23 page=1 order=23 init_class=0 init_formula=null unique_index=null numerator=null import_type=null import_table=null import_field=null import_where=null ref_table=null ref_key=null ref_display=null ref_alias=null ref_where=null $ENDPROP $PROP(COMMENTARY_1) name=Примечание field_name=commentary table_name=t_sd_violation field_type=varchar field_length=255 field_scale=null field_prec=null page=1 order=27 init_class=null init_formula=null unique_index=null numerator=null import_type=null import_table=null import_field=null import_where=null ref_table=null ref_key=null ref_display=null ref_alias=null ref_where=null $ENDPROP $RELATION(REL1) class=0 type=FUND_GROUP form=null prop=FUND_ID idname=null order=10 $ENDRELATION $FORM(FORM1) name=Просмотр class=5 filter=null target_state= uo=uo_edit dw=d_sd_viol_edit procedure=ap_30000000003418096 patterns=GENERIC_VIEW_ITEM_O user_define=0 isvisible=0 istab=0 posx=0 posy=0 width=2149 height=1516 proc_text=$TEXT(17575089) create procedure dbo.%PROC% @sid varchar(30) = null as .BEGIN('N') .CHECK_USER .CHECK_VIEW if @id = -1 begin .VIEW_INIT end else begin .VIEW_ITEM end .END $ENDTEXT(17575089) $ACTION2RELATION(REL1.PARTNER_SHORT_NAME) relation=REL1 where=null prop=PARTNER_SHORT_NAME order=4 alias=fund_name $ENDACTION2RELATION $ENDFORM $FORM(FORM2) name=Список class=4 filter=FORM3 target_state= uo=uo_list dw=d_sd_viol_list procedure=ap_30000000003418098 patterns=GENERIC_VIEW_LIST user_define=1 isvisible=0 istab=0 posx=0 posy=0 width=3639 height=992 proc_text=$TEXT(17575089) create procedure dbo.%PROC% @sid varchar(30) = null .ARGLIST_FILTER, @state_name_id_s varchar(30) = null as .BEGIN('N') .CHECK_USER .CHECK_VIEW .ARGCONVERT_FILTER .VIEW_LIST and (t_items.state_id in (select id from t_states where t_states.type_id = @type_id and t_states.state_id = convert(numeric,@state_name_id_s)) or isnull(@state_name_id_s,'')='') order by commit_date_d, find_date_d .END $ENDTEXT(17575089) $ACTION2RELATION(REL1.PARTNER_CODE) relation=REL1 where=null prop=PARTNER_CODE order=4 alias=fund_code $ENDACTION2RELATION $ENDFORM $FORM(FORM3) name=Фильтр class=6 filter=null target_state= uo=uo_filter dw=d_sd_viol_filter procedure=ap_30000000003418100 patterns=null user_define=0 isvisible=0 istab=0 posx=0 posy=0 width=2126 height=840 proc_text=$TEXT(17575089) create procedure dbo.%PROC% as begin declare @fund_id numeric, @type_id numeric select @fund_id = .ORGANIZATION select @type_id=type_id from t_actions where id=%ACTION_ID% select convert(varchar(30),@fund_id) as fund_id_s, convert(varchar(255),null) as viol_name, convert(datetime,null) as find_date_db, convert(datetime,null) as commit_date_db, convert(datetime,null) as clear_date_db, (select partner_code from t_partners where id=@fund_id) as fund_code, (select partner_short_name from t_partners where id=@fund_id) as fund_name, convert(datetime,null) as find_date_de, convert(datetime,null) as commit_date_de, convert(datetime,null) as clear_date_de, convert(varchar(30),null) as state_name_id_s, convert(varchar(30),@type_id) as type_id_s end $ENDTEXT(17575089) $FILTER(CLEAR_DATE) type=2 label=Дата устранения prop=CLEAR_DATE arg_code=null arg_type=null arg_length=null arg_prec=null arg_scale=null $ENDFILTER $FILTER(FUND_ID) type=1 label=Фонд prop=FUND_ID arg_code=null arg_type=null arg_length=null arg_prec=null arg_scale=null $ENDFILTER $FILTER(COMMIT_DATE) type=2 label=Дата совершения (возникновения) prop=COMMIT_DATE arg_code=null arg_type=null arg_length=null arg_prec=null arg_scale=null $ENDFILTER $FILTER(VIOL_NAME) type=3 label=Описание нарушения prop=VIOL_NAME arg_code=null arg_type=null arg_length=null arg_prec=null arg_scale=null $ENDFILTER $FILTER(FIND_DATE) type=2 label=Дата выявления prop=FIND_DATE arg_code=null arg_type=null arg_length=null arg_prec=null arg_scale=null $ENDFILTER $ENDFORM $FORM(FORM_CORR/UNCORR_VIOL) name=Отчет Устраненные/неустраненные нарушения class=4 filter=FORM_PRN_FILTER target_state= uo=uo_list_rep dw=d_sd_viol_prn_new2 procedure=ap_30000000000136737 patterns=null user_define=1 isvisible=0 istab=0 posx=null posy=null width=null height=null proc_text=$TEXT(17575089) create procedure dbo.%PROC% @sid varchar(30) = null, @find_date_db varchar(30)=null, @find_date_de varchar(30)=null, @fund_id_s varchar(30) = null as .BEGIN('N') .CHECK_USER declare @find_date_e datetime, @find_date_b datetime, @fund_id numeric select @find_date_e=convert(datetime,@find_date_de,3), @find_date_b=convert(datetime,@find_date_db,3) if @find_date_e is null select @find_date_e=.OPERDAY if @find_date_b is null or @find_date_b>@find_date_e select @find_date_b=@find_date_e if @fund_id_s='' select @fund_id_s=null select @fund_id=convert(numeric,@fund_id_s) if @fund_id is null select @fund_id=.ORGANIZATION create table #result( sid varchar(30) null, viol_id numeric(18,0) null, uk_name varchar(255) null, fond_type varchar(255) null, type varchar(50) null, fund_name varchar(255) null, in_no varchar(50) null, rep_date datetime null, state varchar(255) null, rep_no varchar(50) null, rep_corr_date datetime null ) declare @uk_name_npf varchar(255), --наименование УК для ПИФ/НПФ @uk_name_npf2 varchar(255), @uk_id numeric -- --Наименование УК для НПФ if upper(.ITEM_TYPE_CODE(@fund_id))='NPF_FUND' begin declare uk cursor for select p.id from t_partners p, td_depo_docs dd, tb_contracts d where p.id=d.client_id and d.id=dd.id and dd.owner_id=@fund_id and exists(select 1 from t_items, t_states, t_types where t_items.id=d.id and t_states.id=t_items.state_id and t_states.class_id=0 and t_types.id=t_items.type_id and upper(t_types.type_code)=upper('FUND_CONTRACTS')) and (select t_states.state_code from t_items,t_states where t_items.id = d.id and t_items.state_id = t_states.id) in ('OK','CRT') and d.dog_type_id=3 open uk fetch uk into @uk_id select @uk_name_npf2='' while .CURSOR_STATE=0 begin select @uk_name_npf=partner_short_name from t_partners where id=@uk_id select @uk_name_npf=@uk_name_npf+', '+@uk_name_npf2 select @uk_name_npf2=@uk_name_npf fetch uk into @uk_id end close uk .DEALLOCATE uk select @uk_name_npf=left(@uk_name_npf,len(@uk_name_npf)-1) end --Наименование УК для ПИФ if upper(.ITEM_TYPE_CODE(@fund_id))='PIF_FUND' select @uk_name_npf=p.partner_name from t_partners p,td_pay_fond f where p.id=f.ctrl_comp_id and f.id=@fund_id insert into #result select @sid, t_sd_violation.id, @uk_name_npf as uk_name, f.fond_type as fond_type, (case (isnull((select min(v.code) from t_classvalues v, t_classes c, t_item2class i where c.id=v.class_id and c.code='PIF_TYPES_31' and i.item_id=t_sd_violation.fund_id and i.value_id=v.id),'0')) when '1' then 'др' when '2' then 'обл.' when '3' then 'акц.' when '4' then 'си' when '5' then 'нед.' when '6' then 'ви' when '7' then 'фф' when '8' then 'инд.' else '' end) as type, p1.partner_name as fund_name, td.in_no as in_no, td.in_date as rep_date, null, /*(case when .ITEMS_EXISTS_BY_TYPE_STATE(td1.id,'SD_VIOLATION_UNCORR_REP','CRT') and not (.ITEMS_EXISTS_BY_TYPE_STATE(t_sd_violation.id,'SD_VIOLATION','CORR')) then 'не устранено' else ( case when .ITEMS_EXISTS_BY_TYPE_STATE(t_sd_violation.id,'SD_VIOLATION','CORR') then 'устранено' end) end) as state,*/ null, null from t_sd_violation, t_partners p1, td_pay_fond f, td_depo_docs td where .ITEMS_EXISTS(t_sd_violation.id) and td.id=t_sd_violation.rep_detect_id and t_sd_violation.fund_id = p1.id and t_sd_violation.fund_id=@fund_id and (t_sd_violation.find_date between @find_date_b and @find_date_e) and f.id= t_sd_violation.fund_id order by rep_date, fund_name update #result set state='не устранено', rep_no=td1.in_no, rep_corr_date=td1.in_date from t_sd_violation, td_depo_docs td1 where t_sd_violation.id=#result.viol_id and td1.id=t_sd_violation.rep_uncorr_id and .ITEMS_EXISTS_BY_TYPE_STATE(td1.id,'SD_VIOLATION_UNCORR_REP','CRT') and not (.ITEMS_EXISTS_BY_TYPE_STATE(t_sd_violation.id,'SD_VIOLATION','CORR')) update #result set state='устранено', rep_no=td2.in_no, rep_corr_date=td2.in_date from t_sd_violation, td_depo_docs td2 where t_sd_violation.id=#result.viol_id and td2.id=t_sd_violation.rep_corr_id and .ITEMS_EXISTS_BY_TYPE_STATE(t_sd_violation.id,'SD_VIOLATION','CORR') select sid, (case when @find_date_e=@find_date_b then 'Дата выявления: '+convert(varchar,@find_date_e,104) else 'За период с '+convert(varchar,@find_date_b,104)+' по '+convert(varchar,@find_date_e,104) end) as date_str, uk_name, uk_name as uk_name_excel, fond_type, type, upper(.ITEM_TYPE_CODE(@fund_id)) as fund_type_code, fund_name, fund_name as fund_name_excel, in_no, rep_date as rep_date_d, state, rep_no, rep_corr_date as rep_corr_date_d from #result drop table #result .END $ENDTEXT(17575089) $ENDFORM $FORM(FORM_DISCOVERED_VIOL) name=Отчет Выявленные нарушения class=4 filter=FORM_PRN_FILTER target_state= uo=uo_list_rep dw=d_sd_viol_prn_new1 procedure=ap_30000000000136165 patterns=null user_define=1 isvisible=0 istab=0 posx=null posy=null width=null height=null proc_text=$TEXT(17575091) create procedure dbo.%PROC% @sid varchar(30) = null, @find_date_db varchar(30)=null, @find_date_de varchar(30)=null, @fund_id_s varchar(30) = null as .BEGIN('N') .CHECK_USER declare @find_date_e datetime, @find_date_b datetime, @fund_id numeric declare @uk_name_npf varchar(255),--наименование УК для ПИФ/НПФ @uk_name_npf2 varchar(255),@uk_id numeric select @find_date_e=convert(datetime,@find_date_de,3), @find_date_b=convert(datetime,@find_date_db,3) if @find_date_e is null select @find_date_e=.OPERDAY if @find_date_b is null or @find_date_b>@find_date_e select @find_date_b=@find_date_e if @fund_id_s='' select @fund_id_s=null select @fund_id=convert(numeric,@fund_id_s) if @fund_id is null select @fund_id=.ORGANIZATION --имена УК для НПФ if upper(.ITEM_TYPE_CODE(@fund_id))='NPF_FUND' begin declare uk cursor for select p.id from t_partners p, td_depo_docs dd, tb_contracts d where p.id=d.client_id and d.id=dd.id and dd.owner_id=@fund_id and exists(select 1 from t_items, t_states, t_types where t_items.id=d.id and t_states.id=t_items.state_id and t_states.class_id=0 and t_types.id=t_items.type_id and upper(t_types.type_code)=upper('FUND_CONTRACTS')) and (select t_states.state_code from t_items,t_states where t_items.id = d.id and t_items.state_id = t_states.id) in ('OK','CRT') and d.dog_type_id=3 open uk fetch uk into @uk_id select @uk_name_npf2='' while .CURSOR_STATE=0 begin select @uk_name_npf=partner_short_name from t_partners where id=@uk_id select @uk_name_npf=@uk_name_npf+', '+@uk_name_npf2 select @uk_name_npf2=@uk_name_npf fetch uk into @uk_id end close uk DEALLOCATE uk select @uk_name_npf=left(@uk_name_npf,len(@uk_name_npf)-1) end --имя УК для ПИФ if upper(.ITEM_TYPE_CODE(@fund_id))='PIF_FUND' select @uk_name_npf=p.partner_name from t_partners p,td_pay_fond f where p.id=f.ctrl_comp_id and f.id=@fund_id select @sid , (case when @find_date_e=@find_date_b then 'Дата выявления: '+convert(varchar,@find_date_e,104) else 'За период с '+convert(varchar,@find_date_b,104)+' по '+convert(varchar,@find_date_e,104) end) as date_str, upper(.ITEM_TYPE_CODE(@fund_id)) as fund_type_code, @uk_name_npf as uk_name, @uk_name_npf as uk_name_excel, f.fond_type as fond_type, (case (isnull((select min(v.code) from t_classvalues v, t_classes c, t_item2class i where c.id=v.class_id and c.code='PIF_TYPES_31' and i.item_id=t_sd_violation.fund_id and i.value_id=v.id),'0')) when '1' then 'др' when '2' then 'обл.' when '3' then 'акц.' when '4' then 'си' when '5' then 'нед.' when '6' then 'ви' when '7' then 'фф' when '8' then 'инд.' else '' end) as type, p1.partner_name as fund_name, p1.partner_name as fund_name_excel, td.in_no as in_no, td.in_date as rep_date_d, t_sd_violation.commit_date as commit_date_d, t_sd_violation.viol_name as viol_name, t_sd_violation.commentary as commentary, t_sd_violation.days_qty as days_qty --.VIEW_CALC from t_sd_violation, t_partners p1, td_depo_docs td, td_pay_fond f where .ITEMS_EXISTS(t_sd_violation.id) and td.id=t_sd_violation.rep_detect_id and t_sd_violation.fund_id = p1.id and t_sd_violation.fund_id=@fund_id and (t_sd_violation.find_date between @find_date_b and @find_date_e) and f.id= t_sd_violation.fund_id order by commit_date_d, fund_name .END $ENDTEXT(17575091) $ENDFORM $FORM(FORM_PRN) name=Просмотр отчета class=4 filter=FORM_PRN_FILTER target_state= uo=uo_list_rep dw=d_sd_viol_prn procedure=ap_30000000003430011 patterns=null user_define=1 isvisible=0 istab=0 posx=0 posy=0 width=3657 height=1812 proc_text=$TEXT(17575091) create procedure dbo.%PROC% @sid varchar(30) = null, @find_date_db varchar(30)=null, @find_date_de varchar(30)=null, @fund_id_s varchar(30) = null as .BEGIN('N') .CHECK_USER declare @find_date_e datetime, @find_date_b datetime, @fund_id numeric select @find_date_e=convert(datetime,@find_date_de,3), @find_date_b=convert(datetime,@find_date_db,3) if @find_date_e is null select @find_date_e=.OPERDAY if @find_date_b is null or @find_date_b>@find_date_e select @find_date_b=@find_date_e if @fund_id_s='' select @fund_id_s=null select @fund_id=convert(numeric,@fund_id_s) if @fund_id is null select @fund_id=.ORGANIZATION select @sid, (case when @find_date_e=@find_date_b then 'Дата: '+convert(varchar,@find_date_e,104) else 'За период с '+convert(varchar,@find_date_b,104)+' по '+convert(varchar,@find_date_e,104) end) as date_str, convert(varchar(36),@find_date_b,3) as find_date_db, convert(varchar(36),@find_date_e,3) as find_date_de, (select partner_name from t_partners where id=@fund_id) as fund_name, convert(varchar(30),@fund_id) as fund_id_s, upper(.ITEM_TYPE_CODE(@fund_id)) as fund_type, (select p.partner_name + isnull((select ' (лицензия № '+isnull(l.lic_no,'') +' от '+isnull(convert(varchar,l.lic_date,3),'') +')' from t_licence l where l.partner_id=p.id and .ITEMS_EXISTS(l.id) and l.activity_id=4),'') from t_partners p, td_pay_fond f where p.id=f.ctrl_comp_id and f.id=@fund_id) as uk_name .END $ENDTEXT(17575091) $ENDFORM $FORM(FORM_PRN_DET) name=Перечень отчета class=4 filter=FORM_PRN_FILTER target_state= uo=uo_list_rep dw=d_sd_viol_prn_det procedure=ap_sd_viol_prn_det patterns=GENERIC_VIEW_LIST user_define=1 isvisible=1 istab=0 posx=0 posy=0 width=0 height=0 proc_text=$TEXT(17575091) create procedure dbo.%PROC% @sid varchar(30) = null .ARGLIST_FILTER as .BEGIN('N') .CHECK_VIEW .ARGCONVERT_FILTER .VIEW_LIST order by find_date_d, fund_short_name .END $ENDTEXT(17575091) $ACTION2RELATION(REL1.PARTNER_SHORT_NAME) relation=REL1 where=null prop=PARTNER_SHORT_NAME order=1 alias=fund_short_name $ENDACTION2RELATION $ENDFORM $FORM(FORM_PRN_FILTER) name=Фильтр для отчета class=6 filter=null target_state= uo=uo_filter dw=d_sd_viol_prn_filter procedure=ap_30000000003430091 patterns=null user_define=0 isvisible=0 istab=0 posx=0 posy=0 width=2135 height=440 proc_text=$TEXT(17575091) create procedure dbo.%PROC% as begin declare @find_date_db datetime declare @find_date_de datetime select @find_date_db = .OPERDAY select @find_date_de = @find_date_db declare @fund_id numeric declare @fund_code varchar(100) select @fund_id = .ORGANIZATION select @fund_code = (select partner_code from t_partners where id=@fund_id) select convert(varchar(30), @fund_id) as fund_id_s, @find_date_db as find_date_db, @fund_code as fund_code, @find_date_de as find_date_de end $ENDTEXT(17575091) $FILTER(FIND_DATE) type=2 label=Дата выявления prop=FIND_DATE arg_code=null arg_type=null arg_length=null arg_prec=null arg_scale=null $ENDFILTER $FILTER(FUND_ID) type=1 label=Фонд prop=FUND_ID arg_code=null arg_type=null arg_length=null arg_prec=null arg_scale=null $ENDFILTER $ENDFORM $FORM(VIOL2REP) name=Нарушения к уведомлению class=4 filter=null target_state= uo=uo_viol2rep_list dw=d_sd_viol2rep_list procedure=ap_sd_viol2rep_list patterns=GENERIC_VIEW_LIST user_define=0 isvisible=1 istab=1 posx=0 posy=0 width=0 height=0 proc_text=$TEXT(17575091) create procedure dbo.%PROC% @sid varchar(30) = null as .BEGIN('N') .CHECK_USER .CHECK_VIEW .ID_VAR(@rep_id) .INT_VAR(@rep_type) select @rep_id=@id select @rep_type=(case upper(.ITEM_TYPE_CODE(@rep_id)) when 'SD_VIOLATION_DETECT_REP' then 1 when 'SD_VIOLATION_CORR_REP' then 2 when 'SD_VIOLATION_UNCORR_REP' then 3 end) .VIEW_LIST and ((t_sd_violation.rep_detect_id=@rep_id and @rep_type=1) or (t_sd_violation.rep_corr_id=@rep_id and @rep_type=2) or (t_sd_violation.rep_uncorr_id=@rep_id and @rep_type=3)) .END $ENDTEXT(17575091) $ACTION2RELATION(REL1.PARTNER_CODE) relation=REL1 where=null prop=PARTNER_CODE order=4 alias=fund_code $ENDACTION2RELATION $CALC(VIOL_ID_S) class=1 type=varchar calc_lenght=30 calc_prec=null calc_scale=null formula=t_items.id label=Id нарушения order=30 $ENDCALC $CALC(IS_SET) class=1 type=integer calc_lenght=null calc_prec=null calc_scale=null formula=$TEXT(17575091) (case @rep_type when 1 then t_sd_violation.is_set_detect when 2 then t_sd_violation.is_set_corr when 3 then t_sd_violation.is_set_uncorr end) $ENDTEXT(17575091) label=Нарушение к уведомлению order=10 $ENDCALC $CALC(REP_TYPE) class=1 type=integer calc_lenght=null calc_prec=null calc_scale=null formula=@rep_type label=Тип уведомления order=20 $ENDCALC $ENDFORM $ACTION(#AP_SD_VIOL_CHECK) name=Проверки при занесении в журнал class=9 form=null target_state=null procedure=ap_sd_viol_check patterns=GENERIC_MOVE user_define=0 isvisible=1 istab=0 posx=0 posy=0 width=0 height=0 proc_text=$TEXT(17575091) create procedure dbo.%PROC% @id numeric(18,0), @fund_id numeric(18,0), @commit_date datetime, @find_date datetime, @lim_id numeric(18,0), @item_id numeric(18,0), @mess varchar(255) out as select @mess=null .NAME_VAR(@sd40_date_str) select @sd40_date_str=.GET_CONST('SD_40_VIOLATION') if @find_date@find_date select @mess='Дата совершения не может быть больше даты выявления' if @lim_id is not null and exists(select 1 from t_sd_violation where id<>@id and fund_id=@fund_id and lim_id=@lim_id and ((item_id=@item_id and @item_id is not null) or @item_id is null) and (commit_date=@commit_date or find_date=@find_date)) select @mess='В журнале существует нарушение этого ограничения на указанную дату совершения или выявления' $ENDTEXT(17575091) $ENDACTION $ACTION(#AP_SREZ_VIOLATIONS_DEL) name=Удаление нарушений по документу class=9 form=null target_state=null procedure=ap_srez_violations_del patterns=GENERIC_MOVE user_define=0 isvisible=1 istab=0 posx=0 posy=0 width=0 height=0 proc_text=$TEXT(17575091) create procedure dbo.%PROC% @doc_id numeric(18,0) as begin tran delete t_items from t_sd_violation, t_states where t_sd_violation.id=t_items.id and t_items.state_id=t_states.id and upper(t_states.state_code)='ED' and t_sd_violation.doc_id=@doc_id delete t_sd_violation where t_sd_violation.doc_id=@doc_id and not exists(select 1 from t_items where id=t_sd_violation.id) commit tran $ENDTEXT(17575091) $ENDACTION $ACTION(#AP_SD_VIOL2REP_SET) name=Привязка к уведомлению class=9 form=null target_state=null procedure=ap_sd_viol2rep_set patterns=GENERIC_MOVE user_define=0 isvisible=1 istab=0 posx=0 posy=0 width=0 height=0 proc_text=$TEXT(17575091) create procedure dbo.%PROC% @viol_id_s varchar(30) = null, @rep_type integer, @is_set integer as .ID_VAR(@viol_id) select @viol_id=convert(numeric,@viol_id_s) begin tran .ID_VAR(@rep_id) select @rep_id=(case @rep_type when 1 then rep_detect_id when 2 then rep_corr_id when 3 then rep_uncorr_id end) from t_sd_violation where id=@viol_id if .ITEM_STATE_CODE(@rep_id)='ED' begin if @rep_type=1 begin update t_sd_violation set is_set_detect=isnull(@is_set,0) where id=@viol_id update t_sd_violation set rep_detect_id=null where id=@viol_id and is_set_detect=0 end if @rep_type=2 begin update t_sd_violation set is_set_corr=isnull(@is_set,0) where id=@viol_id update t_sd_violation set rep_corr_id=null where id=@viol_id and is_set_corr=0 end if @rep_type=3 begin update t_sd_violation set is_set_uncorr=isnull(@is_set,0) where id=@viol_id update t_sd_violation set rep_uncorr_id=null where id=@viol_id and is_set_uncorr=0 end end commit tran $ENDTEXT(17575091) $ENDACTION $ACTION(ACTION1) name=Добавить class=1 form=FORM1 target_state=ED procedure=ap_30000000003418106 patterns=GENERIC_INSERT_O user_define=0 isvisible=0 istab=0 posx=0 posy=0 width=2167 height=1732 proc_text=$TEXT(17575091) create procedure dbo.%PROC% @sid varchar(30) = null, .ARGLIST as .BEGIN('N') .CHECK_USER .CHECK_INSERT .ARGCONVERT .INIT_VARS .TEST_UNIQUE .NAME_VAR(@mess) exec ap_sd_viol_check @id, @fund_id, @commit_date, @find_date, @lim_id, @item_id, @mess out if @mess is not null .EXIT_MESSAGE(@mess) begin tran .INSERT_ITEMS .INSERT .UPDATE_STATE .RELGEN .ACTION_HISTORY commit tran select sid = convert(varchar, @id) .END $ENDTEXT(17575091) $ENDACTION $ACTION(ACTION2) name=Изменить class=2 form=FORM1 target_state=null procedure=ap_30000000003418107 patterns=GENERIC_UPDATE user_define=1 isvisible=0 istab=0 posx=0 posy=0 width=2203 height=1672 proc_text=$TEXT(17575091) create procedure dbo.%PROC% @sid varchar(30) = null, .ARGLIST as .BEGIN('N') .CHECK_USER .CHECK_UPDATE .ARGCONVERT .TEST_UNIQUE .NAME_VAR(@mess) .INT_VAR(@is_holiday) .INT_VAR(@days_res) declare @date_rep datetime exec ap_sd_viol_check @id, @fund_id, @commit_date, @find_date, @lim_id, @item_id, @mess out if @mess is not null .EXIT_MESSAGE(@mess) -- проверка срока if @days_qty is not null begin select @mess=null select @date_rep=@uncorr_date, @is_holiday=r.is_holiday from t_sd_violation_reps r where r.id=@rep_uncorr_id and @rep_uncorr_name is not null if @date_rep is not null begin exec ap_calc_days_qty @commit_date, @date_rep, @is_holiday, @days_res out if @days_res<=@days_qty select @mess='Указанный срок устранения не соответствует дате сформированного уведомления о неустранении: ' + convert(varchar,@days_qty) + ' дн. от ' + convert(varchar,@commit_date,3) + ' до ' + convert(varchar,@date_rep,3) + ' ('+(case @is_holiday when 0 then 'без учета' else 'с учетом' end) + ' выходных)' if @mess is not null .EXIT_MESSAGE(@mess) end end begin tran .UPDATE_ITEMS .UPDATE .RELGEN .UPDATE_STATE .ACTION_HISTORY commit tran .END $ENDTEXT(17575091) $ENDACTION $ACTION(ACTION3) name=Удалить class=3 form=FORM1 target_state=null procedure=ap_30000000003418108 patterns=GENERIC_MOVE user_define=0 isvisible=0 istab=0 posx=0 posy=0 width=2139 height=1512 proc_text=$TEXT(17575092) create procedure dbo.%PROC% @sid varchar(30) = null as .BEGIN('N') .CHECK_USER .CHECK_UPDATE begin tran .TYPE_DELETE commit tran .END $ENDTEXT(17575092) $ENDACTION $STATE2ACTION(BEG.#AP_SD_VIOL_CHECK) state=BEG action=#AP_SD_VIOL_CHECK is_available=0 $ENDSTATE2ACTION $STATE2ACTION(BEG.#AP_SREZ_VIOLATIONS_DEL) state=BEG action=#AP_SREZ_VIOLATIONS_DEL is_available=0 $ENDSTATE2ACTION $STATE2ACTION(BEG.#AP_SD_VIOL2REP_SET) state=BEG action=#AP_SD_VIOL2REP_SET is_available=0 $ENDSTATE2ACTION $STATE2ACTION(BEG.ACTION1) state=BEG action=ACTION1 is_available=1 $ENDSTATE2ACTION $STATE2ACTION(BEG.ACTION2) state=BEG action=ACTION2 is_available=0 $ENDSTATE2ACTION $STATE2ACTION(BEG.ACTION3) state=BEG action=ACTION3 is_available=0 $ENDSTATE2ACTION $STATE2ACTION(BEG.FORM1) state=BEG action=FORM1 is_available=0 $ENDSTATE2ACTION $STATE2ACTION(BEG.FORM2) state=BEG action=FORM2 is_available=0 $ENDSTATE2ACTION $STATE2ACTION(BEG.FORM3) state=BEG action=FORM3 is_available=0 $ENDSTATE2ACTION $STATE2ACTION(BEG.FORM_CORR/UNCORR_VIOL) state=BEG action=FORM_CORR/UNCORR_VIOL is_available=0 $ENDSTATE2ACTION $STATE2ACTION(BEG.FORM_DISCOVERED_VIOL) state=BEG action=FORM_DISCOVERED_VIOL is_available=0 $ENDSTATE2ACTION $STATE2ACTION(BEG.FORM_PRN) state=BEG action=FORM_PRN is_available=0 $ENDSTATE2ACTION $STATE2ACTION(BEG.FORM_PRN_DET) state=BEG action=FORM_PRN_DET is_available=0 $ENDSTATE2ACTION $STATE2ACTION(BEG.FORM_PRN_FILTER) state=BEG action=FORM_PRN_FILTER is_available=0 $ENDSTATE2ACTION $STATE2ACTION(BEG.VIOL2REP) state=BEG action=VIOL2REP is_available=0 $ENDSTATE2ACTION $STATE2ACTION(CORR.#AP_SD_VIOL_CHECK) state=CORR action=#AP_SD_VIOL_CHECK is_available=0 $ENDSTATE2ACTION $STATE2ACTION(CORR.#AP_SREZ_VIOLATIONS_DEL) state=CORR action=#AP_SREZ_VIOLATIONS_DEL is_available=0 $ENDSTATE2ACTION $STATE2ACTION(CORR.#AP_SD_VIOL2REP_SET) state=CORR action=#AP_SD_VIOL2REP_SET is_available=0 $ENDSTATE2ACTION $STATE2ACTION(CORR.ACTION1) state=CORR action=ACTION1 is_available=0 $ENDSTATE2ACTION $STATE2ACTION(CORR.ACTION2) state=CORR action=ACTION2 is_available=1 $ENDSTATE2ACTION $STATE2ACTION(CORR.ACTION3) state=CORR action=ACTION3 is_available=0 $ENDSTATE2ACTION $STATE2ACTION(CORR.FORM1) state=CORR action=FORM1 is_available=1 $ENDSTATE2ACTION $STATE2ACTION(CORR.FORM2) state=CORR action=FORM2 is_available=1 $ENDSTATE2ACTION $STATE2ACTION(CORR.FORM3) state=CORR action=FORM3 is_available=1 $ENDSTATE2ACTION $STATE2ACTION(CORR.FORM_CORR/UNCORR_VIOL) state=CORR action=FORM_CORR/UNCORR_VIOL is_available=1 $ENDSTATE2ACTION $STATE2ACTION(CORR.FORM_DISCOVERED_VIOL) state=CORR action=FORM_DISCOVERED_VIOL is_available=1 $ENDSTATE2ACTION $STATE2ACTION(CORR.FORM_PRN) state=CORR action=FORM_PRN is_available=1 $ENDSTATE2ACTION $STATE2ACTION(CORR.FORM_PRN_DET) state=CORR action=FORM_PRN_DET is_available=1 $ENDSTATE2ACTION $STATE2ACTION(CORR.FORM_PRN_FILTER) state=CORR action=FORM_PRN_FILTER is_available=1 $ENDSTATE2ACTION $STATE2ACTION(CORR.VIOL2REP) state=CORR action=VIOL2REP is_available=1 $ENDSTATE2ACTION $STATE2ACTION(DETECT.#AP_SD_VIOL_CHECK) state=DETECT action=#AP_SD_VIOL_CHECK is_available=0 $ENDSTATE2ACTION $STATE2ACTION(DETECT.#AP_SREZ_VIOLATIONS_DEL) state=DETECT action=#AP_SREZ_VIOLATIONS_DEL is_available=0 $ENDSTATE2ACTION $STATE2ACTION(DETECT.#AP_SD_VIOL2REP_SET) state=DETECT action=#AP_SD_VIOL2REP_SET is_available=0 $ENDSTATE2ACTION $STATE2ACTION(DETECT.ACTION1) state=DETECT action=ACTION1 is_available=0 $ENDSTATE2ACTION $STATE2ACTION(DETECT.ACTION2) state=DETECT action=ACTION2 is_available=1 $ENDSTATE2ACTION $STATE2ACTION(DETECT.ACTION3) state=DETECT action=ACTION3 is_available=0 $ENDSTATE2ACTION $STATE2ACTION(DETECT.FORM1) state=DETECT action=FORM1 is_available=1 $ENDSTATE2ACTION $STATE2ACTION(DETECT.FORM2) state=DETECT action=FORM2 is_available=1 $ENDSTATE2ACTION $STATE2ACTION(DETECT.FORM3) state=DETECT action=FORM3 is_available=1 $ENDSTATE2ACTION $STATE2ACTION(DETECT.FORM_CORR/UNCORR_VIOL) state=DETECT action=FORM_CORR/UNCORR_VIOL is_available=1 $ENDSTATE2ACTION $STATE2ACTION(DETECT.FORM_DISCOVERED_VIOL) state=DETECT action=FORM_DISCOVERED_VIOL is_available=1 $ENDSTATE2ACTION $STATE2ACTION(DETECT.FORM_PRN) state=DETECT action=FORM_PRN is_available=1 $ENDSTATE2ACTION $STATE2ACTION(DETECT.FORM_PRN_DET) state=DETECT action=FORM_PRN_DET is_available=1 $ENDSTATE2ACTION $STATE2ACTION(DETECT.FORM_PRN_FILTER) state=DETECT action=FORM_PRN_FILTER is_available=1 $ENDSTATE2ACTION $STATE2ACTION(DETECT.VIOL2REP) state=DETECT action=VIOL2REP is_available=1 $ENDSTATE2ACTION $STATE2ACTION(ED.#AP_SD_VIOL_CHECK) state=ED action=#AP_SD_VIOL_CHECK is_available=0 $ENDSTATE2ACTION $STATE2ACTION(ED.#AP_SREZ_VIOLATIONS_DEL) state=ED action=#AP_SREZ_VIOLATIONS_DEL is_available=0 $ENDSTATE2ACTION $STATE2ACTION(ED.#AP_SD_VIOL2REP_SET) state=ED action=#AP_SD_VIOL2REP_SET is_available=0 $ENDSTATE2ACTION $STATE2ACTION(ED.ACTION1) state=ED action=ACTION1 is_available=0 $ENDSTATE2ACTION $STATE2ACTION(ED.ACTION2) state=ED action=ACTION2 is_available=1 $ENDSTATE2ACTION $STATE2ACTION(ED.ACTION3) state=ED action=ACTION3 is_available=1 $ENDSTATE2ACTION $STATE2ACTION(ED.FORM1) state=ED action=FORM1 is_available=1 $ENDSTATE2ACTION $STATE2ACTION(ED.FORM2) state=ED action=FORM2 is_available=1 $ENDSTATE2ACTION $STATE2ACTION(ED.FORM3) state=ED action=FORM3 is_available=1 $ENDSTATE2ACTION $STATE2ACTION(ED.FORM_CORR/UNCORR_VIOL) state=ED action=FORM_CORR/UNCORR_VIOL is_available=1 $ENDSTATE2ACTION $STATE2ACTION(ED.FORM_DISCOVERED_VIOL) state=ED action=FORM_DISCOVERED_VIOL is_available=1 $ENDSTATE2ACTION $STATE2ACTION(ED.FORM_PRN) state=ED action=FORM_PRN is_available=1 $ENDSTATE2ACTION $STATE2ACTION(ED.FORM_PRN_DET) state=ED action=FORM_PRN_DET is_available=0 $ENDSTATE2ACTION $STATE2ACTION(ED.FORM_PRN_FILTER) state=ED action=FORM_PRN_FILTER is_available=1 $ENDSTATE2ACTION $STATE2ACTION(ED.VIOL2REP) state=ED action=VIOL2REP is_available=1 $ENDSTATE2ACTION $STATE2PROP(BEG.ACTION_STR) state=BEG prop=ACTION_STR enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(BEG.CLEAR_DATE) state=BEG prop=CLEAR_DATE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(BEG.COMMENTARY_1) state=BEG prop=COMMENTARY_1 enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(BEG.COMMIT_DATE) state=BEG prop=COMMIT_DATE enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(BEG.DAYS_QTY) state=BEG prop=DAYS_QTY enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(BEG.DOC_ID) state=BEG prop=DOC_ID enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(BEG.FACT_PROC) state=BEG prop=FACT_PROC enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(BEG.FIND_DATE) state=BEG prop=FIND_DATE enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(BEG.FUND_ID) state=BEG prop=FUND_ID enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(BEG.IS_SET_CORR) state=BEG prop=IS_SET_CORR enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(BEG.IS_SET_DETECT) state=BEG prop=IS_SET_DETECT enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(BEG.IS_SET_UNCORR) state=BEG prop=IS_SET_UNCORR enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(BEG.ITEM_ID) state=BEG prop=ITEM_ID enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(BEG.LIM_ID) state=BEG prop=LIM_ID enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(BEG.MAX_PROC) state=BEG prop=MAX_PROC enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(BEG.MIN_PROC) state=BEG prop=MIN_PROC enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(BEG.ORDER_DATE) state=BEG prop=ORDER_DATE enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(BEG.ORDER_NO) state=BEG prop=ORDER_NO enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(BEG.REP_CORR_ID) state=BEG prop=REP_CORR_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(BEG.REP_CORR_NAME) state=BEG prop=REP_CORR_NAME enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(BEG.REP_DETECT_ID) state=BEG prop=REP_DETECT_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(BEG.REP_DETECT_NAME) state=BEG prop=REP_DETECT_NAME enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(BEG.REP_UNCORR_ID) state=BEG prop=REP_UNCORR_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(BEG.REP_UNCORR_NAME) state=BEG prop=REP_UNCORR_NAME enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(BEG.UNCORR_DATE) state=BEG prop=UNCORR_DATE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(BEG.VIOL_NAME) state=BEG prop=VIOL_NAME enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(BEG.VIOL_TYPE_ID) state=BEG prop=VIOL_TYPE_ID enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(CORR.ACTION_STR) state=CORR prop=ACTION_STR enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(CORR.CLEAR_DATE) state=CORR prop=CLEAR_DATE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CORR.COMMENTARY_1) state=CORR prop=COMMENTARY_1 enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CORR.COMMIT_DATE) state=CORR prop=COMMIT_DATE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CORR.DAYS_QTY) state=CORR prop=DAYS_QTY enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CORR.DOC_ID) state=CORR prop=DOC_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CORR.FACT_PROC) state=CORR prop=FACT_PROC enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CORR.FIND_DATE) state=CORR prop=FIND_DATE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CORR.FUND_ID) state=CORR prop=FUND_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CORR.IS_SET_CORR) state=CORR prop=IS_SET_CORR enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CORR.IS_SET_DETECT) state=CORR prop=IS_SET_DETECT enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CORR.IS_SET_UNCORR) state=CORR prop=IS_SET_UNCORR enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CORR.ITEM_ID) state=CORR prop=ITEM_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CORR.LIM_ID) state=CORR prop=LIM_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CORR.MAX_PROC) state=CORR prop=MAX_PROC enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CORR.MIN_PROC) state=CORR prop=MIN_PROC enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CORR.ORDER_DATE) state=CORR prop=ORDER_DATE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CORR.ORDER_NO) state=CORR prop=ORDER_NO enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CORR.REP_CORR_ID) state=CORR prop=REP_CORR_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CORR.REP_CORR_NAME) state=CORR prop=REP_CORR_NAME enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CORR.REP_DETECT_ID) state=CORR prop=REP_DETECT_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CORR.REP_DETECT_NAME) state=CORR prop=REP_DETECT_NAME enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CORR.REP_UNCORR_ID) state=CORR prop=REP_UNCORR_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CORR.REP_UNCORR_NAME) state=CORR prop=REP_UNCORR_NAME enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CORR.UNCORR_DATE) state=CORR prop=UNCORR_DATE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CORR.VIOL_NAME) state=CORR prop=VIOL_NAME enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CORR.VIOL_TYPE_ID) state=CORR prop=VIOL_TYPE_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DETECT.ACTION_STR) state=DETECT prop=ACTION_STR enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(DETECT.CLEAR_DATE) state=DETECT prop=CLEAR_DATE enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(DETECT.COMMENTARY_1) state=DETECT prop=COMMENTARY_1 enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(DETECT.COMMIT_DATE) state=DETECT prop=COMMIT_DATE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DETECT.DAYS_QTY) state=DETECT prop=DAYS_QTY enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(DETECT.DOC_ID) state=DETECT prop=DOC_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DETECT.FACT_PROC) state=DETECT prop=FACT_PROC enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DETECT.FIND_DATE) state=DETECT prop=FIND_DATE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DETECT.FUND_ID) state=DETECT prop=FUND_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DETECT.IS_SET_CORR) state=DETECT prop=IS_SET_CORR enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DETECT.IS_SET_DETECT) state=DETECT prop=IS_SET_DETECT enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DETECT.IS_SET_UNCORR) state=DETECT prop=IS_SET_UNCORR enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DETECT.ITEM_ID) state=DETECT prop=ITEM_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DETECT.LIM_ID) state=DETECT prop=LIM_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DETECT.MAX_PROC) state=DETECT prop=MAX_PROC enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DETECT.MIN_PROC) state=DETECT prop=MIN_PROC enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DETECT.ORDER_DATE) state=DETECT prop=ORDER_DATE enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(DETECT.ORDER_NO) state=DETECT prop=ORDER_NO enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(DETECT.REP_CORR_ID) state=DETECT prop=REP_CORR_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DETECT.REP_CORR_NAME) state=DETECT prop=REP_CORR_NAME enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DETECT.REP_DETECT_ID) state=DETECT prop=REP_DETECT_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DETECT.REP_DETECT_NAME) state=DETECT prop=REP_DETECT_NAME enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DETECT.REP_UNCORR_ID) state=DETECT prop=REP_UNCORR_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DETECT.REP_UNCORR_NAME) state=DETECT prop=REP_UNCORR_NAME enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DETECT.UNCORR_DATE) state=DETECT prop=UNCORR_DATE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DETECT.VIOL_NAME) state=DETECT prop=VIOL_NAME enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DETECT.VIOL_TYPE_ID) state=DETECT prop=VIOL_TYPE_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(ED.ACTION_STR) state=ED prop=ACTION_STR enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(ED.CLEAR_DATE) state=ED prop=CLEAR_DATE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(ED.COMMENTARY_1) state=ED prop=COMMENTARY_1 enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(ED.COMMIT_DATE) state=ED prop=COMMIT_DATE enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(ED.DAYS_QTY) state=ED prop=DAYS_QTY enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(ED.DOC_ID) state=ED prop=DOC_ID enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(ED.FACT_PROC) state=ED prop=FACT_PROC enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(ED.FIND_DATE) state=ED prop=FIND_DATE enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(ED.FUND_ID) state=ED prop=FUND_ID enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(ED.IS_SET_CORR) state=ED prop=IS_SET_CORR enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(ED.IS_SET_DETECT) state=ED prop=IS_SET_DETECT enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(ED.IS_SET_UNCORR) state=ED prop=IS_SET_UNCORR enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(ED.ITEM_ID) state=ED prop=ITEM_ID enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(ED.LIM_ID) state=ED prop=LIM_ID enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(ED.MAX_PROC) state=ED prop=MAX_PROC enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(ED.MIN_PROC) state=ED prop=MIN_PROC enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(ED.ORDER_DATE) state=ED prop=ORDER_DATE enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(ED.ORDER_NO) state=ED prop=ORDER_NO enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(ED.REP_CORR_ID) state=ED prop=REP_CORR_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(ED.REP_CORR_NAME) state=ED prop=REP_CORR_NAME enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(ED.REP_DETECT_ID) state=ED prop=REP_DETECT_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(ED.REP_DETECT_NAME) state=ED prop=REP_DETECT_NAME enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(ED.REP_UNCORR_ID) state=ED prop=REP_UNCORR_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(ED.REP_UNCORR_NAME) state=ED prop=REP_UNCORR_NAME enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(ED.UNCORR_DATE) state=ED prop=UNCORR_DATE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(ED.VIOL_NAME) state=ED prop=VIOL_NAME enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(ED.VIOL_TYPE_ID) state=ED prop=VIOL_TYPE_ID enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $ENDDOC