1. <form id='eefcc'></form>
        <bdo id='eefcc'><sup id='eefcc'><div id='eefcc'><bdo id='eefcc'></bdo></div></sup></bdo>

          • 思迅商云8添加查询历史库存记录

            作者: 冬冬 分类: 思迅软件 发布时间: 2017-03-27 15:00

            适用范围:所有机构均适用
            — 菜单位置:仓库 —- 更多功能 —- 商品历史库存查询
            — 使用限制及风险:历史库存实际上为查询日期最近一次的结存数量。

            use hbposv8
            –分部用 use hbposv8_branch
            —-商品历史库存查询
            insert into t_sys_menu(menu_id,menu_name,menu_code,menu_type,open_type,open_parameter,branch_flag,normal_flag,flag1,flag2,flag3,memo,menu_df_name)
            values(‘6606′,’商品历史库存查询’,’w_parent_query_multi_new’,’BROW’,’S’,’6606′,’111111′,’0′,’1′,’0′,’0′,”,’商品历史库存查询’)
            go
            insert into t_sys_report(report_name,report_code,report_module,dw_type,report_flag,other1,report_sort,report_id,modi_oper)
            values(‘商品历史库存查询’,’d_im_stock_history’,’仓库管理’,’G’,’S’,’6606′,’1′,”,”)
            go
            /*增加报表ID, 并赋初值*/
            if not exists( select 1 from syscolumns where name = ‘report_id’ and object_name(id)=’t_sys_report’)
            alter table t_sys_report add report_id char(4)
            go
            Declare @report_id int
            select @report_id = isnull(max(substring(report_id,2,3)),0) from t_sys_report
            update t_sys_report
            set report_id = ‘R’ + Right(‘000’ + convert(varchar(3),@report_id),3),
            @report_id = @report_id + 1
            where isnull(report_id,”)=” and other1 = ‘6606’ and report_name = ‘商品历史库存查询’ and report_code = ‘d_im_stock_history’
            go
            /*添加报表到权限设置*/
            INSERT INTO t_sys_oper_grant(oper_id, func_id, other)
            select o.oper_id, r.report_id, ”
            from t_sys_operator o,
            (select report_id
            from t_sys_report
            where report_id not in (select distinct func_id from t_sys_oper_grant)
            ) r
            go
            INSERT INTO t_sys_oper_grant(oper_id, func_id, other)
            select o.oper_id, m.menu_id, ”
            from t_sys_operator o,
            (
            select menu_id
            from t_sys_menu
            where (menu_name <> ‘-‘) and menu_id not in (select distinct func_id from t_sys_oper_grant)
            ) m
            go
            update t_sys_oper_grant set grant0=’1′, grant1=’1′, grant2=’1′, grant3=’1′, grant4=’1′, grant5=’1′
            where oper_id=’1001’
            go

            如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!