# Date: 17/07/06 # Version: 105 $DOC(SD_BROK_SALE) name=Сделка продажи ЦБ на бирже class=1 product=ALD_FUND name_formula=$TEXT(12214225) 'Продажа ЦБ на бирже: сделка №'+@transaction_no+' от '+.DATE_TO_STR(@transaction_date) +' док.№'+@in_no+': '+.ITEM_NAME(@stock_id)+','+.TO_STR(@stock_qty)+'шт,'+.TO_STR(@summ_doc_total)+.CUR_CODE(@cur_id) $ENDTEXT(12214225) remark_formula=$TEXT(12214225) 'Продажа ЦБ на бирже: сделка №'+@transaction_no+' от '+.DATE_TO_STR(@transaction_date) +' док.№'+@in_no+': '+.ITEM_NAME(@stock_id)+','+.TO_STR(@stock_qty)+'шт,'+.TO_STR(@summ_doc_total)+.CUR_CODE(@cur_id) $ENDTEXT(12214225) $STATE(CRT) name=Проведен class=0 $ENDSTATE $STATE(DEL) name=Удален class=2 $ENDSTATE $STATE(EDIT) name=Редактируется class=0 $ENDSTATE $STATE(NEW) name=Начальный class=1 $ENDSTATE $PROP(SALE_PLACE_ID) name=Площадка field_name=sale_place_id table_name=tb_baysale_docitems field_type=numeric field_length=9 field_scale=0 field_prec=18 page=1 order=1 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(TRANSACTION_NO) name=Номер сделки field_name=transaction_no table_name=tb_baysale_docitems field_type=varchar field_length=80 field_scale=null field_prec=null 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(STOCK_ID) name=ЦБ field_name=stock_id table_name=tb_baysale_docitems 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(STOCK_PRICE) name=Цена field_name=stock_price table_name=tb_baysale_docitems field_type=decimal field_length=9 field_scale=6 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(STOCK_QTY) name=Количество field_name=stock_qty table_name=tb_baysale_docitems field_type=money field_length=8 field_scale=null field_prec=null 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(SUMM_DOC_TOTAL) name=Сумма в валюте сделки field_name=summ_doc_total table_name=tb_baysale_docitems field_type=money field_length=8 field_scale=null field_prec=null 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(CUR_ID) name=Валюта сделки field_name=cur_id table_name=tb_baysale_docitems field_type=numeric field_length=9 field_scale=0 field_prec=18 page=1 order=8 init_class=1 init_formula=.CUR('RUR') 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(PAY_CUR_ID) name=Валюта платежа field_name=pay_cur_id table_name=tb_baysale_docitems field_type=numeric field_length=9 field_scale=0 field_prec=18 page=1 order=9 init_class=1 init_formula=.CUR('RUR') 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(DIRECTION_ID) name=Брокерский договор field_name=direction_id table_name=tb_baysale_docitems field_type=numeric field_length=9 field_scale=0 field_prec=18 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(ORGANISATION_ID) name=Брокер field_name=organisation_id table_name=tb_baysale_docitems field_type=numeric field_length=9 field_scale=0 field_prec=18 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(CUR_PRICE2PAY_RATE) name=Курс валюты цены к валюте платежа field_name=cur_price2pay_rate table_name=tb_baysale_docitems field_type=decimal field_length=9 field_scale=8 field_prec=18 page=1 order=12 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 $PROP(RATE_DATE) name=Дата курса field_name=rate_date table_name=tb_baysale_docitems field_type=datetime field_length=8 field_scale=null field_prec=null page=1 order=13 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 $PROP(SUM_IN_PAYCUR) name=Сумма в валюте платежа field_name=sum_in_paycur table_name=tb_baysale_docitems field_type=money field_length=8 field_scale=null field_prec=null page=1 order=14 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 $PROP(COUPON_DEAL_SUM) name=ПНКД в валюте сделки field_name=coupon_deal_sum table_name=tb_baysale_docitems field_type=money field_length=8 field_scale=null field_prec=null page=1 order=15 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 $PROP(COUPON_ACCOUNT_SUM) name=ПНКД в валюте платежа field_name=coupon_account_sum table_name=tb_baysale_docitems field_type=money field_length=8 field_scale=null field_prec=null page=1 order=16 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 $PROP(TRANSACTION_DATE) name=Дата сделки field_name=transaction_date table_name=tb_baysale_docitems field_type=datetime field_length=8 field_scale=null field_prec=null page=1 order=3 init_class=1 init_formula=.OPERDAY 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(MODE_ID) name=Код способа расчетов по сделке field_name=mode_id table_name=tb_baysale_docitems field_type=numeric field_length=9 field_scale=0 field_prec=18 page=1 order=17 init_class=1 init_formula=3 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_COUPON_IN_SUM) name=ПНКД в том числе field_name=is_coupon_in_sum table_name=tb_baysale_docitems field_type=int field_length=4 field_scale=null field_prec=null page=1 order=18 init_class=1 init_formula=0 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(COMM_TS) name=Комиссия биржи field_name=comm_ts table_name=tb_baysale_docitems field_type=money field_length=8 field_scale=null field_prec=null page=1 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(COMM_BROK) name=Комиссия брокера field_name=comm_brok table_name=tb_baysale_docitems field_type=money field_length=8 field_scale=null field_prec=null page=1 order=27 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(COMM_DEPO) name=Комиссия Депо field_name=comm_depo table_name=tb_baysale_docitems field_type=money field_length=8 field_scale=null field_prec=null page=1 order=28 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(TRANSACTION_TIME) name=Время сделки field_name=transaction_time table_name=tb_baysale_docitems field_type=datetime field_length=8 field_scale=null field_prec=null page=1 order=29 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_COMM_IN_SUM) name=Комиссии в сумме field_name=is_comm_in_sum table_name=tb_baysale_docitems field_type=int field_length=4 field_scale=null field_prec=null page=1 order=30 init_class=1 init_formula=0 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(IN_DATE) name=Дата регистрации field_name=in_date table_name=td_depo_docs field_type=datetime field_length=8 field_scale=null field_prec=null page=1 order=20 init_class=1 init_formula=.OPERDAY 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(IN_NO) name=Номер регистрации field_name=in_no table_name=td_depo_docs field_type=varchar field_length=50 field_scale=null field_prec=null 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(INITIATOR_ID) name=УК НПФ field_name=initiator_id table_name=td_depo_docs field_type=numeric field_length=9 field_scale=0 field_prec=18 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(DEPO_DOC_TYPE) name=Входящий исходящий field_name=depo_doc_type table_name=td_depo_docs field_type=int field_length=4 field_scale=null field_prec=null page=1 order=23 init_class=1 init_formula=1 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_COMMENT) name=Комментарий field_name=doc_comment table_name=td_depo_docs field_type=varchar field_length=255 field_scale=null field_prec=null page=1 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(FOUNDATION_ID) name=Отчет брокера (группа сделок) field_name=foundation_id table_name=td_depo_docs field_type=numeric field_length=9 field_scale=0 field_prec=18 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(OWNER_ID) name=Фонд field_name=owner_id table_name=td_depo_docs field_type=numeric field_length=9 field_scale=0 field_prec=18 page=1 order=25 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 $RELATION(REL1) class=0 type=FUND_GROUP form=null prop=OWNER_ID idname=null order=60 $ENDRELATION $RELATION(REL2) class=1 type=t_operations form=item_opers_list prop=null idname=item_id_s order=110 $ENDRELATION $RELATION(REL4) class=0 type=partners form=null prop=ORGANISATION_ID idname=null order=40 $ENDRELATION $RELATION(REL3) class=0 type=partners form=null prop=INITIATOR_ID idname=null order=50 $ENDRELATION $RELATION(REL5) class=0 type=items form=null prop=DIRECTION_ID idname=null order=30 $ENDRELATION $RELATION(REL6) class=0 type=items form=null prop=FOUNDATION_ID idname=null order=70 $ENDRELATION $RELATION(REL7) class=1 type=actions_history form=uo_actions_history_list prop=null idname=doc_id_s order=200 $ENDRELATION $RELATION(REL11) class=1 type=ASSETS2ITEMS form=D_ASSETS2ITEMS_LIST prop=null idname=docitem_id_s order=105 $ENDRELATION $RELATION(REL8) class=0 type=td_stock_emis form=null prop=STOCK_ID idname=null order=20 $ENDRELATION $RELATION(REL9) class=0 type=rate_places form=null prop=SALE_PLACE_ID idname=null order=10 $ENDRELATION $RELATION(REL10) class=1 type=SD_INDOC2DOC form=FORM2 prop=null idname=doc_id_s order=100 $ENDRELATION $FORM(D_ASSETS2ITEMS_EDIT_BROK) name=Список для привязки партий class=5 filter=null target_state= uo=uo_assets2items dw=d_assets2items_edit procedure=ap_61095000000098840 patterns=null user_define=1 isvisible=1 istab=0 posx=0 posy=0 width=0 height=0 proc_text=$TEXT(12214230) create procedure dbo.%PROC% @sid varchar(30) = null as declare @id numeric, @action_id numeric, @user_id numeric, @state_id numeric, @type_id numeric begin select @action_id = %ACTION_ID% select @id = convert(numeric, @sid) .CHECK_USER /* assets2items */ /* delete t_items from t_pays2items where t_pays2items.id = t_items.id and t_pays2items.docitem_id = @id and .ITEMS_EXISTS_BY_TYPE(t_pays2items.id,'assets2items') delete t_pays2items where t_pays2items.docitem_id = @id and .ITEMS_EXISTS_BY_TYPE(t_pays2items.id,'assets2items') */ .GET_PROPS declare @fund_type_code varchar(255) declare @subc3_type_id numeric declare @subc3_item_id numeric declare @fund_plan_id numeric declare @operday datetime declare @stock_account_id numeric select @foundation_id=isnull(@foundation_id,@id) .GET_SD_OPER_DATE(@operday,@foundation_id) if @owner_id is null .EXIT_MESSAGE('Не задан фонд') select @fund_type_code = .ITEM_TYPE_CODE(@owner_id) select @fund_type_code = lower(@fund_type_code) if @fund_type_code = 'pif_fund' begin select @fund_plan_id = .ARG_PLAN('PIF_ACCOUNT') end else if @fund_type_code = 'npf_fund' begin select @fund_plan_id = .ARG_PLAN('NPF_ACCOUNT') end select @stock_account_id = .SD_ACCID_FROM_EFFNO(@fund_plan_id,'58.1') if @fund_type_code = 'pif_fund' begin select @subc3_type_id = .SUBCTYPE_FROM_CODE('stock_emis') select @subc3_item_id = @stock_id end else begin select @subc3_type_id = .SUBCTYPE_FROM_CODE('asset_manager') select @subc3_item_id = isnull(@initiator_id, @owner_id) end .TOTALS_QUERY_SUB(@owner_id,@fund_plan_id,@operday,@operday,@stock_account_id,'stock_emis',@stock_id,'doc_item',N,(.FROM_SUBC3),(.WHERE_SUBC3(@subc3_type_id,@subc3_item_id)),L,N,Y,N,Y) /* Delete not existed */ delete t_items from t_pays2items where t_pays2items.id = t_items.id and t_pays2items.docitem_id = @id and t_pays2items.paydoc_id not in (select o.subc2_id from #tmp_oss o ) and .ITEMS_EXISTS_BY_TYPE(t_pays2items.id,'assets2items') delete t_pays2items where t_pays2items.docitem_id = @id and t_pays2items.paydoc_id not in (select o.subc2_id from #tmp_oss o ) and .ITEMS_EXISTS_BY_TYPE(t_pays2items.id,'assets2items') /*-------*/ select @sid as sid, convert(decimal(18,4), @stock_qty) as stock_qty, t_types.type_name, d.in_no, d.in_date, convert(varchar(30), o.subc2_id) as part_id_s, convert(decimal(18,4), o.saldo_de) as part_sum, convert(decimal(18,4), o.q_saldo_de) as part_qty, convert(decimal(18,4), (o.saldo_de / o.q_saldo_de)) as part_price, convert(decimal(18,4),(select min(p.covered_sum) from t_pays2items p where p.docitem_id = @id and p.paydoc_id = o.subc2_id and .ITEMS_EXISTS_BY_TYPE(p.id,'assets2items')) ) as calc_sum from #tmp_oss o, td_depo_docs d, t_items, t_types where o.subc2_id = d.id and o.q_saldo_de > 0 and o.subc2_id = t_items.id and t_items.type_id = t_types.id order by d.in_date, d.in_no end $ENDTEXT(12214230) $ENDFORM $FORM(FORM1) name=Просмотр class=5 filter=null target_state= uo=uo_edit dw=d_sd_brok_sale_edit procedure=ap_61095000000098841 patterns=GENERIC_VIEW_ITEM user_define=1 isvisible=0 istab=1 posx=0 posy=0 width=3255 height=1816 proc_text=$TEXT(12214230) create procedure dbo.%PROC% @sid varchar(30) = null, @foundation_id_s varchar(30) = null as .BEGIN('N') .CHECK_USER .CHECK_VIEW_ITEM if @id = -1 begin begin tran .GET_PROPS .CHECK_INSERT .INIT_VARS(B) if isnull(@foundation_id_s,'')<>'' begin select @foundation_id=convert(numeric, @foundation_id_s) select @owner_id=fund_id, @initiator_id=uk_id, @organisation_id=brok_id, @direction_id=brok_dog_id from t_sd_brok_rep where id=@foundation_id end .INSERT_ITEMS .INSERT commit tran end .INSERT_INFO4OPER(@id) .VIEW_ITEM .END $ENDTEXT(12214230) $ACTION2RELATION(REL5.ITEM_NAME) relation=REL5 where=null prop=ITEM_NAME order=null alias=broker_dog_name $ENDACTION2RELATION $ACTION2RELATION(REL4.PARTNER_CODE) relation=REL4 where=null prop=PARTNER_CODE order=20 alias=org_code $ENDACTION2RELATION $ACTION2RELATION(REL4.PARTNER_SHORT_NAME) relation=REL4 where=null prop=PARTNER_SHORT_NAME order=21 alias=org_short_name $ENDACTION2RELATION $ACTION2RELATION(REL3.PARTNER_CODE) relation=REL3 where=null prop=PARTNER_CODE order=null alias=initiator_code $ENDACTION2RELATION $ACTION2RELATION(REL1.CTRL_COMP_ID) relation=REL1 where=null prop=CTRL_COMP_ID order=3 alias=ctrl_comp_id_s $ENDACTION2RELATION $ACTION2RELATION(REL1.PARTNER_CODE) relation=REL1 where=null prop=PARTNER_CODE order=4 alias=fond_code $ENDACTION2RELATION $ACTION2RELATION(REL6.ITEM_NAME) relation=REL6 where=null prop=ITEM_NAME order=null alias=rep_name $ENDACTION2RELATION $ACTION2RELATION(REL9.PLACE_NAME) relation=REL9 where=null prop=PLACE_NAME order=null alias=place_name $ENDACTION2RELATION $ACTION2RELATION(REL8.STOCK_CODE) relation=REL8 where=null prop=STOCK_CODE order=37 alias=stock_code $ENDACTION2RELATION $ACTION2RELATION(REL8.STOCK_NOMINAL) relation=REL8 where=null prop=STOCK_NOMINAL order=38 alias=stock_nominal $ENDACTION2RELATION $ACTION2RELATION(REL8.STOCK_CURR_ID) relation=REL8 where=null prop=STOCK_CURR_ID order=39 alias=stock_curr_id $ENDACTION2RELATION $BIND(BIND1) type=SD_INFO4OPER action=FORM_ED class=1 order=null idname=sid $ENDBIND $FILTER(FOUNDATION_ID) type=11 label=Отчет брокера prop=FOUNDATION_ID arg_code=null arg_type=null arg_length=null arg_prec=null arg_scale=null $ENDFILTER $ENDFORM $ACTION(ACTION1) name=Добавить class=1 form=FORM1 target_state=EDIT procedure=ap_61095000000098851 patterns=GENERIC_INSERT user_define=1 isvisible=0 istab=1 posx=0 posy=0 width=3259 height=1816 proc_text=$TEXT(12214231) create procedure dbo.%PROC% @sid varchar(30) = null, .ARGLIST as .BEGIN('N') .CHECK_USER .CHECK_UPDATE .ARGCONVERT .INIT_VARS .FUND_GEN_NO(@in_no,@depo_doc_type,@in_date) .TEST_UNIQUE .SD_BROK_CHECK begin tran .UPDATE_ITEMS .UPDATE .RELGEN .UPDATE_STATE .ACTION_HISTORY commit tran select sid = convert(varchar, @id) .END $ENDTEXT(12214231) $BIND(BIND1) type=SD_INFO4OPER action=ACTION_UPDATE class=1 order=null idname=sid $ENDBIND $ENDACTION $ACTION(ACTION15) name=Изменить привязку к партиям class=2 form=D_ASSETS2ITEMS_EDIT_BROK target_state=null procedure=ap_61095000000098853 patterns=null user_define=0 isvisible=0 istab=0 posx=0 posy=0 width=0 height=0 proc_text=$TEXT(12214231) create procedure dbo.%PROC% @sid varchar(30) = null, @part_id_s varchar(30), @calc_sum varchar(30) as declare @action_id numeric, @id numeric, @user_id numeric, @state_id numeric, @type_id numeric, @item_name varchar(100), @new_state_id numeric begin begin tran declare @docitem_id numeric declare @paydoc_id numeric declare @covered_sum money select @action_id = %ACTION_ID% select @docitem_id = convert(numeric, @sid) select @paydoc_id = convert(numeric, @part_id_s) select @covered_sum = convert(decimal(18,4), @calc_sum) select @covered_sum = isnull(@covered_sum, 0) .CHECK_USER if not exists( select 1 from t_pays2items where t_pays2items.docitem_id = @docitem_id and t_pays2items.paydoc_id = @paydoc_id and .ITEMS_EXISTS_BY_TYPE(t_pays2items.id,'assets2items') ) begin if @covered_sum > 0 begin .TYPE_INIT('assets2items') .TYPE_ASSIGN(docitem_id, @docitem_id) .TYPE_ASSIGN(paydoc_id, @paydoc_id) .TYPE_ASSIGN(covered_sum, @covered_sum) .TYPE_INSERT('assets2items', 'CRT') end end else begin if @covered_sum > 0 update t_pays2items set covered_sum = @covered_sum where docitem_id = @docitem_id and paydoc_id = @paydoc_id and .ITEMS_EXISTS_BY_TYPE(t_pays2items.id,'assets2items') else begin delete t_items from t_pays2items where t_pays2items.id = t_items.id and t_pays2items.docitem_id = @docitem_id and paydoc_id = @paydoc_id and .ITEMS_EXISTS_BY_TYPE(t_pays2items.id,'assets2items') delete t_pays2items where t_pays2items.docitem_id = @docitem_id and paydoc_id = @paydoc_id and .ITEMS_EXISTS_BY_TYPE(t_pays2items.id,'assets2items') end end commit tran select sid = convert(varchar, @id) end $ENDTEXT(12214231) $ENDACTION $ACTION(ACTION2) name=Изменить class=2 form=FORM1 target_state=null procedure=ap_61095000000098854 patterns=GENERIC_UPDATE user_define=0 isvisible=0 istab=1 posx=0 posy=0 width=3250 height=1808 proc_text=$TEXT(12214231) create procedure dbo.%PROC% @sid varchar(30) = null, .ARGLIST as .BEGIN('N') .CHECK_USER .CHECK_UPDATE .ARGCONVERT .TEST_UNIQUE .SD_BROK_CHECK begin tran .UPDATE_ITEMS .UPDATE .RELGEN .UPDATE_STATE .ACTION_HISTORY commit tran .END $ENDTEXT(12214231) $BIND(BIND1) type=SD_INFO4OPER action=ACTION_UPDATE class=1 order=null idname=sid $ENDBIND $ENDACTION $ACTION(SD_BROK_OUT_DEL) name=Удалить class=9 form=null target_state=DEL procedure=ap_61095000000098858 patterns=GENERIC_MOVE user_define=0 isvisible=0 istab=0 posx=0 posy=0 width=0 height=0 proc_text=$TEXT(12214231) create procedure dbo.%PROC% @sid varchar(30) = null as .BEGIN('N') .CHECK_USER .CHECK_UPDATE begin tran .UPDATE_STATE .ACTION_HISTORY commit tran .END $ENDTEXT(12214231) $ENDACTION $ACTION(SD_BROK_OUT_OPS) name=Провести class=9 form=null target_state=CRT procedure=ap_61095000000098859 patterns=GENERIC_MOVE user_define=1 isvisible=0 istab=0 posx=0 posy=0 width=0 height=0 proc_text=$TEXT(12214231) create procedure dbo.%PROC% @sid varchar(30) = null as .BEGIN('N') .CHECK_USER .CHECK_UPDATE declare @oper_date datetime, @stock_oper_sum money, @stock_add_sum money, @coupon_oper_sum money, @coupon_add_sum money, @comm_oper_sum money, @coupon_bal_sum_total money, @coupon_bal_sum_lf money, @coupon_qty_sum_lf money, @coupon_saldo_qty money, @qty_saldo money, @comis_bal_sum money, @overv_sum money, @fund_type_code varchar(255), @doc_name varchar(255), @oper_doc_name varchar(255), @contr_id numeric(18,0), @asset_manager_id numeric(18,0), @stock_price_cur_id numeric(18,0), @fund_plan_id numeric(18,0), @acc48_id numeric(18,0), @deb_comis_id numeric(18,0), @coupon_acc_id numeric(18,0), @pol_coupon_acc_id numeric(18,0), @contr_account_id numeric(18,0), @add_account_id numeric(18,0), @add_nkd_id numeric(18,0), @stock_account_id numeric(18,0), @doc_method_id numeric(18,0), @dates4oper_id numeric(18,0), @comis5810_id numeric(18,0), @acc5811_id numeric(18,0), @comis_deb_id numeric(18,0), @comis_acc_id numeric(18,0), @all_overv_sum money, @all_comis_sum money declare @subc_str varchar(255), @subc1_type_id numeric(18,0), @subc3_type_id numeric(18,0), @subc3_item_id numeric(18,0) declare @op_time_rep datetime, @assent_date_rep datetime, @reg_date_rep datetime, @is_fixed_rep int, @is_assent_rep int, @j_sum money declare @sd_scha_2005_d datetime select @sd_scha_2005_d= convert(datetime,(.GET_CONST('SD_SCHA_2005')),3) .GET_PROPS select @doc_name=.ITEM_NAME(@id) select @dates4oper_id=@id .GET_SD_OPER_DATE(@oper_date,@dates4oper_id) if @foundation_id is not null begin if .ITEM_STATE_CODE(@foundation_id) <> 'SET' .EXIT_MESSAGE('Отчет брокера должен находиться в статусе Принят') .TYPE_GET('SD_BROK_REP',@foundation_id,1) if @brok_id1 <> @organisation_id .EXIT_MESSAGE_PARM('Брокер в отчете не соответствует брокеру в сделке',@doc_name) if @fund_id1 <> @owner_id and @fund_id1 is not null .EXIT_MESSAGE_PARM('Фонд в отчете не соответствует фонду в сделке',@doc_name) if isnull(@uk_id1,0) <> isnull(@initiator_id,0) and @fund_id1 is not null .EXIT_MESSAGE_PARM('УК НПФ в отчете не соответствует УК НПФ в сделке',@doc_name) if @rep_oper_type1 = 0 select @dates4oper_id=@foundation_id end select @doc_name=.ITEM_NAME(@id) select @fund_type_code=upper(.ITEM_TYPE_CODE(@owner_id)) ------------------- -- Счета ------------------- if @fund_type_code = 'PIF_FUND' begin select @fund_plan_id = .ARG_PLAN('PIF_ACCOUNT') select @acc48_id = .SD_ACCID_FROM_EFFNO(@fund_plan_id,'48') select @coupon_acc_id = .SD_ACCID_FROM_EFFNO(@fund_plan_id,'76.6') select @pol_coupon_acc_id = .SD_ACCID_FROM_EFFNO(@fund_plan_id,'76.7') select @contr_account_id = .SD_ACCID_FROM_EFFNO(@fund_plan_id,'76.5.4') select @add_account_id = .SD_ACCID_FROM_EFFNO(@fund_plan_id,'96.3.1') end if @fund_type_code = 'NPF_FUND' begin select @fund_plan_id = .ARG_PLAN('NPF_ACCOUNT') select @asset_manager_id = isnull(@initiator_id,@owner_id) select @acc48_id = .SD_ACCID_FROM_EFFNO(@fund_plan_id,'48') select @coupon_acc_id = .SD_ACCID_FROM_EFFNO(@fund_plan_id,'76.6') select @pol_coupon_acc_id = .SD_ACCID_FROM_EFFNO(@fund_plan_id,'76.7') if @owner_id = @asset_manager_id /* При размещении НПФ*/ begin select @add_account_id = .SD_ACCID_FROM_EFFNO(@fund_plan_id,'80.2') select @contr_account_id = .SD_ACCID_FROM_EFFNO(@fund_plan_id,'76.4') end else /* При размещении УК*/ begin select @add_account_id = .SD_ACCID_FROM_EFFNO(@fund_plan_id,'80.1') select @contr_account_id = .SD_ACCID_FROM_EFFNO(@fund_plan_id,'76.5') end end select @stock_account_id=.SD_ACCID_FROM_EFFNO(@fund_plan_id,'58.1') -- контрагент select @contr_id=@organisation_id -- метод списания --select @doc_method_id = isnull(@stock_out_method_id,(select out_method_id from td_pay_fond where id = @owner_id)) select @doc_method_id = (select out_method_id from td_pay_fond where id = @owner_id) if @doc_method_id is null .EXIT_MESSAGE('Не задан метод списания ЦБ') -- суммы в проводки select @stock_price_cur_id=@pay_cur_id select @stock_oper_sum=@sum_in_paycur select @coupon_oper_sum=isnull(@coupon_account_sum,0) select @comm_oper_sum=isnull(@comm_brok,0)+isnull(@comm_depo,0)+isnull(@comm_ts,0) if isnull(@is_comm_in_sum,0) = 1 select @stock_oper_sum=@stock_oper_sum - @comm_oper_sum /* - isnull(@comm_other,0) */ if @is_coupon_in_sum = 1 select @stock_oper_sum=@stock_oper_sum - @coupon_oper_sum select @coupon_bal_sum_total = 0 ------------------------------------------------ -- Проверка количества ЦБ на балансе ------------------------------------------------ if @fund_type_code = 'PIF_FUND' begin .SALDO_FAST(@owner_id,@fund_plan_id,@oper_date,@stock_account_id,D,Y,'stock_emis',@stock_id,N,N,N,@qty_saldo) end if @fund_type_code = 'NPF_FUND' begin .SALDO_FAST(@owner_id,@fund_plan_id,@oper_date,@stock_account_id,D,Y,'stock_emis',@stock_id,'asset_manager',@asset_manager_id,N,@qty_saldo) end if isnull(@qty_saldo,0) < @stock_qty begin .EXIT_MESSAGE('Не хватает ценных бумаг на счете 58.1 бухгалтерского учета фонда') end ------------------------------------------------------------------------- -- Получение данных по остаткам в разрезе документов поступления (партий) ------------------------------------------------------------------------- .TRANSACTION_SAVE select @subc_str='' .SUBC_STR_ADD(@subc_str,'stock_emis',@stock_id,Y) if @fund_type_code = 'PIF_FUND' begin select @subc3_type_id=.SUBCTYPE_FROM_CODE('stock_emis') select @subc3_item_id=@stock_id end if @fund_type_code = 'NPF_FUND' begin .SUBC_STR_ADD(@subc_str,'asset_manager',@asset_manager_id,Y) select @subc3_type_id=.SUBCTYPE_FROM_CODE('asset_manager') select @subc3_item_id=@asset_manager_id end select @subc1_type_id=.SUBCTYPE_FROM_CODE('doc_item') .LIFO_FIFO_EXEC(#query,0,@owner_id,@fund_plan_id,@stock_account_id,@oper_date,@oper_date,@subc1_type_id,@subc_str) if isnull((select count(*) from #query_grp),0)=0 begin drop table #query_grp drop table #query_ops .TRANSACTION_RESTORE .EXIT_MESSAGE('Не выдана разбивка по документам') end -- по остаткам по УНКД .LIFO_FIFO_EXEC(#tmp_coupon,0,@owner_id,@fund_plan_id,@coupon_acc_id,@oper_date,@oper_date,@subc1_type_id,@subc_str) -- по расходам на приобретение ЦБ (58.10) --.LIFO_FIFO_EXEC(#tmp_comis,0,@owner_id,@fund_plan_id,@comis_acc_id,@oper_date,@oper_date,@subc1_type_id,@subc_str) -- по переоценке ЦБ (58.11) --.LIFO_FIFO_EXEC(#tmp_overv,0,@owner_id,@fund_plan_id,@acc5811_id,@oper_date,@oper_date,@subc1_type_id,@subc_str) ----------- -- Проводки ----------- begin tran .UPDATE_STATE .ACTION_HISTORY -------------------------------- -- Проводки списания (lifo-fifo) -------------------------------- --+ .LIFO_FIFO_BEGIN(#query,@doc_method_id,@stock_qty,@id) select @oper_doc_name='Списание балансовой стоимости ЦБ по партии: '+.ITEM_NAME(@subc2_id_lf) .OPERATION(@owner_id,@fund_plan_id,@oper_date,@acc48_id,@stock_account_id,@op_sum_lf,@stock_price_cur_id,@oper_date,@op_qty_lf,@op_qty_lf,@oper_doc_name,N) .UPDATE_SUBC(K,'stock_emis',@stock_id) .UPDATE_SUBC(К,'doc_item',@subc2_id_lf) if @fund_type_code = 'NPF_FUND' begin .UPDATE_SUBC(D,'asset_manager',@asset_manager_id) .UPDATE_SUBC(K,'asset_manager',@asset_manager_id) end .SUBC_CHECK -------- --+ -- Списание УНКД (если существует такая же партия на 76.6) if exists(select 1 from #tmp_coupon_grp o where o.sub_id = @subc2_id_lf) begin select @coupon_bal_sum_lf=o.saldo_bal, -- сумма по текущей партии по 76.6 @coupon_saldo_qty=o.saldo_qty -- кол-во по текущей партии по 76.6 from #tmp_coupon_grp o where o.sub_id = @subc2_id_lf select @coupon_qty_sum_lf=@q_saldo_lf -- кол-во для проводки = кол-во по текущей партии по 58.1 -- если кол-во по текущей партии по 58.1 > списанного кол-ва по текущей партии с 58.1 if @coupon_qty_sum_lf > @op_qty_lf begin -- сумма для проводки = пропорционально кол-ву, списанному по текущей партии с 58.1 select @coupon_bal_sum_lf = .ROUND_MONEY(((convert(double precision,@coupon_bal_sum_lf)/convert(double precision,@coupon_qty_sum_lf)) * @op_qty_lf),2) -- количество для проводки = кол-ву, списанному по текущей партии с 58.1 select @coupon_qty_sum_lf = @op_qty_lf end -- если списанное кол-во по текущей партии с 58.1 > кол-ва по текущей партии по 76.6 if @coupon_qty_sum_lf > @coupon_saldo_qty select @coupon_qty_sum_lf = @coupon_saldo_qty -- количество для проводки = кол-ву по текущей партии 76.6 select @oper_doc_name='Списание УНКД по партии: '+.ITEM_NAME(@subc2_id_lf) .OPERATION(@owner_id,@fund_plan_id,@oper_date,@pol_coupon_acc_id,@coupon_acc_id,@coupon_bal_sum_lf,@stock_price_cur_id,@oper_date,0,@coupon_qty_sum_lf,@oper_doc_name,N) .UPDATE_SUBC(D,'stock_emis',@stock_id) .UPDATE_SUBC(K,'stock_emis',@stock_id) .UPDATE_SUBC(К,'doc_item',@subc2_id_lf) if @fund_type_code = 'NPF_FUND' begin .UPDATE_SUBC(K,'asset_manager',@asset_manager_id) .UPDATE_SUBC(D,'asset_manager',@asset_manager_id) end .SUBC_CHECK end .LIFO_FIFO_END ---------------------------- -- Проводки по задолженности ---------------------------- -- задолженность покупателя select @oper_doc_name='Реализация ЦБ по биржевой сделке: '+@doc_name .OPERATION(@owner_id,@fund_plan_id,@oper_date,@contr_account_id,@acc48_id,@stock_oper_sum,@stock_price_cur_id,@oper_date,0,@stock_qty,@oper_doc_name,N) if @fund_type_code = 'NPF_FUND' begin if @asset_manager_id=@owner_id begin .UPDATE_SUBC(D,'partners',@contr_id) end else begin .UPDATE_SUBC(D,'partners_cont',@contr_id) .UPDATE_SUBC(D,'partners',@asset_manager_id) end .UPDATE_SUBC(K,'asset_manager',@asset_manager_id) end else begin .UPDATE_SUBC(D,'partners',@contr_id) end .SUBC_CHECK -- отражение ПНКД в случае его наличия if @coupon_oper_sum <> 0 begin select @oper_doc_name='Отражение ПНКД по биржевой сделке: '+@doc_name .OPERATION(@owner_id,@fund_plan_id,@oper_date,@contr_account_id,@pol_coupon_acc_id,@coupon_oper_sum,@stock_price_cur_id,@oper_date,0,0,@oper_doc_name,N) .UPDATE_SUBC(K,'stock_emis',@stock_id) if @fund_type_code = 'NPF_FUND' begin if @asset_manager_id=@owner_id begin .UPDATE_SUBC(D,'partners',@contr_id) end else begin .UPDATE_SUBC(D,'partners_cont',@contr_id) .UPDATE_SUBC(D,'partners',@asset_manager_id) end .UPDATE_SUBC(K,'asset_manager',@asset_manager_id) end else begin .UPDATE_SUBC(D,'partners',@contr_id) end .SUBC_CHECK end --------------- -- по комиссиям --------------- if isnull(@comm_oper_sum,0) > 0 begin select @oper_doc_name='Доп.расходы по реализации ЦБ по биржевой сделке: '+@doc_name .OPERATION(@owner_id,@fund_plan_id,@oper_date,@contr_account_id,@acc48_id,@comm_oper_sum,@stock_price_cur_id,@oper_date,0,0,@oper_doc_name,N) if @fund_type_code = 'NPF_FUND' begin if @asset_manager_id=@owner_id begin .UPDATE_SUBC(D,'partners',@contr_id) end else begin .UPDATE_SUBC(D,'partners_cont',@contr_id) .UPDATE_SUBC(D,'partners',@asset_manager_id) end .UPDATE_SUBC(K,'asset_manager',@asset_manager_id) end else begin .UPDATE_SUBC(D,'partners',@contr_id) end .SUBC_CHECK end --------------------------------------------------------------------------------------- -- Проводки на прибыль при реализации (задолженность - балансовая стоимость - комиссии) --------------------------------------------------------------------------------------- -- Способ отражения прибыли при реализации для фонда = по операциям if (select profit_oper_mode_id from td_pay_fond where id=@owner_id) = 1 begin select @stock_add_sum = @stock_oper_sum - (isnull(@bal_sum_total_lf,0) + @all_overv_sum + @all_comis_sum) if @stock_add_sum > 0 begin select @oper_doc_name='Прибыль при реализации ЦБ по биржевой сделке: '+@doc_name .OPERATION(@owner_id,@fund_plan_id,@oper_date,@acc48_id,@add_account_id,@stock_add_sum,@stock_price_cur_id,@oper_date,0,0,@oper_doc_name,N) if @fund_type_code = 'NPF_FUND' begin .UPDATE_SUBC(D,'asset_manager',@asset_manager_id) .UPDATE_SUBC(K,'asset_manager',@asset_manager_id) end .SUBC_CHECK end else if @stock_add_sum < 0 begin select @oper_doc_name='Убыток при реализация ЦБ по биржевой сделке: '+@doc_name select @stock_add_sum = abs(@stock_add_sum) .OPERATION(@owner_id,@fund_plan_id,@oper_date,@add_account_id,@acc48_id,@stock_add_sum,@stock_price_cur_id,@oper_date,0,0,@oper_doc_name,N) if @fund_type_code = 'NPF_FUND' begin .UPDATE_SUBC(D,'asset_manager',@asset_manager_id) .UPDATE_SUBC(K,'asset_manager',@asset_manager_id) end .SUBC_CHECK end end ---------------------------------- -- Проводки на разницу ПНКД - УНКД ---------------------------------- select @coupon_add_sum=@coupon_oper_sum - isnull(@coupon_bal_sum_total,0) if @coupon_add_sum > 0 begin select @oper_doc_name='Прирост стоимости имущества от НКД по биржевой сделке: '+@doc_name .OPERATION(@owner_id,@fund_plan_id,@oper_date,@pol_coupon_acc_id,@add_account_id,@coupon_add_sum,@stock_price_cur_id,@oper_date,0,0,@oper_doc_name,N) .UPDATE_SUBC(D,'stock_emis',@stock_id) if @fund_type_code = 'NPF_FUND' begin .UPDATE_SUBC(D,'asset_manager',@asset_manager_id) .UPDATE_SUBC(K,'asset_manager',@asset_manager_id) end .SUBC_CHECK end else if @coupon_add_sum < 0 begin select @oper_doc_name='Уменьшение стоимости имущества от НКД по биржевой сделке: '+@doc_name select @coupon_add_sum = abs(@coupon_add_sum) .OPERATION(@owner_id,@fund_plan_id,@oper_date,@add_account_id,@pol_coupon_acc_id,@coupon_add_sum,@stock_price_cur_id,@oper_date,0,0,@oper_doc_name,N) .UPDATE_SUBC(K,'stock_emis',@stock_id) if @fund_type_code = 'NPF_FUND' begin .UPDATE_SUBC(D,'asset_manager',@asset_manager_id) .UPDATE_SUBC(K,'asset_manager',@asset_manager_id) end .SUBC_CHECK end ----------------- -- конец проводок ----------------- -- Запись в журнал -- .SD_INDOC_CREATE4OPER(@id,null,@transaction_date,@transaction_no,@organisation_id,@owner_id,null,null,null) if @foundation_id is not null and @dates4oper_id = @foundation_id begin select @op_time_rep=op_time, @assent_date_rep=assent_date, @reg_date_rep=reg_date, @is_fixed_rep=is_fixed, @is_assent_rep=is_assent from t_sd_info4oper where id = @foundation_id update t_sd_info4oper set op_no=null, op_time=@op_time_rep, assent_date=@assent_date_rep, reg_date=@reg_date_rep, is_fixed=@is_fixed_rep, is_assent=(case isnull(@is_assent_rep,0) when 0 then 0 else is_assent end) where id = @id end /* зачем комиссии при продаже в журнале учета изменений в составе имущества? if @deb_comis_id=@acc482_id select @j_sum=@stock_oper_sum + @coupon_oper_sum + @comm_oper_sum /* + isnull(@comm_other,0) */ else */ select @j_sum=@stock_oper_sum + @coupon_oper_sum .SD_ASSENT_ADD(@id,@stock_id,@j_sum,@stock_qty,@owner_id,null) .SD_ASSET_OPER_ADD(@id,@stock_id,@j_sum,@stock_qty,@owner_id,null,2) commit tran drop table #query_grp drop table #query_ops drop table #tmp_coupon_grp drop table #tmp_coupon_ops --drop table #tmp_comis_grp --drop table #tmp_comis_ops drop table #tmp_overv_grp drop table #tmp_overv_ops .TRANSACTION_RESTORE .END $ENDTEXT(12214231) $ENDACTION $ACTION(SD_BROK_OUT_RET) name=Отменить class=9 form=null target_state=EDIT procedure=ap_61095000000098860 patterns=GENERIC_MOVE user_define=0 isvisible=0 istab=0 posx=0 posy=0 width=0 height=0 proc_text=$TEXT(12214231) create procedure dbo.%PROC% @sid varchar(30) = null as .BEGIN('N') .CHECK_USER .CHECK_UPDATE begin tran .UPDATE_STATE .ACTION_HISTORY .OPERS_ROLL .SD_ASSENT_DEL(@id) .SD_ASSET_OPER_DEL(@id) commit tran .END $ENDTEXT(12214231) $ENDACTION $STATE2ACTION(CRT.ACTION1) state=CRT action=ACTION1 is_available=0 $ENDSTATE2ACTION $STATE2ACTION(CRT.ACTION15) state=CRT action=ACTION15 is_available=0 $ENDSTATE2ACTION $STATE2ACTION(CRT.ACTION2) state=CRT action=ACTION2 is_available=0 $ENDSTATE2ACTION $STATE2ACTION(CRT.D_ASSETS2ITEMS_EDIT_BROK) state=CRT action=D_ASSETS2ITEMS_EDIT_BROK is_available=0 $ENDSTATE2ACTION $STATE2ACTION(CRT.FORM1) state=CRT action=FORM1 is_available=1 $ENDSTATE2ACTION $STATE2ACTION(CRT.SD_BROK_OUT_DEL) state=CRT action=SD_BROK_OUT_DEL is_available=0 $ENDSTATE2ACTION $STATE2ACTION(CRT.SD_BROK_OUT_OPS) state=CRT action=SD_BROK_OUT_OPS is_available=0 $ENDSTATE2ACTION $STATE2ACTION(CRT.SD_BROK_OUT_RET) state=CRT action=SD_BROK_OUT_RET is_available=1 $ENDSTATE2ACTION $STATE2ACTION(DEL.ACTION1) state=DEL action=ACTION1 is_available=0 $ENDSTATE2ACTION $STATE2ACTION(DEL.ACTION15) state=DEL action=ACTION15 is_available=0 $ENDSTATE2ACTION $STATE2ACTION(DEL.ACTION2) state=DEL action=ACTION2 is_available=0 $ENDSTATE2ACTION $STATE2ACTION(DEL.D_ASSETS2ITEMS_EDIT_BROK) state=DEL action=D_ASSETS2ITEMS_EDIT_BROK is_available=0 $ENDSTATE2ACTION $STATE2ACTION(DEL.FORM1) state=DEL action=FORM1 is_available=0 $ENDSTATE2ACTION $STATE2ACTION(DEL.SD_BROK_OUT_DEL) state=DEL action=SD_BROK_OUT_DEL is_available=0 $ENDSTATE2ACTION $STATE2ACTION(DEL.SD_BROK_OUT_OPS) state=DEL action=SD_BROK_OUT_OPS is_available=0 $ENDSTATE2ACTION $STATE2ACTION(DEL.SD_BROK_OUT_RET) state=DEL action=SD_BROK_OUT_RET is_available=0 $ENDSTATE2ACTION $STATE2ACTION(EDIT.ACTION1) state=EDIT action=ACTION1 is_available=0 $ENDSTATE2ACTION $STATE2ACTION(EDIT.ACTION15) state=EDIT action=ACTION15 is_available=1 $ENDSTATE2ACTION $STATE2ACTION(EDIT.ACTION2) state=EDIT action=ACTION2 is_available=1 $ENDSTATE2ACTION $STATE2ACTION(EDIT.D_ASSETS2ITEMS_EDIT_BROK) state=EDIT action=D_ASSETS2ITEMS_EDIT_BROK is_available=0 $ENDSTATE2ACTION $STATE2ACTION(EDIT.FORM1) state=EDIT action=FORM1 is_available=1 $ENDSTATE2ACTION $STATE2ACTION(EDIT.SD_BROK_OUT_DEL) state=EDIT action=SD_BROK_OUT_DEL is_available=1 $ENDSTATE2ACTION $STATE2ACTION(EDIT.SD_BROK_OUT_OPS) state=EDIT action=SD_BROK_OUT_OPS is_available=1 $ENDSTATE2ACTION $STATE2ACTION(EDIT.SD_BROK_OUT_RET) state=EDIT action=SD_BROK_OUT_RET is_available=0 $ENDSTATE2ACTION $STATE2ACTION(NEW.ACTION1) state=NEW action=ACTION1 is_available=1 $ENDSTATE2ACTION $STATE2ACTION(NEW.ACTION15) state=NEW action=ACTION15 is_available=0 $ENDSTATE2ACTION $STATE2ACTION(NEW.ACTION2) state=NEW action=ACTION2 is_available=0 $ENDSTATE2ACTION $STATE2ACTION(NEW.D_ASSETS2ITEMS_EDIT_BROK) state=NEW action=D_ASSETS2ITEMS_EDIT_BROK is_available=0 $ENDSTATE2ACTION $STATE2ACTION(NEW.FORM1) state=NEW action=FORM1 is_available=0 $ENDSTATE2ACTION $STATE2ACTION(NEW.SD_BROK_OUT_DEL) state=NEW action=SD_BROK_OUT_DEL is_available=0 $ENDSTATE2ACTION $STATE2ACTION(NEW.SD_BROK_OUT_OPS) state=NEW action=SD_BROK_OUT_OPS is_available=0 $ENDSTATE2ACTION $STATE2ACTION(NEW.SD_BROK_OUT_RET) state=NEW action=SD_BROK_OUT_RET is_available=0 $ENDSTATE2ACTION $STATE2PROP(CRT.COMM_BROK) state=CRT prop=COMM_BROK enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.COMM_DEPO) state=CRT prop=COMM_DEPO enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.COMM_TS) state=CRT prop=COMM_TS enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.COUPON_ACCOUNT_SUM) state=CRT prop=COUPON_ACCOUNT_SUM enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.COUPON_DEAL_SUM) state=CRT prop=COUPON_DEAL_SUM enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.CUR_ID) state=CRT prop=CUR_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.CUR_PRICE2PAY_RATE) state=CRT prop=CUR_PRICE2PAY_RATE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.DEPO_DOC_TYPE) state=CRT prop=DEPO_DOC_TYPE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.DIRECTION_ID) state=CRT prop=DIRECTION_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.DOC_COMMENT) state=CRT prop=DOC_COMMENT enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.FOUNDATION_ID) state=CRT prop=FOUNDATION_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.INITIATOR_ID) state=CRT prop=INITIATOR_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.IN_DATE) state=CRT prop=IN_DATE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.IN_NO) state=CRT prop=IN_NO enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.IS_COMM_IN_SUM) state=CRT prop=IS_COMM_IN_SUM enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.IS_COUPON_IN_SUM) state=CRT prop=IS_COUPON_IN_SUM enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.MODE_ID) state=CRT prop=MODE_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.ORGANISATION_ID) state=CRT prop=ORGANISATION_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.OWNER_ID) state=CRT prop=OWNER_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.PAY_CUR_ID) state=CRT prop=PAY_CUR_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.RATE_DATE) state=CRT prop=RATE_DATE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.SALE_PLACE_ID) state=CRT prop=SALE_PLACE_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.STOCK_ID) state=CRT prop=STOCK_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.STOCK_PRICE) state=CRT prop=STOCK_PRICE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.STOCK_QTY) state=CRT prop=STOCK_QTY enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.SUMM_DOC_TOTAL) state=CRT prop=SUMM_DOC_TOTAL enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.SUM_IN_PAYCUR) state=CRT prop=SUM_IN_PAYCUR enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.TRANSACTION_DATE) state=CRT prop=TRANSACTION_DATE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.TRANSACTION_NO) state=CRT prop=TRANSACTION_NO enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.TRANSACTION_TIME) state=CRT prop=TRANSACTION_TIME enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.COMM_BROK) state=DEL prop=COMM_BROK enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.COMM_DEPO) state=DEL prop=COMM_DEPO enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.COMM_TS) state=DEL prop=COMM_TS enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.COUPON_ACCOUNT_SUM) state=DEL prop=COUPON_ACCOUNT_SUM enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.COUPON_DEAL_SUM) state=DEL prop=COUPON_DEAL_SUM enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.CUR_ID) state=DEL prop=CUR_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.CUR_PRICE2PAY_RATE) state=DEL prop=CUR_PRICE2PAY_RATE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.DEPO_DOC_TYPE) state=DEL prop=DEPO_DOC_TYPE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.DIRECTION_ID) state=DEL prop=DIRECTION_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.DOC_COMMENT) state=DEL prop=DOC_COMMENT enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.FOUNDATION_ID) state=DEL prop=FOUNDATION_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.INITIATOR_ID) state=DEL prop=INITIATOR_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.IN_DATE) state=DEL prop=IN_DATE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.IN_NO) state=DEL prop=IN_NO enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.IS_COMM_IN_SUM) state=DEL prop=IS_COMM_IN_SUM enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.IS_COUPON_IN_SUM) state=DEL prop=IS_COUPON_IN_SUM enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.MODE_ID) state=DEL prop=MODE_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.ORGANISATION_ID) state=DEL prop=ORGANISATION_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.OWNER_ID) state=DEL prop=OWNER_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.PAY_CUR_ID) state=DEL prop=PAY_CUR_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.RATE_DATE) state=DEL prop=RATE_DATE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.SALE_PLACE_ID) state=DEL prop=SALE_PLACE_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.STOCK_ID) state=DEL prop=STOCK_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.STOCK_PRICE) state=DEL prop=STOCK_PRICE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.STOCK_QTY) state=DEL prop=STOCK_QTY enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.SUMM_DOC_TOTAL) state=DEL prop=SUMM_DOC_TOTAL enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.SUM_IN_PAYCUR) state=DEL prop=SUM_IN_PAYCUR enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.TRANSACTION_DATE) state=DEL prop=TRANSACTION_DATE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.TRANSACTION_NO) state=DEL prop=TRANSACTION_NO enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.TRANSACTION_TIME) state=DEL prop=TRANSACTION_TIME enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(EDIT.COMM_BROK) state=EDIT prop=COMM_BROK enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.COMM_DEPO) state=EDIT prop=COMM_DEPO enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.COMM_TS) state=EDIT prop=COMM_TS enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.COUPON_ACCOUNT_SUM) state=EDIT prop=COUPON_ACCOUNT_SUM enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.COUPON_DEAL_SUM) state=EDIT prop=COUPON_DEAL_SUM enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.CUR_ID) state=EDIT prop=CUR_ID enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.CUR_PRICE2PAY_RATE) state=EDIT prop=CUR_PRICE2PAY_RATE enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.DEPO_DOC_TYPE) state=EDIT prop=DEPO_DOC_TYPE enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.DIRECTION_ID) state=EDIT prop=DIRECTION_ID enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.DOC_COMMENT) state=EDIT prop=DOC_COMMENT enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.FOUNDATION_ID) state=EDIT prop=FOUNDATION_ID enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.INITIATOR_ID) state=EDIT prop=INITIATOR_ID enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.IN_DATE) state=EDIT prop=IN_DATE enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.IN_NO) state=EDIT prop=IN_NO enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.IS_COMM_IN_SUM) state=EDIT prop=IS_COMM_IN_SUM enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.IS_COUPON_IN_SUM) state=EDIT prop=IS_COUPON_IN_SUM enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.MODE_ID) state=EDIT prop=MODE_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(EDIT.ORGANISATION_ID) state=EDIT prop=ORGANISATION_ID enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.OWNER_ID) state=EDIT prop=OWNER_ID enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.PAY_CUR_ID) state=EDIT prop=PAY_CUR_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(EDIT.RATE_DATE) state=EDIT prop=RATE_DATE enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.SALE_PLACE_ID) state=EDIT prop=SALE_PLACE_ID enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.STOCK_ID) state=EDIT prop=STOCK_ID enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.STOCK_PRICE) state=EDIT prop=STOCK_PRICE enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.STOCK_QTY) state=EDIT prop=STOCK_QTY enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.SUMM_DOC_TOTAL) state=EDIT prop=SUMM_DOC_TOTAL enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.SUM_IN_PAYCUR) state=EDIT prop=SUM_IN_PAYCUR enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(EDIT.TRANSACTION_DATE) state=EDIT prop=TRANSACTION_DATE enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.TRANSACTION_NO) state=EDIT prop=TRANSACTION_NO enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.TRANSACTION_TIME) state=EDIT prop=TRANSACTION_TIME enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.COMM_BROK) state=NEW prop=COMM_BROK enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.COMM_DEPO) state=NEW prop=COMM_DEPO enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.COMM_TS) state=NEW prop=COMM_TS enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.COUPON_ACCOUNT_SUM) state=NEW prop=COUPON_ACCOUNT_SUM enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.COUPON_DEAL_SUM) state=NEW prop=COUPON_DEAL_SUM enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.CUR_ID) state=NEW prop=CUR_ID enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.CUR_PRICE2PAY_RATE) state=NEW prop=CUR_PRICE2PAY_RATE enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.DEPO_DOC_TYPE) state=NEW prop=DEPO_DOC_TYPE enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.DIRECTION_ID) state=NEW prop=DIRECTION_ID enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.DOC_COMMENT) state=NEW prop=DOC_COMMENT enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.FOUNDATION_ID) state=NEW prop=FOUNDATION_ID enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.INITIATOR_ID) state=NEW prop=INITIATOR_ID enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.IN_DATE) state=NEW prop=IN_DATE enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.IN_NO) state=NEW prop=IN_NO enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.IS_COMM_IN_SUM) state=NEW prop=IS_COMM_IN_SUM enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.IS_COUPON_IN_SUM) state=NEW prop=IS_COUPON_IN_SUM enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.MODE_ID) state=NEW prop=MODE_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(NEW.ORGANISATION_ID) state=NEW prop=ORGANISATION_ID enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.OWNER_ID) state=NEW prop=OWNER_ID enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.PAY_CUR_ID) state=NEW prop=PAY_CUR_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(NEW.RATE_DATE) state=NEW prop=RATE_DATE enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.SALE_PLACE_ID) state=NEW prop=SALE_PLACE_ID enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.STOCK_ID) state=NEW prop=STOCK_ID enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.STOCK_PRICE) state=NEW prop=STOCK_PRICE enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.STOCK_QTY) state=NEW prop=STOCK_QTY enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.SUMM_DOC_TOTAL) state=NEW prop=SUMM_DOC_TOTAL enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.SUM_IN_PAYCUR) state=NEW prop=SUM_IN_PAYCUR enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(NEW.TRANSACTION_DATE) state=NEW prop=TRANSACTION_DATE enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.TRANSACTION_NO) state=NEW prop=TRANSACTION_NO enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.TRANSACTION_TIME) state=NEW prop=TRANSACTION_TIME enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $ENDDOC $DOC(SD_BROK_GROUP) name=Биржевые сделки (СД) class=5 product=ALD_FUND name_formula=null remark_formula=null $STATE(NEW) name=Начальный class=1 $ENDSTATE $STATE(OK) name=Создан class=0 $ENDSTATE $PROP(SALE_PLACE_ID) name=Площадка field_name=sale_place_id table_name=tb_baysale_docitems field_type=numeric field_length=9 field_scale=0 field_prec=18 page=1 order=1 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(TRANSACTION_NO) name=Номер сделки field_name=transaction_no table_name=tb_baysale_docitems field_type=varchar field_length=80 field_scale=null field_prec=null 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(STOCK_ID) name=ЦБ field_name=stock_id table_name=tb_baysale_docitems 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(STOCK_PRICE) name=Цена field_name=stock_price table_name=tb_baysale_docitems field_type=decimal field_length=9 field_scale=6 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(STOCK_QTY) name=Количество field_name=stock_qty table_name=tb_baysale_docitems field_type=money field_length=8 field_scale=null field_prec=null 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(SUMM_DOC_TOTAL) name=Сумма в валюте сделки field_name=summ_doc_total table_name=tb_baysale_docitems field_type=money field_length=8 field_scale=null field_prec=null 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(CUR_ID) name=Валюта сделки field_name=cur_id table_name=tb_baysale_docitems 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(PAY_CUR_ID) name=Валюта платежа field_name=pay_cur_id table_name=tb_baysale_docitems field_type=numeric field_length=9 field_scale=0 field_prec=18 page=1 order=9 init_class=1 init_formula=.CUR('RUR') 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(DIRECTION_ID) name=Брокерский договор field_name=direction_id table_name=tb_baysale_docitems field_type=numeric field_length=9 field_scale=0 field_prec=18 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(ORGANISATION_ID) name=Брокер field_name=organisation_id table_name=tb_baysale_docitems field_type=numeric field_length=9 field_scale=0 field_prec=18 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(CUR_PRICE2PAY_RATE) name=Курс валюты цены к валюте платежа field_name=cur_price2pay_rate table_name=tb_baysale_docitems field_type=decimal field_length=9 field_scale=8 field_prec=18 page=1 order=12 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 $PROP(RATE_DATE) name=Дата курса field_name=rate_date table_name=tb_baysale_docitems field_type=datetime field_length=8 field_scale=null field_prec=null page=1 order=13 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 $PROP(SUM_IN_PAYCUR) name=Сумма в валюте платежа field_name=sum_in_paycur table_name=tb_baysale_docitems field_type=money field_length=8 field_scale=null field_prec=null page=1 order=14 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 $PROP(COUPON_DEAL_SUM) name=УНКД в валюте сделки field_name=coupon_deal_sum table_name=tb_baysale_docitems field_type=money field_length=8 field_scale=null field_prec=null page=1 order=15 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 $PROP(COUPON_ACCOUNT_SUM) name=УНКД в валюте платежа field_name=coupon_account_sum table_name=tb_baysale_docitems field_type=money field_length=8 field_scale=null field_prec=null page=1 order=16 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 $PROP(TRANSACTION_DATE) name=Дата сделки field_name=transaction_date table_name=tb_baysale_docitems field_type=datetime field_length=8 field_scale=null field_prec=null 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(MODE_ID) name=Код способа расчетов по сделке field_name=mode_id table_name=tb_baysale_docitems field_type=numeric field_length=9 field_scale=0 field_prec=18 page=1 order=17 init_class=1 init_formula=3 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_COUPON_IN_SUM) name=УНКД в том числе field_name=is_coupon_in_sum table_name=tb_baysale_docitems field_type=int field_length=4 field_scale=null field_prec=null page=1 order=18 init_class=1 init_formula=0 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(COMM_TS) name=Комиссия биржи field_name=comm_ts table_name=tb_baysale_docitems field_type=money field_length=8 field_scale=null field_prec=null page=1 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(COMM_BROK) name=Комиссия брокера field_name=comm_brok table_name=tb_baysale_docitems field_type=money field_length=8 field_scale=null field_prec=null page=1 order=27 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(COMM_DEPO) name=Комиссия Депо field_name=comm_depo table_name=tb_baysale_docitems field_type=money field_length=8 field_scale=null field_prec=null page=1 order=28 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(TRANSACTION_TIME) name=Время сделки field_name=transaction_time table_name=tb_baysale_docitems field_type=datetime field_length=8 field_scale=null field_prec=null page=1 order=29 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_COMM_IN_SUM) name=Комиссии в сумме field_name=is_comm_in_sum table_name=tb_baysale_docitems field_type=int field_length=4 field_scale=null field_prec=null page=1 order=30 init_class=1 init_formula=0 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(IN_DATE) name=Дата регистрации field_name=in_date table_name=td_depo_docs field_type=datetime field_length=8 field_scale=null field_prec=null page=1 order=20 init_class=1 init_formula=.OPERDAY 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(IN_NO) name=Номер регистрации field_name=in_no table_name=td_depo_docs field_type=varchar field_length=50 field_scale=null field_prec=null 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(INITIATOR_ID) name=УК НПФ field_name=initiator_id table_name=td_depo_docs field_type=numeric field_length=9 field_scale=0 field_prec=18 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(DEPO_DOC_TYPE) name=Входящий исходящий field_name=depo_doc_type table_name=td_depo_docs field_type=int field_length=4 field_scale=null field_prec=null page=1 order=23 init_class=1 init_formula=1 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_COMMENT) name=Комментарий field_name=doc_comment table_name=td_depo_docs field_type=varchar field_length=255 field_scale=null field_prec=null page=1 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(FOUNDATION_ID) name=Отчет брокера (группа сделок) field_name=foundation_id table_name=td_depo_docs field_type=numeric field_length=9 field_scale=0 field_prec=18 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(OWNER_ID) name=Фонд field_name=owner_id table_name=td_depo_docs field_type=numeric field_length=9 field_scale=0 field_prec=18 page=1 order=25 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 $RELATION(REL1) class=0 type=FUND_GROUP form=null prop=OWNER_ID idname=null order=60 $ENDRELATION $RELATION(REL2) class=0 type=cur form=null prop=CUR_ID idname=null order=70 $ENDRELATION $RELATION(REL3) class=0 type=cur form=null prop=PAY_CUR_ID idname=null order=80 $ENDRELATION $RELATION(REL4) class=0 type=partners form=null prop=INITIATOR_ID idname=null order=50 $ENDRELATION $RELATION(REL5) class=0 type=partners form=null prop=ORGANISATION_ID idname=null order=40 $ENDRELATION $RELATION(REL6) class=0 type=items form=null prop=DIRECTION_ID idname=null order=30 $ENDRELATION $RELATION(REL7) class=0 type=items form=null prop=FOUNDATION_ID idname=null order=90 $ENDRELATION $RELATION(REL8) class=0 type=td_stock_emis form=null prop=STOCK_ID idname=null order=20 $ENDRELATION $RELATION(REL9) class=0 type=rate_places form=null prop=SALE_PLACE_ID idname=null order=10 $ENDRELATION $RELATION(REL10) class=5 type=SD_BROK_BUY form=FORM_VIEW prop=null idname=null order=null $ENDRELATION $RELATION(REL11) class=5 type=SD_BROK_SALE form=FORM1 prop=null idname=null order=null $ENDRELATION $FORM(ADIRECT_FUND_CODES) name=Список фондов с кодами для импорта class=4 filter=null target_state= uo=uo_list_disable dw=d_adirect_fund_codes procedure=ap_61095000000098920 patterns=null user_define=0 isvisible=1 istab=0 posx=0 posy=0 width=0 height=0 proc_text=$TEXT(12214242) create procedure dbo.%PROC% @sid varchar(30) = null .ARGLIST_FILTER as .BEGIN('N') .ARGCONVERT_FILTER declare @classvalue_id numeric select @classvalue_id=v.id from t_classes c, t_classvalues v where c.code='ADIRECT_IMP' and v.code='DEFAULT' and v.class_id=c.id select convert(varchar(30),i.id) as sid, t.type_name, p.partner_code, p.partner_name, ic.code from t_partners p, t_types t, t_items i, t_states s, t_item2class ic where p.id=i.id and i.type_id=t.id and i.state_id=s.id and s.class_id=0 and upper(t.type_code) in ('PIF_FUND','NPF_FUND') and p.id=ic.item_id and ic.value_id=@classvalue_id order by 2,3 .END $ENDTEXT(12214242) $ENDFORM $FORM(FORM1) name=Список class=4 filter=FORM2 target_state= uo=uo_list dw=d_sd_brok_list procedure=ap_61095000000098921 patterns=GENERIC_VIEW_LIST user_define=0 isvisible=0 istab=0 posx=0 posy=0 width=4663 height=2692 proc_text=$TEXT(12214244) create procedure dbo.%PROC% @sid varchar(30) = null .ARGLIST_FILTER as .BEGIN('N') .CHECK_USER .CHECK_VIEW_LIST .ARGCONVERT_FILTER .VIEW_LIST .END $ENDTEXT(12214244) $ACTION2RELATION(REL6.ITEM_NAME) relation=REL6 where=null prop=ITEM_NAME order=null alias=broker_dog_name $ENDACTION2RELATION $ACTION2RELATION(REL5.PARTNER_CODE) relation=REL5 where=null prop=PARTNER_CODE order=21 alias=org_code $ENDACTION2RELATION $ACTION2RELATION(REL5.PARTNER_SHORT_NAME) relation=REL5 where=null prop=PARTNER_SHORT_NAME order=20 alias=org_short_name $ENDACTION2RELATION $ACTION2RELATION(REL4.PARTNER_CODE) relation=REL4 where=null prop=PARTNER_CODE order=null alias=initiator_code $ENDACTION2RELATION $ACTION2RELATION(REL1.PARTNER_CODE) relation=REL1 where=null prop=PARTNER_CODE order=null alias=fond_code $ENDACTION2RELATION $ACTION2RELATION(REL9.PLACE_NAME) relation=REL9 where=null prop=PLACE_NAME order=null alias=place_name $ENDACTION2RELATION $ACTION2RELATION(REL8.STOCK_CODE) relation=REL8 where=null prop=STOCK_CODE order=37 alias=stock_code $ENDACTION2RELATION $ACTION2RELATION(REL8.STOCK_NOMINAL) relation=REL8 where=null prop=STOCK_NOMINAL order=38 alias=stock_nominal $ENDACTION2RELATION $ACTION2RELATION(REL8.STOCK_CURR_ID) relation=REL8 where=null prop=STOCK_CURR_ID order=39 alias=stock_curr_id $ENDACTION2RELATION $ACTION2RELATION(REL2.CUR_CODE) relation=REL2 where=null prop=CUR_CODE order=15 alias=cur_code $ENDACTION2RELATION $ACTION2RELATION(REL3.CUR_CODE) relation=REL3 where=null prop=CUR_CODE order=15 alias=pay_cur_code $ENDACTION2RELATION $ACTION2RELATION(REL7.ITEM_NAME) relation=REL7 where=null prop=ITEM_NAME order=3 alias=rep_name $ENDACTION2RELATION $ENDFORM $FORM(FORM2) name=Фильтр class=6 filter=null target_state= uo=uo_filter dw=d_sd_brok_filter procedure=ap_61095000000098931 patterns=null user_define=1 isvisible=0 istab=0 posx=0 posy=0 width=2158 height=1144 proc_text=$TEXT(12214244) create procedure dbo.%PROC% as declare @operday datetime, @owner_id numeric select @operday = .OPERDAY select @owner_id = .ORGANIZATION select convert(varchar(255), null) as item_remark, convert(varchar(30), null) as type_id_s, convert(varchar(30), null) as state_name_id_s, convert(varchar(30), null) as sale_place_id_s, convert(varchar(255), null) as transaction_no, @operday as transaction_date_db, @operday as transaction_date_de, convert(varchar(30), null) as stock_id_s, convert(varchar(30), null) as cur_id_s, convert(varchar(30), null) as organisation_id_s, convert(varchar(30), null) as foundation_id_s, convert(datetime, null) as in_date_db, convert(datetime, null) as in_date_de, convert(varchar(255), null) as in_no, convert(varchar(30), @owner_id) as owner_id_s, convert(varchar(255), null) place_name, convert(varchar(255), null) stock_code, convert(varchar(255), null) org_code, (select partner_code from t_partners where id=@owner_id) as fond_code, convert(varchar(255), null) rep_name $ENDTEXT(12214244) $FILTER(TRANSACTION_DATE) type=2 label=Дата сделки prop=TRANSACTION_DATE arg_code=null arg_type=null arg_length=null arg_prec=null arg_scale=null $ENDFILTER $FILTER(IN_DATE) type=2 label=Дата регистрации prop=IN_DATE arg_code=null arg_type=null arg_length=null arg_prec=null arg_scale=null $ENDFILTER $FILTER(SALE_PLACE_ID) type=1 label=Площадка prop=SALE_PLACE_ID arg_code=null arg_type=null arg_length=null arg_prec=null arg_scale=null $ENDFILTER $FILTER(STOCK_ID) type=1 label=ЦБ prop=STOCK_ID arg_code=null arg_type=null arg_length=null arg_prec=null arg_scale=null $ENDFILTER $FILTER(CUR_ID) type=1 label=Валюта сделки prop=CUR_ID arg_code=null arg_type=null arg_length=null arg_prec=null arg_scale=null $ENDFILTER $FILTER(ORGANISATION_ID) type=1 label=Брокер prop=ORGANISATION_ID arg_code=null arg_type=null arg_length=null arg_prec=null arg_scale=null $ENDFILTER $FILTER(FOUNDATION_ID) type=1 label=Отчет брокера (группа сделок) prop=FOUNDATION_ID arg_code=null arg_type=null arg_length=null arg_prec=null arg_scale=null $ENDFILTER $FILTER(OWNER_ID) type=1 label=Фонд prop=OWNER_ID arg_code=null arg_type=null arg_length=null arg_prec=null arg_scale=null $ENDFILTER $FILTER(IN_NO) type=3 label=Номер регистрации prop=IN_NO arg_code=null arg_type=null arg_length=null arg_prec=null arg_scale=null $ENDFILTER $FILTER(TRANSACTION_NO) type=3 label=Номер сделки prop=TRANSACTION_NO arg_code=null arg_type=null arg_length=null arg_prec=null arg_scale=null $ENDFILTER $ENDFORM $FORM(FORM3) name=Сделки по отчету class=4 filter=null target_state= uo=uo_list dw=d_sd_brok_list procedure=ap_61090000000097952 patterns=GENERIC_VIEW_LIST user_define=0 isvisible=1 istab=1 posx=0 posy=0 width=0 height=0 proc_text=$TEXT(12214244) create procedure dbo.%PROC% @sid varchar(30) = null .ARGLIST_FILTER as .BEGIN('N') .CHECK_USER .CHECK_VIEW_LIST .ARGCONVERT_FILTER .VIEW_LIST .END $ENDTEXT(12214244) $ACTION2RELATION(REL3.CUR_CODE) relation=REL3 where=null prop=CUR_CODE order=15 alias=pay_cur_code $ENDACTION2RELATION $ACTION2RELATION(REL2.CUR_CODE) relation=REL2 where=null prop=CUR_CODE order=15 alias=cur_code $ENDACTION2RELATION $ACTION2RELATION(REL6.ITEM_NAME) relation=REL6 where=null prop=ITEM_NAME order=3 alias=broker_dog_name $ENDACTION2RELATION $ACTION2RELATION(REL5.PARTNER_CODE) relation=REL5 where=null prop=PARTNER_CODE order=21 alias=org_code $ENDACTION2RELATION $ACTION2RELATION(REL5.PARTNER_SHORT_NAME) relation=REL5 where=null prop=PARTNER_SHORT_NAME order=20 alias=org_short_name $ENDACTION2RELATION $ACTION2RELATION(REL4.PARTNER_CODE) relation=REL4 where=null prop=PARTNER_CODE order=19 alias=initiator_code $ENDACTION2RELATION $ACTION2RELATION(REL9.PLACE_NAME) relation=REL9 where=null prop=PLACE_NAME order=3 alias=place_name $ENDACTION2RELATION $ACTION2RELATION(REL1.PARTNER_CODE) relation=REL1 where=null prop=PARTNER_CODE order=4 alias=fond_code $ENDACTION2RELATION $ACTION2RELATION(REL8.STOCK_CODE) relation=REL8 where=null prop=STOCK_CODE order=37 alias=stock_code $ENDACTION2RELATION $ACTION2RELATION(REL8.STOCK_NOMINAL) relation=REL8 where=null prop=STOCK_NOMINAL order=38 alias=stock_nominal $ENDACTION2RELATION $ACTION2RELATION(REL8.STOCK_CURR_ID) relation=REL8 where=null prop=STOCK_CURR_ID order=39 alias=stock_curr_id $ENDACTION2RELATION $ACTION2RELATION(REL7.ITEM_NAME) relation=REL7 where=null prop=ITEM_NAME order=3 alias=rep_name $ENDACTION2RELATION $FILTER(FOUNDATION_ID) type=11 label=Отчет брокера prop=FOUNDATION_ID arg_code=null arg_type=null arg_length=null arg_prec=null arg_scale=null $ENDFILTER $ENDFORM $STATE2ACTION(NEW.ADIRECT_FUND_CODES) state=NEW action=ADIRECT_FUND_CODES is_available=0 $ENDSTATE2ACTION $STATE2ACTION(NEW.FORM1) state=NEW action=FORM1 is_available=0 $ENDSTATE2ACTION $STATE2ACTION(NEW.FORM2) state=NEW action=FORM2 is_available=0 $ENDSTATE2ACTION $STATE2ACTION(NEW.FORM3) state=NEW action=FORM3 is_available=0 $ENDSTATE2ACTION $STATE2ACTION(OK.ADIRECT_FUND_CODES) state=OK action=ADIRECT_FUND_CODES is_available=0 $ENDSTATE2ACTION $STATE2ACTION(OK.FORM1) state=OK action=FORM1 is_available=1 $ENDSTATE2ACTION $STATE2ACTION(OK.FORM2) state=OK action=FORM2 is_available=1 $ENDSTATE2ACTION $STATE2ACTION(OK.FORM3) state=OK action=FORM3 is_available=1 $ENDSTATE2ACTION $STATE2PROP(NEW.COMM_BROK) state=NEW prop=COMM_BROK enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(NEW.COMM_DEPO) state=NEW prop=COMM_DEPO enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(NEW.COMM_TS) state=NEW prop=COMM_TS enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(NEW.COUPON_ACCOUNT_SUM) state=NEW prop=COUPON_ACCOUNT_SUM enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(NEW.COUPON_DEAL_SUM) state=NEW prop=COUPON_DEAL_SUM enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(NEW.CUR_ID) state=NEW prop=CUR_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(NEW.CUR_PRICE2PAY_RATE) state=NEW prop=CUR_PRICE2PAY_RATE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(NEW.DEPO_DOC_TYPE) state=NEW prop=DEPO_DOC_TYPE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(NEW.DIRECTION_ID) state=NEW prop=DIRECTION_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(NEW.DOC_COMMENT) state=NEW prop=DOC_COMMENT enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(NEW.FOUNDATION_ID) state=NEW prop=FOUNDATION_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(NEW.INITIATOR_ID) state=NEW prop=INITIATOR_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(NEW.IN_DATE) state=NEW prop=IN_DATE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(NEW.IN_NO) state=NEW prop=IN_NO enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(NEW.IS_COMM_IN_SUM) state=NEW prop=IS_COMM_IN_SUM enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(NEW.IS_COUPON_IN_SUM) state=NEW prop=IS_COUPON_IN_SUM enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(NEW.MODE_ID) state=NEW prop=MODE_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(NEW.ORGANISATION_ID) state=NEW prop=ORGANISATION_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(NEW.OWNER_ID) state=NEW prop=OWNER_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(NEW.PAY_CUR_ID) state=NEW prop=PAY_CUR_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(NEW.RATE_DATE) state=NEW prop=RATE_DATE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(NEW.SALE_PLACE_ID) state=NEW prop=SALE_PLACE_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(NEW.STOCK_ID) state=NEW prop=STOCK_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(NEW.STOCK_PRICE) state=NEW prop=STOCK_PRICE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(NEW.STOCK_QTY) state=NEW prop=STOCK_QTY enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(NEW.SUMM_DOC_TOTAL) state=NEW prop=SUMM_DOC_TOTAL enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(NEW.SUM_IN_PAYCUR) state=NEW prop=SUM_IN_PAYCUR enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(NEW.TRANSACTION_DATE) state=NEW prop=TRANSACTION_DATE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(NEW.TRANSACTION_NO) state=NEW prop=TRANSACTION_NO enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(NEW.TRANSACTION_TIME) state=NEW prop=TRANSACTION_TIME enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(OK.COMM_BROK) state=OK prop=COMM_BROK enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(OK.COMM_DEPO) state=OK prop=COMM_DEPO enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(OK.COMM_TS) state=OK prop=COMM_TS enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(OK.COUPON_ACCOUNT_SUM) state=OK prop=COUPON_ACCOUNT_SUM enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(OK.COUPON_DEAL_SUM) state=OK prop=COUPON_DEAL_SUM enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(OK.CUR_ID) state=OK prop=CUR_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(OK.CUR_PRICE2PAY_RATE) state=OK prop=CUR_PRICE2PAY_RATE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(OK.DEPO_DOC_TYPE) state=OK prop=DEPO_DOC_TYPE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(OK.DIRECTION_ID) state=OK prop=DIRECTION_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(OK.DOC_COMMENT) state=OK prop=DOC_COMMENT enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(OK.FOUNDATION_ID) state=OK prop=FOUNDATION_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(OK.INITIATOR_ID) state=OK prop=INITIATOR_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(OK.IN_DATE) state=OK prop=IN_DATE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(OK.IN_NO) state=OK prop=IN_NO enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(OK.IS_COMM_IN_SUM) state=OK prop=IS_COMM_IN_SUM enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(OK.IS_COUPON_IN_SUM) state=OK prop=IS_COUPON_IN_SUM enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(OK.MODE_ID) state=OK prop=MODE_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(OK.ORGANISATION_ID) state=OK prop=ORGANISATION_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(OK.OWNER_ID) state=OK prop=OWNER_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(OK.PAY_CUR_ID) state=OK prop=PAY_CUR_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(OK.RATE_DATE) state=OK prop=RATE_DATE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(OK.SALE_PLACE_ID) state=OK prop=SALE_PLACE_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(OK.STOCK_ID) state=OK prop=STOCK_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(OK.STOCK_PRICE) state=OK prop=STOCK_PRICE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(OK.STOCK_QTY) state=OK prop=STOCK_QTY enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(OK.SUMM_DOC_TOTAL) state=OK prop=SUMM_DOC_TOTAL enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(OK.SUM_IN_PAYCUR) state=OK prop=SUM_IN_PAYCUR enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(OK.TRANSACTION_DATE) state=OK prop=TRANSACTION_DATE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(OK.TRANSACTION_NO) state=OK prop=TRANSACTION_NO enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(OK.TRANSACTION_TIME) state=OK prop=TRANSACTION_TIME enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $ENDDOC $DOC(SD_BROK_BUY) name=Сделка покупки ЦБ на бирже class=1 product=ALD_FUND name_formula=$TEXT(12214249) 'Покупка ЦБ на бирже: сделка №'+@transaction_no+' от '+.DATE_TO_STR(@transaction_date) +' док.№'+@in_no+': '+.ITEM_NAME(@stock_id)+','+.TO_STR(@stock_qty)+'шт,'+.TO_STR(@summ_doc_total)+.CUR_CODE(@cur_id) $ENDTEXT(12214249) remark_formula=$TEXT(12214249) 'Покупка ЦБ на бирже: сделка №'+@transaction_no+' от '+.DATE_TO_STR(@transaction_date) +' док.№'+@in_no+': '+.ITEM_NAME(@stock_id)+','+.TO_STR(@stock_qty)+'шт,'+.TO_STR(@summ_doc_total)+.CUR_CODE(@cur_id) $ENDTEXT(12214249) $STATE(CRT) name=Проведен class=0 $ENDSTATE $STATE(DEL) name=Удален class=2 $ENDSTATE $STATE(EDIT) name=Редактируется class=0 $ENDSTATE $STATE(NEW) name=Начальный class=1 $ENDSTATE $PROP(SALE_PLACE_ID) name=Площадка field_name=sale_place_id table_name=tb_baysale_docitems field_type=numeric field_length=9 field_scale=0 field_prec=18 page=1 order=1 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(TRANSACTION_NO) name=Номер сделки field_name=transaction_no table_name=tb_baysale_docitems field_type=varchar field_length=80 field_scale=null field_prec=null 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(STOCK_ID) name=ЦБ field_name=stock_id table_name=tb_baysale_docitems 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(STOCK_PRICE) name=Цена field_name=stock_price table_name=tb_baysale_docitems field_type=decimal field_length=9 field_scale=6 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(STOCK_QTY) name=Количество field_name=stock_qty table_name=tb_baysale_docitems field_type=money field_length=8 field_scale=null field_prec=null 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(SUMM_DOC_TOTAL) name=Сумма в валюте сделки field_name=summ_doc_total table_name=tb_baysale_docitems field_type=money field_length=8 field_scale=null field_prec=null 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(CUR_ID) name=Валюта сделки field_name=cur_id table_name=tb_baysale_docitems field_type=numeric field_length=9 field_scale=0 field_prec=18 page=1 order=8 init_class=1 init_formula=.CUR('RUR') 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(PAY_CUR_ID) name=Валюта платежа field_name=pay_cur_id table_name=tb_baysale_docitems field_type=numeric field_length=9 field_scale=0 field_prec=18 page=1 order=9 init_class=1 init_formula=.CUR('RUR') 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(DIRECTION_ID) name=Брокерский договор field_name=direction_id table_name=tb_baysale_docitems field_type=numeric field_length=9 field_scale=0 field_prec=18 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(ORGANISATION_ID) name=Брокер field_name=organisation_id table_name=tb_baysale_docitems field_type=numeric field_length=9 field_scale=0 field_prec=18 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(CUR_PRICE2PAY_RATE) name=Курс валюты цены к валюте платежа field_name=cur_price2pay_rate table_name=tb_baysale_docitems field_type=decimal field_length=9 field_scale=8 field_prec=18 page=1 order=12 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 $PROP(RATE_DATE) name=Дата курса field_name=rate_date table_name=tb_baysale_docitems field_type=datetime field_length=8 field_scale=null field_prec=null page=1 order=13 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 $PROP(SUM_IN_PAYCUR) name=Сумма в валюте платежа field_name=sum_in_paycur table_name=tb_baysale_docitems field_type=money field_length=8 field_scale=null field_prec=null page=1 order=14 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 $PROP(COUPON_DEAL_SUM) name=УНКД в валюте сделки field_name=coupon_deal_sum table_name=tb_baysale_docitems field_type=money field_length=8 field_scale=null field_prec=null page=1 order=15 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 $PROP(COUPON_ACCOUNT_SUM) name=УНКД в валюте платежа field_name=coupon_account_sum table_name=tb_baysale_docitems field_type=money field_length=8 field_scale=null field_prec=null page=1 order=16 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 $PROP(TRANSACTION_DATE) name=Дата сделки field_name=transaction_date table_name=tb_baysale_docitems field_type=datetime field_length=8 field_scale=null field_prec=null page=1 order=3 init_class=1 init_formula=.OPERDAY 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(MODE_ID) name=Код способа расчетов по сделке field_name=mode_id table_name=tb_baysale_docitems field_type=numeric field_length=9 field_scale=0 field_prec=18 page=1 order=17 init_class=1 init_formula=3 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_COUPON_IN_SUM) name=УНКД в том числе field_name=is_coupon_in_sum table_name=tb_baysale_docitems field_type=int field_length=4 field_scale=null field_prec=null page=1 order=18 init_class=1 init_formula=0 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(COMM_TS) name=Комиссия биржи field_name=comm_ts table_name=tb_baysale_docitems field_type=money field_length=8 field_scale=null field_prec=null page=1 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(COMM_BROK) name=Комиссия брокера field_name=comm_brok table_name=tb_baysale_docitems field_type=money field_length=8 field_scale=null field_prec=null page=1 order=27 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(COMM_DEPO) name=Комиссия Депо field_name=comm_depo table_name=tb_baysale_docitems field_type=money field_length=8 field_scale=null field_prec=null page=1 order=28 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(TRANSACTION_TIME) name=Время совершения field_name=transaction_time table_name=tb_baysale_docitems field_type=datetime field_length=8 field_scale=null field_prec=null page=1 order=29 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_COMM_IN_SUM) name=Комиссии в сумме field_name=is_comm_in_sum table_name=tb_baysale_docitems field_type=int field_length=4 field_scale=null field_prec=null page=1 order=30 init_class=1 init_formula=0 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(IN_DATE) name=Дата регистрации field_name=in_date table_name=td_depo_docs field_type=datetime field_length=8 field_scale=null field_prec=null page=1 order=20 init_class=1 init_formula=.OPERDAY 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(IN_NO) name=Номер регистрации field_name=in_no table_name=td_depo_docs field_type=varchar field_length=50 field_scale=null field_prec=null 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(INITIATOR_ID) name=УК НПФ field_name=initiator_id table_name=td_depo_docs field_type=numeric field_length=9 field_scale=0 field_prec=18 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(DEPO_DOC_TYPE) name=Входящий исходящий field_name=depo_doc_type table_name=td_depo_docs field_type=int field_length=4 field_scale=null field_prec=null page=1 order=23 init_class=1 init_formula=1 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_COMMENT) name=Комментарий field_name=doc_comment table_name=td_depo_docs field_type=varchar field_length=255 field_scale=null field_prec=null page=1 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(FOUNDATION_ID) name=Отчет брокера (группа сделок) field_name=foundation_id table_name=td_depo_docs field_type=numeric field_length=9 field_scale=0 field_prec=18 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(OWNER_ID) name=Фонд field_name=owner_id table_name=td_depo_docs field_type=numeric field_length=9 field_scale=0 field_prec=18 page=1 order=25 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 $RELATION(REL10) class=1 type=SD_INDOC2DOC form=FORM2 prop=null idname=doc_id_s order=100 $ENDRELATION $RELATION(REL7) class=1 type=actions_history form=uo_actions_history_list prop=null idname=doc_id_s order=200 $ENDRELATION $RELATION(REL8) class=0 type=td_stock_emis form=null prop=STOCK_ID idname=null order=20 $ENDRELATION $RELATION(REL9) class=0 type=rate_places form=null prop=SALE_PLACE_ID idname=null order=10 $ENDRELATION $RELATION(REL1) class=0 type=FUND_GROUP form=null prop=OWNER_ID idname=null order=60 $ENDRELATION $RELATION(REL2) class=1 type=t_operations form=item_opers_list prop=null idname=item_id_s order=110 $ENDRELATION $RELATION(REL3) class=0 type=partners form=null prop=INITIATOR_ID idname=null order=50 $ENDRELATION $RELATION(REL4) class=0 type=partners form=null prop=ORGANISATION_ID idname=null order=40 $ENDRELATION $RELATION(REL5) class=0 type=items form=null prop=DIRECTION_ID idname=null order=30 $ENDRELATION $RELATION(REL6) class=0 type=items form=null prop=FOUNDATION_ID idname=null order=70 $ENDRELATION $FORM(FORM_VIEW) name=Просмотр class=5 filter=null target_state= uo=uo_edit dw=d_sd_brok_buy_edit procedure=ap_61095000000098915 patterns=GENERIC_VIEW_ITEM user_define=1 isvisible=0 istab=1 posx=0 posy=0 width=3259 height=1804 proc_text=$TEXT(12214253) create procedure dbo.%PROC% @sid varchar(30) = null, @foundation_id_s varchar(30) = null as .BEGIN('N') .CHECK_USER .CHECK_VIEW_ITEM if @id = -1 begin begin tran .GET_PROPS .CHECK_INSERT .INIT_VARS(B) if isnull(@foundation_id_s,'')<>'' begin select @foundation_id=convert(numeric, @foundation_id_s) select @owner_id=fund_id, @initiator_id=uk_id, @organisation_id=brok_id, @direction_id=brok_dog_id from t_sd_brok_rep where id=@foundation_id end .INSERT_ITEMS .INSERT commit tran end .INSERT_INFO4OPER(@id) .VIEW_ITEM .END $ENDTEXT(12214253) $ACTION2RELATION(REL8.STOCK_CODE) relation=REL8 where=null prop=STOCK_CODE order=37 alias=stock_code $ENDACTION2RELATION $ACTION2RELATION(REL8.STOCK_NOMINAL) relation=REL8 where=null prop=STOCK_NOMINAL order=38 alias=stock_nominal $ENDACTION2RELATION $ACTION2RELATION(REL8.STOCK_CURR_ID) relation=REL8 where=null prop=STOCK_CURR_ID order=39 alias=stock_curr_id $ENDACTION2RELATION $ACTION2RELATION(REL9.PLACE_NAME) relation=REL9 where=null prop=PLACE_NAME order=3 alias=place_name $ENDACTION2RELATION $ACTION2RELATION(REL5.ITEM_NAME) relation=REL5 where=null prop=ITEM_NAME order=3 alias=broker_dog_name $ENDACTION2RELATION $ACTION2RELATION(REL4.PARTNER_CODE) relation=REL4 where=null prop=PARTNER_CODE order=20 alias=org_code $ENDACTION2RELATION $ACTION2RELATION(REL4.PARTNER_SHORT_NAME) relation=REL4 where=null prop=PARTNER_SHORT_NAME order=21 alias=org_short_name $ENDACTION2RELATION $ACTION2RELATION(REL3.PARTNER_CODE) relation=REL3 where=null prop=PARTNER_CODE order=19 alias=initiator_code $ENDACTION2RELATION $ACTION2RELATION(REL1.CTRL_COMP_ID) relation=REL1 where=null prop=CTRL_COMP_ID order=3 alias=ctrl_comp_id_s $ENDACTION2RELATION $ACTION2RELATION(REL1.PARTNER_CODE) relation=REL1 where=null prop=PARTNER_CODE order=4 alias=fond_code $ENDACTION2RELATION $ACTION2RELATION(REL6.ITEM_NAME) relation=REL6 where=null prop=ITEM_NAME order=4 alias=rep_name $ENDACTION2RELATION $BIND(BIND1) type=SD_INFO4OPER action=FORM_ED class=1 order=null idname=sid $ENDBIND $FILTER(FOUNDATION_ID) type=11 label=Отчет брокера prop=FOUNDATION_ID arg_code=null arg_type=null arg_length=null arg_prec=null arg_scale=null $ENDFILTER $ENDFORM $ACTION(ACTION1) name=Добавить class=1 form=FORM_VIEW target_state=EDIT procedure=ap_61095000000099007 patterns=GENERIC_INSERT user_define=1 isvisible=0 istab=1 posx=0 posy=0 width=3255 height=1808 proc_text=$TEXT(12214253) create procedure dbo.%PROC% @sid varchar(30) = null, .ARGLIST as .BEGIN('N') .CHECK_USER .CHECK_UPDATE .ARGCONVERT .INIT_VARS .FUND_GEN_NO(@in_no,@depo_doc_type,@in_date) .TEST_UNIQUE .SD_BROK_CHECK begin tran .UPDATE_ITEMS .UPDATE .RELGEN .UPDATE_STATE .ACTION_HISTORY commit tran select sid = convert(varchar, @id) .END $ENDTEXT(12214253) $BIND(BIND1) type=SD_INFO4OPER action=ACTION_UPDATE class=1 order=null idname=sid $ENDBIND $ENDACTION $ACTION(ACTION2) name=Изменить class=2 form=FORM_VIEW target_state=null procedure=ap_61095000000099009 patterns=GENERIC_UPDATE user_define=1 isvisible=0 istab=1 posx=0 posy=0 width=3255 height=1804 proc_text=$TEXT(12214253) create procedure dbo.%PROC% @sid varchar(30) = null, .ARGLIST as .BEGIN('N') .CHECK_USER .CHECK_UPDATE .ARGCONVERT .TEST_UNIQUE .SD_BROK_CHECK begin tran .UPDATE_ITEMS .UPDATE .RELGEN .UPDATE_STATE .ACTION_HISTORY commit tran .END $ENDTEXT(12214253) $BIND(BIND1) type=SD_INFO4OPER action=ACTION_UPDATE class=1 order=null idname=sid $ENDBIND $ENDACTION $ACTION(SD_BROK_IN_DEL) name=Удалить class=9 form=null target_state=DEL procedure=ap_61095000000099011 patterns=GENERIC_MOVE user_define=0 isvisible=0 istab=0 posx=0 posy=0 width=0 height=0 proc_text=$TEXT(12214255) create procedure dbo.%PROC% @sid varchar(30) = null as .BEGIN('N') .CHECK_USER .CHECK_UPDATE begin tran .UPDATE_STATE .ACTION_HISTORY commit tran .END $ENDTEXT(12214255) $ENDACTION $ACTION(SD_BROK_IN_OPS) name=Провести class=9 form=null target_state=CRT procedure=ap_61095000000099012 patterns=GENERIC_MOVE user_define=1 isvisible=0 istab=0 posx=0 posy=0 width=0 height=0 proc_text=$TEXT(12214255) create procedure dbo.%PROC% @sid varchar(30) = null as .BEGIN('N') .CHECK_USER .CHECK_UPDATE begin tran declare @oper_date datetime, @stock_oper_sum money, @coupon_oper_sum money, @comm_oper_sum money, @fund_type_code varchar(255), @doc_name varchar(255), @oper_doc_name varchar(255), @partion_id numeric(18,0), @contr_id numeric(18,0), @asset_manager_id numeric(18,0), @coupon_deb_id numeric(18,0), @deb_comis_id numeric(18,0), @deb_id numeric(18,0), @cred_id numeric(18,0), @stock_price_cur_id numeric(18,0), @fund_plan_id numeric(18,0), @dates4oper_id numeric(18,0) declare @op_time_rep datetime, @assent_date_rep datetime, @reg_date_rep datetime, @is_fixed_rep int, @is_assent_rep int, @j_sum money declare @sd_scha_2005_d datetime select @sd_scha_2005_d= convert(datetime,(.GET_CONST('SD_SCHA_2005')),3) .GET_PROPS select @doc_name=.ITEM_NAME(@id) select @dates4oper_id=@id .GET_SD_OPER_DATE(@oper_date,@dates4oper_id) if @foundation_id is not null begin if .ITEM_STATE_CODE(@foundation_id) <> 'SET' .EXIT_MESSAGE('Отчет брокера должен находиться в статусе Принят') .TYPE_GET('SD_BROK_REP',@foundation_id,1) if @brok_id1 <> @organisation_id .EXIT_MESSAGE_PARM('Брокер в отчете не соответствует брокеру в сделке',@doc_name) if @fund_id1 <> @owner_id and @fund_id1 is not null .EXIT_MESSAGE_PARM('Фонд в отчете не соответствует фонду в сделке',@doc_name) if isnull(@uk_id1,0) <> isnull(@initiator_id,0) and @fund_id1 is not null .EXIT_MESSAGE_PARM('УК НПФ в отчете не соответствует УК НПФ в сделке',@doc_name) if @rep_oper_type1 = 0 select @dates4oper_id=@foundation_id end if isnull(@in_no,'') = '' .EXIT_MESSAGE_PARM('Не указан номер регистрации партии',@doc_name) select @fund_type_code=upper(.ITEM_TYPE_CODE(@owner_id)) -- партия if (select out_sum_method_id from td_pay_fond where id=@owner_id) = 1 select @partion_id=(select td_depo_docs.id from td_depo_docs where in_no='COMMON_ASSET_INPUT' and .ITEMS_EXISTS_BY_TYPE(td_depo_docs.id,'letter_in')) else select @partion_id=@id -- контрагент select @contr_id=@organisation_id -- суммы в проводки select @stock_price_cur_id=@pay_cur_id select @stock_oper_sum=@sum_in_paycur select @coupon_oper_sum=isnull(@coupon_account_sum,0) if @is_coupon_in_sum=1 select @stock_oper_sum=@stock_oper_sum - @coupon_oper_sum select @comm_oper_sum = isnull(@comm_brok,0)+isnull(@comm_depo,0)+isnull(@comm_ts,0) if isnull(@is_comm_in_sum,0) = 1 select @stock_oper_sum=@stock_oper_sum - @comm_oper_sum /* - isnull(@comm_other,0) */ ------------------- -- Счета ----------- if @fund_type_code = 'PIF_FUND' begin select @fund_plan_id=.ARG_PLAN('PIF_ACCOUNT') select @deb_id=.SD_ACCID_FROM_EFFNO(@fund_plan_id,'58.1') select @cred_id=.SD_ACCID_FROM_EFFNO(@fund_plan_id,'76.5.4') select @coupon_deb_id=.SD_ACCID_FROM_EFFNO(@fund_plan_id,'76.6') -- if .GET_CLASS_VALUE_CODE_FOR_ITEM(@owner_id,'PIF_COMIS_IN_TRADES_ACC','58') = '91' -- select @deb_comis_id=.SD_ACCID_FROM_EFFNO(@fund_plan_id,'91.7') -- else -- select @deb_comis_id=@deb_id end if @fund_type_code = 'NPF_FUND' begin select @fund_plan_id = .ARG_PLAN('NPF_ACCOUNT') select @asset_manager_id = isnull(@initiator_id,@owner_id) select @deb_id = .SD_ACCID_FROM_EFFNO(@fund_plan_id,'58.1') if @owner_id = @asset_manager_id -- через НПФ select @cred_id = .SD_ACCID_FROM_EFFNO(@fund_plan_id,'76.4') else -- через УК select @cred_id = .SD_ACCID_FROM_EFFNO(@fund_plan_id,'76.5') select @coupon_deb_id = .SD_ACCID_FROM_EFFNO(@fund_plan_id,'76.6') end .UPDATE_STATE .ACTION_HISTORY ----------- -- Проводки ----------- ---------------- -- По зачислению ---------------- select @oper_doc_name='Зачисление ЦБ по биржевой сделке: '+@doc_name --******* .OPERATION(@owner_id,@fund_plan_id,@oper_date,@deb_id,@cred_id,@stock_oper_sum,@stock_price_cur_id,@oper_date,@stock_qty,0,@oper_doc_name,N) --******** .UPDATE_SUBC(D,'stock_emis',@stock_id) .UPDATE_SUBC(D,'doc_item',@partion_id) if @fund_type_code = 'PIF_FUND' begin .UPDATE_SUBC(K,'partners',@contr_id) end if @fund_type_code = 'NPF_FUND' begin .UPDATE_SUBC(D,'asset_manager',@asset_manager_id) if @owner_id = @asset_manager_id -- через НПФ begin .UPDATE_SUBC(K,'partners',@contr_id) end else -- через УК begin .UPDATE_SUBC(K,'partners_cont',@contr_id) .UPDATE_SUBC(K,'partners',@asset_manager_id) end end .SUBC_CHECK -- По УНКД ----------- if isnull(@coupon_oper_sum,0) > 0 begin select @oper_doc_name='Зачисление УНКД по биржевой сделке: '+@doc_name .OPERATION(@owner_id,@fund_plan_id,@oper_date,@coupon_deb_id,@cred_id,@coupon_oper_sum,@stock_price_cur_id,@oper_date,@stock_qty,0,@oper_doc_name,N) .UPDATE_SUBC(D,'stock_emis',@stock_id) .UPDATE_SUBC(D,'doc_item',@partion_id) -- .UPDATE_SUBC(K,'partners',@contr_id) -- .UPDATE_SUBC(K,'exchange',@sale_place_id) if @fund_type_code = 'PIF_FUND' begin .UPDATE_SUBC(K,'partners',@contr_id) end if @fund_type_code = 'NPF_FUND' begin .UPDATE_SUBC(D,'asset_manager',@asset_manager_id) if @owner_id = @asset_manager_id -- через НПФ begin .UPDATE_SUBC(K,'partners',@contr_id) end else -- через УК begin .UPDATE_SUBC(K,'partners_cont',@contr_id) .UPDATE_SUBC(K,'partners',@asset_manager_id) end end .SUBC_CHECK end --------------- -- по комиссиям --------------- if isnull(@comm_oper_sum,0) > 0 begin select @oper_doc_name='Доп.расходы по приобретению ЦБ по биржевой сделке: '+@doc_name .OPERATION(@owner_id,@fund_plan_id,@oper_date,@deb_id,@cred_id,@comm_oper_sum,@stock_price_cur_id,@oper_date,0,0,@oper_doc_name,N) .UPDATE_SUBC(D,'stock_emis',@stock_id) .UPDATE_SUBC(D,'doc_item',@partion_id) -- --.UPDATE_SUBC(K,'partners',@contr_id) -- --.UPDATE_SUBC(K,'exchange',@sale_place_id) if @fund_type_code = 'PIF_FUND' begin .UPDATE_SUBC(K,'partners',@contr_id) end if @fund_type_code = 'NPF_FUND' begin .UPDATE_SUBC(D,'asset_manager',@asset_manager_id) if @owner_id = @asset_manager_id -- через НПФ begin .UPDATE_SUBC(K,'partners',@contr_id) end else -- через УК begin .UPDATE_SUBC(K,'partners_cont',@contr_id) .UPDATE_SUBC(K,'partners',@asset_manager_id) end end /* if @fund_type_code = 'NPF_FUND' begin if @deb_comis_id=@deb_id begin .UPDATE_SUBC(D,'asset_manager',@asset_manager_id) end .UPDATE_SUBC(K,'asset_manager',@asset_manager_id) end */ .SUBC_CHECK end -- Запись в журнал -- .SD_INDOC_CREATE4OPER(@id,null,@transaction_date,@transaction_no,@organisation_id,@owner_id,null,null,null) if @foundation_id is not null and @dates4oper_id=@foundation_id begin select @op_time_rep=op_time, @assent_date_rep=assent_date, @reg_date_rep=reg_date, @is_fixed_rep=is_fixed, @is_assent_rep=is_assent from t_sd_info4oper where id = @foundation_id update t_sd_info4oper set op_no=null, op_time=@op_time_rep, assent_date=@assent_date_rep, reg_date=@reg_date_rep, is_fixed=@is_fixed_rep, is_assent=(case isnull(@is_assent_rep,0) when 0 then 0 else is_assent end) where id = @id end select @j_sum=@stock_oper_sum + @coupon_oper_sum + @comm_oper_sum /* if @deb_comis_id=@deb_id select @j_sum=@stock_oper_sum + @coupon_oper_sum + @comm_oper_sum /* + isnull(@comm_other,0) */ else select @j_sum=@stock_oper_sum + @coupon_oper_sum */ .SD_ASSENT_ADD(@id,@stock_id,@j_sum,@stock_qty,@owner_id,null) .SD_ASSET_OPER_ADD(@id,@stock_id,@j_sum,@stock_qty,@owner_id,null,1) commit tran .END $ENDTEXT(12214255) $ENDACTION $ACTION(SD_BROK_IN_RET) name=Отменить class=9 form=null target_state=EDIT procedure=ap_61095000000099013 patterns=GENERIC_MOVE user_define=0 isvisible=0 istab=0 posx=0 posy=0 width=0 height=0 proc_text=$TEXT(12214255) create procedure dbo.%PROC% @sid varchar(30) = null as .BEGIN('N') .CHECK_USER .CHECK_UPDATE begin tran .UPDATE_STATE .ACTION_HISTORY .OPERS_ROLL .SD_ASSENT_DEL(@id) .SD_ASSET_OPER_DEL(@id) commit tran .END $ENDTEXT(12214255) $ENDACTION $STATE2ACTION(CRT.ACTION1) state=CRT action=ACTION1 is_available=0 $ENDSTATE2ACTION $STATE2ACTION(CRT.ACTION2) state=CRT action=ACTION2 is_available=0 $ENDSTATE2ACTION $STATE2ACTION(CRT.FORM_VIEW) state=CRT action=FORM_VIEW is_available=1 $ENDSTATE2ACTION $STATE2ACTION(CRT.SD_BROK_IN_DEL) state=CRT action=SD_BROK_IN_DEL is_available=0 $ENDSTATE2ACTION $STATE2ACTION(CRT.SD_BROK_IN_OPS) state=CRT action=SD_BROK_IN_OPS is_available=0 $ENDSTATE2ACTION $STATE2ACTION(CRT.SD_BROK_IN_RET) state=CRT action=SD_BROK_IN_RET is_available=1 $ENDSTATE2ACTION $STATE2ACTION(DEL.ACTION1) state=DEL action=ACTION1 is_available=0 $ENDSTATE2ACTION $STATE2ACTION(DEL.ACTION2) state=DEL action=ACTION2 is_available=0 $ENDSTATE2ACTION $STATE2ACTION(DEL.FORM_VIEW) state=DEL action=FORM_VIEW is_available=0 $ENDSTATE2ACTION $STATE2ACTION(DEL.SD_BROK_IN_DEL) state=DEL action=SD_BROK_IN_DEL is_available=0 $ENDSTATE2ACTION $STATE2ACTION(DEL.SD_BROK_IN_OPS) state=DEL action=SD_BROK_IN_OPS is_available=0 $ENDSTATE2ACTION $STATE2ACTION(DEL.SD_BROK_IN_RET) state=DEL action=SD_BROK_IN_RET is_available=0 $ENDSTATE2ACTION $STATE2ACTION(EDIT.ACTION1) state=EDIT action=ACTION1 is_available=0 $ENDSTATE2ACTION $STATE2ACTION(EDIT.ACTION2) state=EDIT action=ACTION2 is_available=1 $ENDSTATE2ACTION $STATE2ACTION(EDIT.FORM_VIEW) state=EDIT action=FORM_VIEW is_available=1 $ENDSTATE2ACTION $STATE2ACTION(EDIT.SD_BROK_IN_DEL) state=EDIT action=SD_BROK_IN_DEL is_available=1 $ENDSTATE2ACTION $STATE2ACTION(EDIT.SD_BROK_IN_OPS) state=EDIT action=SD_BROK_IN_OPS is_available=1 $ENDSTATE2ACTION $STATE2ACTION(EDIT.SD_BROK_IN_RET) state=EDIT action=SD_BROK_IN_RET is_available=0 $ENDSTATE2ACTION $STATE2ACTION(NEW.ACTION1) state=NEW action=ACTION1 is_available=1 $ENDSTATE2ACTION $STATE2ACTION(NEW.ACTION2) state=NEW action=ACTION2 is_available=0 $ENDSTATE2ACTION $STATE2ACTION(NEW.FORM_VIEW) state=NEW action=FORM_VIEW is_available=0 $ENDSTATE2ACTION $STATE2ACTION(NEW.SD_BROK_IN_DEL) state=NEW action=SD_BROK_IN_DEL is_available=0 $ENDSTATE2ACTION $STATE2ACTION(NEW.SD_BROK_IN_OPS) state=NEW action=SD_BROK_IN_OPS is_available=0 $ENDSTATE2ACTION $STATE2ACTION(NEW.SD_BROK_IN_RET) state=NEW action=SD_BROK_IN_RET is_available=0 $ENDSTATE2ACTION $STATE2PROP(CRT.COMM_BROK) state=CRT prop=COMM_BROK enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.COMM_DEPO) state=CRT prop=COMM_DEPO enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.COMM_TS) state=CRT prop=COMM_TS enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.COUPON_ACCOUNT_SUM) state=CRT prop=COUPON_ACCOUNT_SUM enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.COUPON_DEAL_SUM) state=CRT prop=COUPON_DEAL_SUM enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.CUR_ID) state=CRT prop=CUR_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.CUR_PRICE2PAY_RATE) state=CRT prop=CUR_PRICE2PAY_RATE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.DEPO_DOC_TYPE) state=CRT prop=DEPO_DOC_TYPE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.DIRECTION_ID) state=CRT prop=DIRECTION_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.DOC_COMMENT) state=CRT prop=DOC_COMMENT enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.FOUNDATION_ID) state=CRT prop=FOUNDATION_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.INITIATOR_ID) state=CRT prop=INITIATOR_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.IN_DATE) state=CRT prop=IN_DATE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.IN_NO) state=CRT prop=IN_NO enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.IS_COMM_IN_SUM) state=CRT prop=IS_COMM_IN_SUM enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.IS_COUPON_IN_SUM) state=CRT prop=IS_COUPON_IN_SUM enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.MODE_ID) state=CRT prop=MODE_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.ORGANISATION_ID) state=CRT prop=ORGANISATION_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.OWNER_ID) state=CRT prop=OWNER_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.PAY_CUR_ID) state=CRT prop=PAY_CUR_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.RATE_DATE) state=CRT prop=RATE_DATE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.SALE_PLACE_ID) state=CRT prop=SALE_PLACE_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.STOCK_ID) state=CRT prop=STOCK_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.STOCK_PRICE) state=CRT prop=STOCK_PRICE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.STOCK_QTY) state=CRT prop=STOCK_QTY enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.SUMM_DOC_TOTAL) state=CRT prop=SUMM_DOC_TOTAL enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.SUM_IN_PAYCUR) state=CRT prop=SUM_IN_PAYCUR enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.TRANSACTION_DATE) state=CRT prop=TRANSACTION_DATE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.TRANSACTION_NO) state=CRT prop=TRANSACTION_NO enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(CRT.TRANSACTION_TIME) state=CRT prop=TRANSACTION_TIME enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.COMM_BROK) state=DEL prop=COMM_BROK enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.COMM_DEPO) state=DEL prop=COMM_DEPO enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.COMM_TS) state=DEL prop=COMM_TS enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.COUPON_ACCOUNT_SUM) state=DEL prop=COUPON_ACCOUNT_SUM enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.COUPON_DEAL_SUM) state=DEL prop=COUPON_DEAL_SUM enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.CUR_ID) state=DEL prop=CUR_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.CUR_PRICE2PAY_RATE) state=DEL prop=CUR_PRICE2PAY_RATE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.DEPO_DOC_TYPE) state=DEL prop=DEPO_DOC_TYPE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.DIRECTION_ID) state=DEL prop=DIRECTION_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.DOC_COMMENT) state=DEL prop=DOC_COMMENT enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.FOUNDATION_ID) state=DEL prop=FOUNDATION_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.INITIATOR_ID) state=DEL prop=INITIATOR_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.IN_DATE) state=DEL prop=IN_DATE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.IN_NO) state=DEL prop=IN_NO enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.IS_COMM_IN_SUM) state=DEL prop=IS_COMM_IN_SUM enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.IS_COUPON_IN_SUM) state=DEL prop=IS_COUPON_IN_SUM enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.MODE_ID) state=DEL prop=MODE_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.ORGANISATION_ID) state=DEL prop=ORGANISATION_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.OWNER_ID) state=DEL prop=OWNER_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.PAY_CUR_ID) state=DEL prop=PAY_CUR_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.RATE_DATE) state=DEL prop=RATE_DATE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.SALE_PLACE_ID) state=DEL prop=SALE_PLACE_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.STOCK_ID) state=DEL prop=STOCK_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.STOCK_PRICE) state=DEL prop=STOCK_PRICE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.STOCK_QTY) state=DEL prop=STOCK_QTY enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.SUMM_DOC_TOTAL) state=DEL prop=SUMM_DOC_TOTAL enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.SUM_IN_PAYCUR) state=DEL prop=SUM_IN_PAYCUR enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.TRANSACTION_DATE) state=DEL prop=TRANSACTION_DATE enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.TRANSACTION_NO) state=DEL prop=TRANSACTION_NO enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(DEL.TRANSACTION_TIME) state=DEL prop=TRANSACTION_TIME enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(EDIT.COMM_BROK) state=EDIT prop=COMM_BROK enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.COMM_DEPO) state=EDIT prop=COMM_DEPO enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.COMM_TS) state=EDIT prop=COMM_TS enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.COUPON_ACCOUNT_SUM) state=EDIT prop=COUPON_ACCOUNT_SUM enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.COUPON_DEAL_SUM) state=EDIT prop=COUPON_DEAL_SUM enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.CUR_ID) state=EDIT prop=CUR_ID enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.CUR_PRICE2PAY_RATE) state=EDIT prop=CUR_PRICE2PAY_RATE enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.DEPO_DOC_TYPE) state=EDIT prop=DEPO_DOC_TYPE enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.DIRECTION_ID) state=EDIT prop=DIRECTION_ID enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.DOC_COMMENT) state=EDIT prop=DOC_COMMENT enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.FOUNDATION_ID) state=EDIT prop=FOUNDATION_ID enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.INITIATOR_ID) state=EDIT prop=INITIATOR_ID enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.IN_DATE) state=EDIT prop=IN_DATE enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.IN_NO) state=EDIT prop=IN_NO enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.IS_COMM_IN_SUM) state=EDIT prop=IS_COMM_IN_SUM enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.IS_COUPON_IN_SUM) state=EDIT prop=IS_COUPON_IN_SUM enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.MODE_ID) state=EDIT prop=MODE_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(EDIT.ORGANISATION_ID) state=EDIT prop=ORGANISATION_ID enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.OWNER_ID) state=EDIT prop=OWNER_ID enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.PAY_CUR_ID) state=EDIT prop=PAY_CUR_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(EDIT.RATE_DATE) state=EDIT prop=RATE_DATE enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.SALE_PLACE_ID) state=EDIT prop=SALE_PLACE_ID enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.STOCK_ID) state=EDIT prop=STOCK_ID enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.STOCK_PRICE) state=EDIT prop=STOCK_PRICE enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.STOCK_QTY) state=EDIT prop=STOCK_QTY enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.SUMM_DOC_TOTAL) state=EDIT prop=SUMM_DOC_TOTAL enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.SUM_IN_PAYCUR) state=EDIT prop=SUM_IN_PAYCUR enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(EDIT.TRANSACTION_DATE) state=EDIT prop=TRANSACTION_DATE enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.TRANSACTION_NO) state=EDIT prop=TRANSACTION_NO enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(EDIT.TRANSACTION_TIME) state=EDIT prop=TRANSACTION_TIME enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.COMM_BROK) state=NEW prop=COMM_BROK enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.COMM_DEPO) state=NEW prop=COMM_DEPO enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.COMM_TS) state=NEW prop=COMM_TS enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.COUPON_ACCOUNT_SUM) state=NEW prop=COUPON_ACCOUNT_SUM enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.COUPON_DEAL_SUM) state=NEW prop=COUPON_DEAL_SUM enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.CUR_ID) state=NEW prop=CUR_ID enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.CUR_PRICE2PAY_RATE) state=NEW prop=CUR_PRICE2PAY_RATE enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.DEPO_DOC_TYPE) state=NEW prop=DEPO_DOC_TYPE enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.DIRECTION_ID) state=NEW prop=DIRECTION_ID enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.DOC_COMMENT) state=NEW prop=DOC_COMMENT enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.FOUNDATION_ID) state=NEW prop=FOUNDATION_ID enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.INITIATOR_ID) state=NEW prop=INITIATOR_ID enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.IN_DATE) state=NEW prop=IN_DATE enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.IN_NO) state=NEW prop=IN_NO enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.IS_COMM_IN_SUM) state=NEW prop=IS_COMM_IN_SUM enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.IS_COUPON_IN_SUM) state=NEW prop=IS_COUPON_IN_SUM enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.MODE_ID) state=NEW prop=MODE_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(NEW.ORGANISATION_ID) state=NEW prop=ORGANISATION_ID enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.OWNER_ID) state=NEW prop=OWNER_ID enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.PAY_CUR_ID) state=NEW prop=PAY_CUR_ID enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(NEW.RATE_DATE) state=NEW prop=RATE_DATE enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.SALE_PLACE_ID) state=NEW prop=SALE_PLACE_ID enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.STOCK_ID) state=NEW prop=STOCK_ID enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.STOCK_PRICE) state=NEW prop=STOCK_PRICE enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.STOCK_QTY) state=NEW prop=STOCK_QTY enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.SUMM_DOC_TOTAL) state=NEW prop=SUMM_DOC_TOTAL enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.SUM_IN_PAYCUR) state=NEW prop=SUM_IN_PAYCUR enable=0 mandatory=0 visible=0 $ENDSTATE2PROP $STATE2PROP(NEW.TRANSACTION_DATE) state=NEW prop=TRANSACTION_DATE enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.TRANSACTION_NO) state=NEW prop=TRANSACTION_NO enable=1 mandatory=1 visible=1 $ENDSTATE2PROP $STATE2PROP(NEW.TRANSACTION_TIME) state=NEW prop=TRANSACTION_TIME enable=1 mandatory=0 visible=1 $ENDSTATE2PROP $ENDDOC