
--插入[现存量查询]报表界面格式
--delete System_ModuleFormat where module='Stock_Report_OnHand'
if(select count(1) from System_ModuleFormat where module='Stock_Report_OnHand' and field='i_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OnHand' as module,'wh_id' as field,
	'仓库id' as field_name,'仓库id' as title,
	60 as width,100 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OnHand' as module,'wh_code' as field,
	'仓库编码' as field_name,'仓库编码' as title,
	60 as width,110 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OnHand' as module,'wh_name' as field,
	'仓库名称' as field_name,'仓库名称' as title,
	70 as width,120 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OnHand' as module,'i_id' as field,
	'存货ID' as field_name,'存货ID' as title,
	60 as width,130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OnHand' as module,'i_code' as field,
	'存货编码' as field_name,'存货编码' as title,
	120 as width,140 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OnHand' as module,'i_name' as field,
	'存货名称' as field_name,'存货名称' as title,
	120 as width,150 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_Report_OnHand' as module,'ic_name' as field,
	'存货分类' as field_name,'存货分类' as title,
	103 as width,160 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OnHand' as module,'quantity' as field,
	'结存数量' as field_name,'结存数量' as title,
	80 as width,170 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OnHand' as module,'num' as field,
	'结存件数' as field_name,'结存件数' as title,
	80 as width,171 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OnHand' as module,'free1' as field,
	'自由项1' as field_name,'自由项1' as title,
	70 as width,180 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OnHand' as module,'free2' as field,
	'自由项2' as field_name,'自由项2' as title,
	70 as width,190 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OnHand' as module,'batch' as field,
	'批次' as field_name,'批次' as title,
	80 as width,200 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OnHand' as module,'standard' as field,
	'规格型号' as field_name,'规格型号' as title,
	120 as width,210 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OnHand' as module,'munit' as field,
	'单位' as field_name,'单位' as title,
	60 as width,220 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OnHand' as module,'aunit' as field,
	'辅计量单位' as field_name,'辅计量单位' as title,
	60as width,230 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OnHand' as module,'sdefine1' as field,
	'字符自定义项1' as field_name,'字符自定义项1' as title,
	80 as width,1010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OnHand' as module,'sdefine2' as field,
	'字符自定义项2' as field_name,'字符自定义项2' as title,
	80 as width,1020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OnHand' as module,'sdefine3' as field,
	'字符自定义项3' as field_name,'字符自定义项3' as title,
	80 as width,1030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OnHand' as module,'sdefine4' as field,
	'字符自定义项4' as field_name,'字符自定义项4' as title,
	80 as width,1040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OnHand' as module,'sdefine5' as field,
	'字符自定义项5' as field_name,'字符自定义项5' as title,
	80 as width,1050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OnHand' as module,'ndefine1' as field,
	'数值自定义项1' as field_name,'数值自定义项1' as title,
	80 as width,1110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OnHand' as module,'ndefine2' as field,
	'数值自定义项2' as field_name,'数值自定义项2' as title,
	80 as width,1120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OnHand' as module,'ndefine3' as field,
	'数值自定义项3' as field_name,'数值自定义项3' as title,
	80 as width,1130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OnHand' as module,'ndefine4' as field,
	'数值自定义项4' as field_name,'数值自定义项4' as title,
	80 as width,1140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OnHand' as module,'ndefine5' as field,
	'数值自定义项5' as field_name,'数值自定义项5' as title,
	80 as width,1150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
end
/**/GO


--插入[出入库流水账]报表界面格式
if(select count(1) from System_ModuleFormat where module='Stock_Report_InOut_Details' and field='ios_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'ios_id' as field,
	'单据子表ID' as field_name,'单据子表ID' as title,
	60 as width,1 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'io_id' as field,
	'单据主表ID' as field_name,'单据主表ID' as title,
	60 as width,2 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'order_number' as field,
	'单据号' as field_name,'单据号' as title,
	120 as width,110 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'new_date' as field,
	'单据日期' as field_name,'单据日期' as title,
	70 as width,120 as sort,1 as show,0 as hidden,0 as sum_field,'date' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'order_type' as field,
	'单据类型ID' as field_name,'单据类型ID' as title,
	70 as width,125 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'ot_name' as field,
	'单据类型' as field_name,'单据类型' as title,
	70 as width,125 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'wh_id' as field,
	'仓库ID' as field_name,'仓库ID' as title,
	60 as width,130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'wh_code' as field,
	'仓库编码' as field_name,'仓库编码' as title,
	60 as width,140 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'wh_name' as field,
	'仓库名称' as field_name,'仓库名称' as title,
	60 as width,150 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'i_code' as field,
	'存货编码' as field_name,'存货编码' as title,
	98 as width,160 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'i_name' as field,
	'存货名称' as field_name,'存货名称' as title,
	120 as width,170 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'standard' as field,
	'规格型号' as field_name,'规格型号' as title,
	120 as width,180 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'munit' as field,
	'单位' as field_name,'单位' as title,
	40 as width,190 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'aunit' as field,
	'辅计单位' as field_name,'辅计量单位' as title,
	60 as width,200 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'free1' as field,
	'自由项1' as field_name,'自由项1' as title,
	80 as width,210 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'free2' as field,
	'自由项2' as field_name,'自由项2' as title,
	80 as width,220 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'batch' as field,
	'批次' as field_name,'批次' as title,
	80 as width,230 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'quantity' as field,
	'数量' as field_name,'数量' as title,
	60 as width,240 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'num' as field,
	'件数' as field_name,'件数' as title,
	60 as width,250 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'convert_rate' as field,
	'换算率' as field_name,'换算率' as title,
	60 as width,260 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,auth_view)
	select 'Stock_Report_InOut_Details' as module,'unit_price' as field,
	'无税单价' as field_name,'无税单价' as title,
	60 as width,270 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,
	'Stock_Report_InOut_Details_ViewPrice' as auth_view;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,auth_view)
	select 'Stock_Report_InOut_Details' as module,'total_price' as field,
	'无税金额' as field_name,'无税金额' as title,
	60 as width,280 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit,
	'Stock_Report_InOut_Details_ViewPrice' as auth_view;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'ic_name' as field,
	'存货分类' as field_name,'存货分类' as title,
	80 as width,300 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'from_type' as field,
	'单据来源' as field_name,'单据来源' as title,
	70 as width,310 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'bus_type' as field,
	'业务类型' as field_name,'业务类型' as title,
	70 as width,320 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'d_remark' as field,
	'表体备注' as field_name,'表体备注' as title,
	100 as width,330 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'iot_name' as field,
	'收发类型' as field_name,'收发类型' as title,
	60 as width,340 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'dep_name' as field,
	'部门' as field_name,'部门' as title,
	60 as width,350 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
		
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'new_user' as field,
	'新增人' as field_name,'新增人' as title,
	50 as width,360 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'verify_user' as field,
	'审核人' as field_name,'审核人' as title,
	50 as width,370 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'remark' as field,
	'表头备注' as field_name,'表头备注' as title,
	100 as width,400 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'d_sdefine1' as field,
	'子表字符自定义项1' as field_name,'子表字符自定义项1' as title,
	120 as width,1010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'d_sdefine2' as field,
	'子表字符自定义项2' as field_name,'子表字符自定义项2' as title,
	60 as width,1020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'d_sdefine3' as field,
	'子表字符自定义项3' as field_name,'子表字符自定义项3' as title,
	60 as width,1030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'d_sdefine4' as field,
	'子表字符自定义项4' as field_name,'子表字符自定义项4' as title,
	60 as width,1040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'d_sdefine5' as field,
	'子表字符自定义项5' as field_name,'子表字符自定义项5' as title,
	60 as width,1050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'d_ndefine1' as field,
	'子表数值自定义项1' as field_name,'子表数值自定义项1' as title,
	60 as width,1110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'d_ndefine2' as field,
	'子表数值自定义项2' as field_name,'子表数值自定义项2' as title,
	60 as width,1120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'d_ndefine3' as field,
	'子表数值自定义项3' as field_name,'子表数值自定义项3' as title,
	60 as width,1130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'d_ndefine4' as field,
	'子表数值自定义项4' as field_name,'子表数值自定义项4' as title,
	60 as width,1140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'d_ndefine5' as field,
	'子表数值自定义项5' as field_name,'子表数值自定义项5' as title,
	60 as width,1150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'sdefine1' as field,
	'主表字符自定义项1' as field_name,'主表字符自定义项1' as title,
	120 as width,2010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'sdefine2' as field,
	'主表字符自定义项2' as field_name,'主表字符自定义项2' as title,
	60 as width,2020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'sdefine3' as field,
	'主表字符自定义项3' as field_name,'主表字符自定义项3' as title,
	60 as width,2030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'sdefine4' as field,
	'主表字符自定义项4' as field_name,'主表字符自定义项4' as title,
	60 as width,2040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'sdefine5' as field,
	'主表字符自定义项5' as field_name,'主表字符自定义项5' as title,
	60 as width,2050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'ndefine1' as field,
	'主表数值自定义项1' as field_name,'主表数值自定义项1' as title,
	60 as width,2110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'ndefine2' as field,
	'主表数值自定义项2' as field_name,'主表数值自定义项2' as title,
	60 as width,2120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'ndefine3' as field,
	'主表数值自定义项3' as field_name,'主表数值自定义项3' as title,
	60 as width,2130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'ndefine4' as field,
	'主表数值自定义项4' as field_name,'主表数值自定义项4' as title,
	60 as width,2140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'ndefine5' as field,
	'主表数值自定义项5' as field_name,'主表数值自定义项5' as title,
	60 as width,2150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'d_inv_sdefine1' as field,
	'存货字符自定义项1' as field_name,'存货字符自定义项1' as title,
	80 as width,3010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'d_inv_sdefine2' as field,
	'存货字符自定义项2' as field_name,'存货字符自定义项2' as title,
	80 as width,3020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'d_inv_sdefine3' as field,
	'存货字符自定义项3' as field_name,'存货字符自定义项3' as title,
	80 as width,3030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'d_inv_sdefine4' as field,
	'存货字符自定义项4' as field_name,'存货字符自定义项4' as title,
	80 as width,3040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'d_inv_sdefine5' as field,
	'存货字符自定义项5' as field_name,'存货字符自定义项5' as title,
	80 as width,3050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'d_inv_ndefine1' as field,
	'存货数值自定义项1' as field_name,'存货数值自定义项1' as title,
	80 as width,3110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'d_inv_ndefine2' as field,
	'存货数值自定义项2' as field_name,'存货数值自定义项2' as title,
	80 as width,3120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'d_inv_ndefine3' as field,
	'存货数值自定义项3' as field_name,'存货数值自定义项3' as title,
	80 as width,3130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'d_inv_ndefine4' as field,
	'存货数值自定义项4' as field_name,'存货数值自定义项4' as title,
	80 as width,3140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_InOut_Details' as module,'d_inv_ndefine5' as field,
	'存货数值自定义项5' as field_name,'存货数值自定义项5' as title,
	80 as width,3150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

end
/**/GO

--插入[其它入库单明细表]报表界面格式
if(select count(1) from System_ModuleFormat where module='Stock_Report_OtherIn_Details' and field='ios_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'ios_id' as field,
	'入库单子表ID' as field_name,'入库单子表ID' as title,
	60 as width,1 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'io_id' as field,
	'入库单主表ID' as field_name,'入库单主表ID' as title,
	60 as width,2 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'order_number' as field,
	'入库单号' as field_name,'入库单号' as title,
	120 as width,110 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'new_date' as field,
	'入库日期' as field_name,'入库日期' as title,
	70 as width,120 as sort,1 as show,0 as hidden,0 as sum_field,'date' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'wh_id' as field,
	'仓库ID' as field_name,'仓库ID' as title,
	60 as width,130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'wh_code' as field,
	'仓库编码' as field_name,'仓库编码' as title,
	60 as width,140 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'wh_name' as field,
	'仓库名称' as field_name,'仓库名称' as title,
	60 as width,150 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'i_code' as field,
	'存货编码' as field_name,'存货编码' as title,
	98 as width,160 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'i_name' as field,
	'存货名称' as field_name,'存货名称' as title,
	120 as width,170 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'standard' as field,
	'规格型号' as field_name,'规格型号' as title,
	120 as width,180 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'munit' as field,
	'单位' as field_name,'单位' as title,
	40 as width,190 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'aunit' as field,
	'辅计单位' as field_name,'辅计量单位' as title,
	60 as width,200 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'free1' as field,
	'自由项1' as field_name,'自由项1' as title,
	80 as width,210 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'free2' as field,
	'自由项2' as field_name,'自由项2' as title,
	80 as width,220 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'batch' as field,
	'批次' as field_name,'批次' as title,
	80 as width,230 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'quantity' as field,
	'数量' as field_name,'数量' as title,
	60 as width,240 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'num' as field,
	'件数' as field_name,'件数' as title,
	60 as width,250 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'convert_rate' as field,
	'换算率' as field_name,'换算率' as title,
	60 as width,260 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,auth_view)
	select 'Stock_Report_OtherIn_Details' as module,'unit_price' as field,
	'无税单价' as field_name,'无税单价' as title,
	60 as width,270 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,
	'Stock_Report_OtherIn_Details_ViewPrice' as auth_view;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,auth_view)
	select 'Stock_Report_OtherIn_Details' as module,'total_price' as field,
	'无税金额' as field_name,'无税金额' as title,
	60 as width,280 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit,
	'Stock_Report_OtherIn_Details_ViewPrice' as auth_view;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'ic_name' as field,
	'存货分类' as field_name,'存货分类' as title,
	100 as width,300 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'d_remark' as field,
	'表体备注' as field_name,'表体备注' as title,
	100 as width,310 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'iot_name' as field,
	'收发类型' as field_name,'收发类型' as title,
	60 as width,320 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'dep_name' as field,
	'部门' as field_name,'部门' as title,
	60 as width,330 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
		
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'new_user' as field,
	'新增人' as field_name,'新增人' as title,
	50 as width,340 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'verify_user' as field,
	'审核人' as field_name,'审核人' as title,
	50 as width,350 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'remark' as field,
	'表头备注' as field_name,'表头备注' as title,
	100 as width,360 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'d_sdefine1' as field,
	'子表字符自定义项1' as field_name,'子表字符自定义项1' as title,
	120 as width,1010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'d_sdefine2' as field,
	'子表字符自定义项2' as field_name,'子表字符自定义项2' as title,
	60 as width,1020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'d_sdefine3' as field,
	'子表字符自定义项3' as field_name,'子表字符自定义项3' as title,
	60 as width,1030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'d_sdefine4' as field,
	'子表字符自定义项4' as field_name,'子表字符自定义项4' as title,
	60 as width,1040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'d_sdefine5' as field,
	'子表字符自定义项5' as field_name,'子表字符自定义项5' as title,
	60 as width,1050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'d_ndefine1' as field,
	'子表数值自定义项1' as field_name,'子表数值自定义项1' as title,
	60 as width,1110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'d_ndefine2' as field,
	'子表数值自定义项2' as field_name,'子表数值自定义项2' as title,
	60 as width,1120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'d_ndefine3' as field,
	'子表数值自定义项3' as field_name,'子表数值自定义项3' as title,
	60 as width,1130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'d_ndefine4' as field,
	'子表数值自定义项4' as field_name,'子表数值自定义项4' as title,
	60 as width,1140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'d_ndefine5' as field,
	'子表数值自定义项5' as field_name,'子表数值自定义项5' as title,
	60 as width,1150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'sdefine1' as field,
	'主表字符自定义项1' as field_name,'主表字符自定义项1' as title,
	120 as width,2010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'sdefine2' as field,
	'主表字符自定义项2' as field_name,'主表字符自定义项2' as title,
	60 as width,2020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'sdefine3' as field,
	'主表字符自定义项3' as field_name,'主表字符自定义项3' as title,
	60 as width,2030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'sdefine4' as field,
	'主表字符自定义项4' as field_name,'主表字符自定义项4' as title,
	60 as width,2040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'sdefine5' as field,
	'主表字符自定义项5' as field_name,'主表字符自定义项5' as title,
	60 as width,2050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'ndefine1' as field,
	'主表数值自定义项1' as field_name,'主表数值自定义项1' as title,
	60 as width,2110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'ndefine2' as field,
	'主表数值自定义项2' as field_name,'主表数值自定义项2' as title,
	60 as width,2120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'ndefine3' as field,
	'主表数值自定义项3' as field_name,'主表数值自定义项3' as title,
	60 as width,2130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'ndefine4' as field,
	'主表数值自定义项4' as field_name,'主表数值自定义项4' as title,
	60 as width,2140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'ndefine5' as field,
	'主表数值自定义项5' as field_name,'主表数值自定义项5' as title,
	60 as width,2150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'d_inv_sdefine1' as field,
	'存货字符自定义项1' as field_name,'存货字符自定义项1' as title,
	80 as width,3010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'d_inv_sdefine2' as field,
	'存货字符自定义项2' as field_name,'存货字符自定义项2' as title,
	80 as width,3020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'d_inv_sdefine3' as field,
	'存货字符自定义项3' as field_name,'存货字符自定义项3' as title,
	80 as width,3030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'d_inv_sdefine4' as field,
	'存货字符自定义项4' as field_name,'存货字符自定义项4' as title,
	80 as width,3040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'d_inv_sdefine5' as field,
	'存货字符自定义项5' as field_name,'存货字符自定义项5' as title,
	80 as width,3050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'d_inv_ndefine1' as field,
	'存货数值自定义项1' as field_name,'存货数值自定义项1' as title,
	80 as width,3110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'d_inv_ndefine2' as field,
	'存货数值自定义项2' as field_name,'存货数值自定义项2' as title,
	80 as width,3120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'d_inv_ndefine3' as field,
	'存货数值自定义项3' as field_name,'存货数值自定义项3' as title,
	80 as width,3130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'d_inv_ndefine4' as field,
	'存货数值自定义项4' as field_name,'存货数值自定义项4' as title,
	80 as width,3140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherIn_Details' as module,'d_inv_ndefine5' as field,
	'存货数值自定义项5' as field_name,'存货数值自定义项5' as title,
	80 as width,3150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

end
/**/GO


--插入[其它出库单明细表]报表界面格式
if(select count(1) from System_ModuleFormat where module='Stock_Report_OtherOut_Details' and field='ios_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'ios_id' as field,
	'出库单子表ID' as field_name,'出库单子表ID' as title,
	60 as width,1 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'io_id' as field,
	'出库单主表ID' as field_name,'出库单主表ID' as title,
	60 as width,2 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'order_number' as field,
	'出库单号' as field_name,'出库单号' as title,
	120 as width,110 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'new_date' as field,
	'出库日期' as field_name,'出库日期' as title,
	70 as width,120 as sort,1 as show,0 as hidden,0 as sum_field,'date' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'wh_name' as field,
	'仓库' as field_name,'仓库' as title,
	60 as width,130 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'i_code' as field,
	'存货编码' as field_name,'存货编码' as title,
	98 as width,140 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'i_name' as field,
	'存货名称' as field_name,'存货名称' as title,
	120 as width,150 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'standard' as field,
	'规格型号' as field_name,'规格型号' as title,
	120 as width,160 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'munit' as field,
	'单位' as field_name,'单位' as title,
	40 as width,170 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'aunit' as field,
	'辅计单位' as field_name,'辅计量单位' as title,
	60 as width,180 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'free1' as field,
	'自由项1' as field_name,'自由项1' as title,
	80 as width,190 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'free2' as field,
	'自由项2' as field_name,'自由项2' as title,
	80 as width,191 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'batch' as field,
	'批次' as field_name,'批次' as title,
	80 as width,200 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,auth_view)
	select 'Stock_Report_OtherOut_Details' as module,'unit_price' as field,
	'无税单价' as field_name,'无税单价' as title,
	60 as width,210 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,
	'Stock_Report_OtherOut_Details_ViewPrice' as auth_view;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'quantity' as field,
	'数量' as field_name,'数量' as title,
	60 as width,220 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'num' as field,
	'件数' as field_name,'件数' as title,
	60 as width,230 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'convert_rate' as field,
	'换算率' as field_name,'换算率' as title,
	60 as width,240 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,auth_view)
	select 'Stock_Report_OtherOut_Details' as module,'total_price' as field,
	'无税金额' as field_name,'无税金额' as title,
	60 as width,250 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit,
	'Stock_Report_OtherOut_Details_ViewPrice' as auth_view;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'d_remark' as field,
	'表体备注' as field_name,'表体备注' as title,
	100 as width,260 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'iot_name' as field,
	'收发类型' as field_name,'收发类型' as title,
	60 as width,270 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'dep_name' as field,
	'部门' as field_name,'部门' as title,
	60 as width,280 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
		
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'new_user' as field,
	'新增人' as field_name,'新增人' as title,
	50 as width,290 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'verify_user' as field,
	'审核人' as field_name,'审核人' as title,
	50 as width,300 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'remark' as field,
	'表头备注' as field_name,'表头备注' as title,
	100 as width,310 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'d_sdefine1' as field,
	'子表字符自定义项1' as field_name,'子表字符自定义项1' as title,
	120 as width,1010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'d_sdefine2' as field,
	'子表字符自定义项2' as field_name,'子表字符自定义项2' as title,
	60 as width,1020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'d_sdefine3' as field,
	'子表字符自定义项3' as field_name,'子表字符自定义项3' as title,
	60 as width,1030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'d_sdefine4' as field,
	'子表字符自定义项4' as field_name,'子表字符自定义项4' as title,
	60 as width,1040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'d_sdefine5' as field,
	'子表字符自定义项5' as field_name,'子表字符自定义项5' as title,
	60 as width,1050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'d_ndefine1' as field,
	'子表数值自定义项1' as field_name,'子表数值自定义项1' as title,
	60 as width,1110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'d_ndefine2' as field,
	'子表数值自定义项2' as field_name,'子表数值自定义项2' as title,
	60 as width,1120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'d_ndefine3' as field,
	'子表数值自定义项3' as field_name,'子表数值自定义项3' as title,
	60 as width,1130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'d_ndefine4' as field,
	'子表数值自定义项4' as field_name,'子表数值自定义项4' as title,
	60 as width,1140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'d_ndefine5' as field,
	'子表数值自定义项5' as field_name,'子表数值自定义项5' as title,
	60 as width,1150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'sdefine1' as field,
	'主表字符自定义项1' as field_name,'主表字符自定义项1' as title,
	120 as width,2010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'sdefine2' as field,
	'主表字符自定义项2' as field_name,'主表字符自定义项2' as title,
	60 as width,2020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'sdefine3' as field,
	'主表字符自定义项3' as field_name,'主表字符自定义项3' as title,
	60 as width,2030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'sdefine4' as field,
	'主表字符自定义项4' as field_name,'主表字符自定义项4' as title,
	60 as width,2040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'sdefine5' as field,
	'主表字符自定义项5' as field_name,'主表字符自定义项5' as title,
	60 as width,2050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'ndefine1' as field,
	'主表数值自定义项1' as field_name,'主表数值自定义项1' as title,
	60 as width,2110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'ndefine2' as field,
	'主表数值自定义项2' as field_name,'主表数值自定义项2' as title,
	60 as width,2120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'ndefine3' as field,
	'主表数值自定义项3' as field_name,'主表数值自定义项3' as title,
	60 as width,2130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'ndefine4' as field,
	'主表数值自定义项4' as field_name,'主表数值自定义项4' as title,
	60 as width,2140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'ndefine5' as field,
	'主表数值自定义项5' as field_name,'主表数值自定义项5' as title,
	60 as width,2150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'d_inv_sdefine1' as field,
	'存货字符自定义项1' as field_name,'存货字符自定义项1' as title,
	80 as width,3010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'d_inv_sdefine2' as field,
	'存货字符自定义项2' as field_name,'存货字符自定义项2' as title,
	80 as width,3020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'d_inv_sdefine3' as field,
	'存货字符自定义项3' as field_name,'存货字符自定义项3' as title,
	80 as width,3030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'d_inv_sdefine4' as field,
	'存货字符自定义项4' as field_name,'存货字符自定义项4' as title,
	80 as width,3040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'d_inv_sdefine5' as field,
	'存货字符自定义项5' as field_name,'存货字符自定义项5' as title,
	80 as width,3050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'d_inv_ndefine1' as field,
	'存货数值自定义项1' as field_name,'存货数值自定义项1' as title,
	80 as width,3110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'d_inv_ndefine2' as field,
	'存货数值自定义项2' as field_name,'存货数值自定义项2' as title,
	80 as width,3120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'d_inv_ndefine3' as field,
	'存货数值自定义项3' as field_name,'存货数值自定义项3' as title,
	80 as width,3130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'d_inv_ndefine4' as field,
	'存货数值自定义项4' as field_name,'存货数值自定义项4' as title,
	80 as width,3140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_OtherOut_Details' as module,'d_inv_ndefine5' as field,
	'存货数值自定义项5' as field_name,'存货数值自定义项5' as title,
	80 as width,3150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
end
/**/GO

--插入[产成品入库单明细表]报表界面格式
if(select count(1) from System_ModuleFormat where module='Stock_Report_ProductIn_Details' and field='ios_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'ios_id' as field,
	'入库单子表ID' as field_name,'入库单子表ID' as title,
	60 as width,1 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'io_id' as field,
	'入库单主表ID' as field_name,'入库单主表ID' as title,
	60 as width,2 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'order_number' as field,
	'入库单号' as field_name,'入库单号' as title,
	120 as width,110 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'new_date' as field,
	'入库日期' as field_name,'入库日期' as title,
	70 as width,120 as sort,1 as show,0 as hidden,0 as sum_field,'date' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'wh_id' as field,
	'仓库ID' as field_name,'仓库ID' as title,
	60 as width,130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'wh_code' as field,
	'仓库编码' as field_name,'仓库编码' as title,
	60 as width,140 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'wh_name' as field,
	'仓库名称' as field_name,'仓库名称' as title,
	60 as width,150 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'i_code' as field,
	'存货编码' as field_name,'存货编码' as title,
	98 as width,160 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'i_name' as field,
	'存货名称' as field_name,'存货名称' as title,
	120 as width,170 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'standard' as field,
	'规格型号' as field_name,'规格型号' as title,
	120 as width,180 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'munit' as field,
	'单位' as field_name,'单位' as title,
	40 as width,190 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'aunit' as field,
	'辅计单位' as field_name,'辅计量单位' as title,
	60 as width,200 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'free1' as field,
	'自由项1' as field_name,'自由项1' as title,
	80 as width,210 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'free2' as field,
	'自由项2' as field_name,'自由项2' as title,
	80 as width,211 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'batch' as field,
	'批次' as field_name,'批次' as title,
	80 as width,220 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,auth_view)
	select 'Stock_Report_ProductIn_Details' as module,'unit_price' as field,
	'无税单价' as field_name,'无税单价' as title,
	60 as width,230 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,
	'Stock_Report_ProductIn_Details_ViewPrice' as auth_view;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'quantity' as field,
	'数量' as field_name,'数量' as title,
	60 as width,240 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'num' as field,
	'件数' as field_name,'件数' as title,
	60 as width,250 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'convert_rate' as field,
	'换算率' as field_name,'换算率' as title,
	60 as width,260 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,auth_view)
	select 'Stock_Report_ProductIn_Details' as module,'total_price' as field,
	'无税金额' as field_name,'无税金额' as title,
	60 as width,270 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit,
	'Stock_Report_ProductIn_Details_ViewPrice' as auth_view;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'d_remark' as field,
	'表体备注' as field_name,'表体备注' as title,
	100 as width,280 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'iot_name' as field,
	'收发类型' as field_name,'收发类型' as title,
	60 as width,290 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'dep_name' as field,
	'部门' as field_name,'部门' as title,
	60 as width,300 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
		
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'new_user' as field,
	'新增人' as field_name,'新增人' as title,
	50 as width,310 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'verify_user' as field,
	'审核人' as field_name,'审核人' as title,
	50 as width,320 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'remark' as field,
	'表头备注' as field_name,'表头备注' as title,
	100 as width,330 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'d_sdefine1' as field,
	'子表字符自定义项1' as field_name,'子表字符自定义项1' as title,
	120 as width,1010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'d_sdefine2' as field,
	'子表字符自定义项2' as field_name,'子表字符自定义项2' as title,
	60 as width,1020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'d_sdefine3' as field,
	'子表字符自定义项3' as field_name,'子表字符自定义项3' as title,
	60 as width,1030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'d_sdefine4' as field,
	'子表字符自定义项4' as field_name,'子表字符自定义项4' as title,
	60 as width,1040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'d_sdefine5' as field,
	'子表字符自定义项5' as field_name,'子表字符自定义项5' as title,
	60 as width,1050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'d_ndefine1' as field,
	'子表数值自定义项1' as field_name,'子表数值自定义项1' as title,
	60 as width,1110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'d_ndefine2' as field,
	'子表数值自定义项2' as field_name,'子表数值自定义项2' as title,
	60 as width,1120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'d_ndefine3' as field,
	'子表数值自定义项3' as field_name,'子表数值自定义项3' as title,
	60 as width,1130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'d_ndefine4' as field,
	'子表数值自定义项4' as field_name,'子表数值自定义项4' as title,
	60 as width,1140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'d_ndefine5' as field,
	'子表数值自定义项5' as field_name,'子表数值自定义项5' as title,
	60 as width,1150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'sdefine1' as field,
	'主表字符自定义项1' as field_name,'主表字符自定义项1' as title,
	120 as width,2010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'sdefine2' as field,
	'主表字符自定义项2' as field_name,'主表字符自定义项2' as title,
	60 as width,2020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'sdefine3' as field,
	'主表字符自定义项3' as field_name,'主表字符自定义项3' as title,
	60 as width,2030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'sdefine4' as field,
	'主表字符自定义项4' as field_name,'主表字符自定义项4' as title,
	60 as width,2040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'sdefine5' as field,
	'主表字符自定义项5' as field_name,'主表字符自定义项5' as title,
	60 as width,2050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'ndefine1' as field,
	'主表数值自定义项1' as field_name,'主表数值自定义项1' as title,
	60 as width,2110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'ndefine2' as field,
	'主表数值自定义项2' as field_name,'主表数值自定义项2' as title,
	60 as width,2120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'ndefine3' as field,
	'主表数值自定义项3' as field_name,'主表数值自定义项3' as title,
	60 as width,2130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'ndefine4' as field,
	'主表数值自定义项4' as field_name,'主表数值自定义项4' as title,
	60 as width,2140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'ndefine5' as field,
	'主表数值自定义项5' as field_name,'主表数值自定义项5' as title,
	60 as width,2150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'d_inv_sdefine1' as field,
	'存货字符自定义项1' as field_name,'存货字符自定义项1' as title,
	80 as width,3010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'d_inv_sdefine2' as field,
	'存货字符自定义项2' as field_name,'存货字符自定义项2' as title,
	80 as width,3020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'d_inv_sdefine3' as field,
	'存货字符自定义项3' as field_name,'存货字符自定义项3' as title,
	80 as width,3030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'d_inv_sdefine4' as field,
	'存货字符自定义项4' as field_name,'存货字符自定义项4' as title,
	80 as width,3040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'d_inv_sdefine5' as field,
	'存货字符自定义项5' as field_name,'存货字符自定义项5' as title,
	80 as width,3050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'d_inv_ndefine1' as field,
	'存货数值自定义项1' as field_name,'存货数值自定义项1' as title,
	80 as width,3110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'d_inv_ndefine2' as field,
	'存货数值自定义项2' as field_name,'存货数值自定义项2' as title,
	80 as width,3120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'d_inv_ndefine3' as field,
	'存货数值自定义项3' as field_name,'存货数值自定义项3' as title,
	80 as width,3130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'d_inv_ndefine4' as field,
	'存货数值自定义项4' as field_name,'存货数值自定义项4' as title,
	80 as width,3140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_ProductIn_Details' as module,'d_inv_ndefine5' as field,
	'存货数值自定义项5' as field_name,'存货数值自定义项5' as title,
	80 as width,3150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

end
/**/GO


--delete System_ModuleFormat where module='Stock_Report_Transfer_Details'
if(select count(1) from System_ModuleFormat where module='Stock_Report_Transfer_Details' and field='ts_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'ts_id' as field,
	'调拨单主表ID' as field_name,'调拨单主表ID' as title,
	120 as width,1 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'tss_id' as field,
	'调拨单子表ID' as field_name,'调拨单子表ID' as title,
	120 as width,2 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'order_number' as field,
	'调拨单号' as field_name,'调拨单号' as title,
	120 as width,110 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'new_date' as field,
	'制单日期' as field_name,'制单日期' as title,
	120 as width,120 as sort,1 as show,0 as hidden,0 as sum_field,'date' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'wh_name_out' as field,
	'转出仓库' as field_name,'转出仓库' as title,
	98 as width,140 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'wh_name_in' as field,
	'转入仓库' as field_name,'转入仓库' as title,
	98 as width,160 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'i_id' as field,
	'存货ID' as field_name,'存货ID' as title,
	120 as width,170 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_Report_Transfer_Details' as module,'i_code' as field,
	'存货编码' as field_name,'存货编码' as title,
	98 as width,180 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'i_name' as field,
	'存货名称' as field_name,'存货名称' as title,
	120 as width,190 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'standard' as field,
	'规格型号' as field_name,'规格型号' as title,
	120 as width,200 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'munit' as field,
	'单位' as field_name,'单位' as title,
	60 as width,210 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'aunit' as field,
	'辅计量单位' as field_name,'辅计量单位' as title,
	60 as width,220 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'free1' as field,
	'自由项1' as field_name,'自由项1' as title,
	120 as width,230 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'free2' as field,
	'自由项2' as field_name,'自由项2' as title,
	120 as width,240 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'batch' as field,
	'批次' as field_name,'批次' as title,
	120 as width,250 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_Report_Transfer_Details' as module,'quantity' as field,
	'数量' as field_name,'数量' as title,
	60 as width,260 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'num' as field,
	'件数' as field_name,'件数' as title,
	60 as width,270 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'convert_rate' as field,
	'换算率' as field_name,'换算率' as title,
	60 as width,280 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'dep_name_out' as field,
	'转出部门' as field_name,'转出部门' as title,
	60 as width,290 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'dep_name_in' as field,
	'转入部门' as field_name,'转入部门' as title,
	60 as width,300 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'iot_name_out' as field,
	'出库类型' as field_name,'出库类型' as title,
	60 as width,310 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'iot_name_in' as field,
	'入库类型' as field_name,'入库类型' as title,
	60 as width,320 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'ic_name' as field,
	'存货分类' as field_name,'存货分类' as title,
	70 as width,330 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;


	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'new_user' as field,
	'新增人' as field_name,'新增人' as title,
	60 as width,340 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'update_user' as field,
	'修改人' as field_name,'修改人' as title,
	60 as width,350 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'update_date' as field,
	'修改日期' as field_name,'修改日期' as title,
	70 as width,360 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'verify_user' as field,
	'审核人' as field_name,'审核人' as title,
	60 as width,370 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'d_remark' as field,
	'备注' as field_name,'备注' as title,
	120 as width,380 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'remark' as field,
	'子表备注' as field_name,'子表备注' as title,
	80 as width,390 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'sdefine1' as field,
	'字符自定义项1' as field_name,'字符自定义项1' as title,
	120 as width,1010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'sdefine2' as field,
	'字符自定义项2' as field_name,'字符自定义项2' as title,
	120 as width,1020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'sdefine3' as field,
	'字符自定义项3' as field_name,'字符自定义项3' as title,
	120 as width,1030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'sdefine4' as field,
	'字符自定义项4' as field_name,'字符自定义项4' as title,
	120 as width,1040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'sdefine5' as field,
	'字符自定义项5' as field_name,'字符自定义项5' as title,
	120 as width,1050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'ndefine1' as field,
	'数值自定义项1' as field_name,'数值自定义项1' as title,
	120 as width,1110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'ndefine2' as field,
	'数值自定义项2' as field_name,'数值自定义项2' as title,
	120 as width,1120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'ndefine3' as field,
	'数值自定义项3' as field_name,'数值自定义项3' as title,
	120 as width,1130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'ndefine4' as field,
	'数值自定义项4' as field_name,'数值自定义项4' as title,
	120 as width,1140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'ndefine5' as field,
	'数值自定义项5' as field_name,'数值自定义项5' as title,
	120 as width,1150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'d_sdefine1' as field,
	'子表字符自定义项1' as field_name,'子表字符自定义项1' as title,
	120 as width,2010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'d_sdefine2' as field,
	'子表字符自定义项2' as field_name,'子表字符自定义项2' as title,
	120 as width,2020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'d_sdefine3' as field,
	'子表字符自定义项3' as field_name,'子表字符自定义项3' as title,
	120 as width,2030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'d_sdefine4' as field,
	'子表字符自定义项4' as field_name,'子表字符自定义项4' as title,
	120 as width,2040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'d_sdefine5' as field,
	'子表字符自定义项5' as field_name,'子表字符自定义项5' as title,
	120 as width,2050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'d_ndefine1' as field,
	'子表数值自定义项1' as field_name,'子表数值自定义项1' as title,
	120 as width,2110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'d_ndefine2' as field,
	'子表数值自定义项2' as field_name,'子表数值自定义项2' as title,
	120 as width,2120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'d_ndefine3' as field,
	'子表数值自定义项3' as field_name,'子表数值自定义项3' as title,
	120 as width,2130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'d_ndefine4' as field,
	'子表数值自定义项4' as field_name,'子表数值自定义项4' as title,
	120 as width,2140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'d_ndefine5' as field,
	'子表数值自定义项5' as field_name,'子表数值自定义项5' as title,
	120 as width,2150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'d_inv_sdefine1' as field,
	'存货字符自定义项1' as field_name,'存货字符自定义项1' as title,
	120 as width,2210 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'d_inv_sdefine2' as field,
	'存货字符自定义项2' as field_name,'存货字符自定义项2' as title,
	120 as width,2220 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'d_inv_sdefine3' as field,
	'存货字符自定义项3' as field_name,'存货字符自定义项3' as title,
	120 as width,2230 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'d_inv_sdefine4' as field,
	'存货字符自定义项4' as field_name,'存货字符自定义项4' as title,
	120 as width,2240 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'d_inv_sdefine5' as field,
	'存货字符自定义项5' as field_name,'存货字符自定义项5' as title,
	120 as width,2250 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'d_inv_ndefine1' as field,
	'存货数值自定义项1' as field_name,'存货数值自定义项1' as title,
	120 as width,2310 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'d_inv_ndefine2' as field,
	'存货数值自定义项2' as field_name,'存货数值自定义项2' as title,
	120 as width,2320 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'d_inv_ndefine3' as field,
	'存货数值自定义项3' as field_name,'存货数值自定义项3' as title,
	120 as width,2330 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'d_inv_ndefine4' as field,
	'存货数值自定义项4' as field_name,'存货数值自定义项4' as title,
	120 as width,2340 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_Transfer_Details' as module,'d_inv_ndefine5' as field,
	'存货数值自定义项5' as field_name,'存货数值自定义项5' as title,
	120 as width,2350 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

end
/**/GO

--插入[材料出库单明细表]报表界面格式
if(select count(1) from System_ModuleFormat where module='Stock_Report_MaterialOut_Details' and field='ios_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'ios_id' as field,
	'出库单子表ID' as field_name,'出库单子表ID' as title,
	60 as width,1 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'io_id' as field,
	'出库单主表ID' as field_name,'出库单主表ID' as title,
	60 as width,2 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'order_number' as field,
	'出库单号' as field_name,'出库单号' as title,
	120 as width,110 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'new_date' as field,
	'出库日期' as field_name,'出库日期' as title,
	70 as width,120 as sort,1 as show,0 as hidden,0 as sum_field,'date' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'wh_id' as field,
	'仓库ID' as field_name,'仓库ID' as title,
	60 as width,130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'wh_code' as field,
	'仓库编码' as field_name,'仓库编码' as title,
	60 as width,140 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'wh_name' as field,
	'仓库名称' as field_name,'仓库名称' as title,
	60 as width,150 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'i_code' as field,
	'存货编码' as field_name,'存货编码' as title,
	98 as width,160 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'i_name' as field,
	'存货名称' as field_name,'存货名称' as title,
	120 as width,170 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'standard' as field,
	'规格型号' as field_name,'规格型号' as title,
	120 as width,180 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'munit' as field,
	'单位' as field_name,'单位' as title,
	40 as width,190 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'aunit' as field,
	'辅计单位' as field_name,'辅计量单位' as title,
	60 as width,200 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'free1' as field,
	'自由项1' as field_name,'自由项1' as title,
	80 as width,210 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'free2' as field,
	'自由项2' as field_name,'自由项2' as title,
	80 as width,220 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'batch' as field,
	'批次' as field_name,'批次' as title,
	80 as width,230 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'quantity' as field,
	'数量' as field_name,'数量' as title,
	60 as width,240 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'num' as field,
	'件数' as field_name,'件数' as title,
	60 as width,250 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'convert_rate' as field,
	'换算率' as field_name,'换算率' as title,
	60 as width,260 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,auth_view)
	select 'Stock_Report_MaterialOut_Details' as module,'unit_price' as field,
	'无税单价' as field_name,'无税单价' as title,
	60 as width,270 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,
	'Stock_Report_MaterialOut_Details_ViewPrice' as auth_view;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,auth_view)
	select 'Stock_Report_MaterialOut_Details' as module,'total_price' as field,
	'无税金额' as field_name,'无税金额' as title,
	60 as width,280 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit,
	'Stock_Report_MaterialOut_Details_ViewPrice' as auth_view;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'ic_name' as field,
	'存货分类' as field_name,'存货分类' as title,
	100 as width,300 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'d_remark' as field,
	'表体备注' as field_name,'表体备注' as title,
	100 as width,310 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'iot_name' as field,
	'收发类型' as field_name,'收发类型' as title,
	60 as width,320 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'dep_name' as field,
	'部门' as field_name,'部门' as title,
	60 as width,330 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
		
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'new_user' as field,
	'新增人' as field_name,'新增人' as title,
	50 as width,340 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'verify_user' as field,
	'审核人' as field_name,'审核人' as title,
	50 as width,350 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'remark' as field,
	'表头备注' as field_name,'表头备注' as title,
	100 as width,360 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'d_sdefine1' as field,
	'子表字符自定义项1' as field_name,'子表字符自定义项1' as title,
	120 as width,1010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'d_sdefine2' as field,
	'子表字符自定义项2' as field_name,'子表字符自定义项2' as title,
	60 as width,1020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'d_sdefine3' as field,
	'子表字符自定义项3' as field_name,'子表字符自定义项3' as title,
	60 as width,1030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'d_sdefine4' as field,
	'子表字符自定义项4' as field_name,'子表字符自定义项4' as title,
	60 as width,1040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'d_sdefine5' as field,
	'子表字符自定义项5' as field_name,'子表字符自定义项5' as title,
	60 as width,1050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'d_ndefine1' as field,
	'子表数值自定义项1' as field_name,'子表数值自定义项1' as title,
	60 as width,1110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'d_ndefine2' as field,
	'子表数值自定义项2' as field_name,'子表数值自定义项2' as title,
	60 as width,1120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'d_ndefine3' as field,
	'子表数值自定义项3' as field_name,'子表数值自定义项3' as title,
	60 as width,1130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'d_ndefine4' as field,
	'子表数值自定义项4' as field_name,'子表数值自定义项4' as title,
	60 as width,1140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'d_ndefine5' as field,
	'子表数值自定义项5' as field_name,'子表数值自定义项5' as title,
	60 as width,1150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'sdefine1' as field,
	'主表字符自定义项1' as field_name,'主表字符自定义项1' as title,
	120 as width,2010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'sdefine2' as field,
	'主表字符自定义项2' as field_name,'主表字符自定义项2' as title,
	60 as width,2020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'sdefine3' as field,
	'主表字符自定义项3' as field_name,'主表字符自定义项3' as title,
	60 as width,2030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'sdefine4' as field,
	'主表字符自定义项4' as field_name,'主表字符自定义项4' as title,
	60 as width,2040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'sdefine5' as field,
	'主表字符自定义项5' as field_name,'主表字符自定义项5' as title,
	60 as width,2050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'ndefine1' as field,
	'主表数值自定义项1' as field_name,'主表数值自定义项1' as title,
	60 as width,2110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'ndefine2' as field,
	'主表数值自定义项2' as field_name,'主表数值自定义项2' as title,
	60 as width,2120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'ndefine3' as field,
	'主表数值自定义项3' as field_name,'主表数值自定义项3' as title,
	60 as width,2130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'ndefine4' as field,
	'主表数值自定义项4' as field_name,'主表数值自定义项4' as title,
	60 as width,2140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'ndefine5' as field,
	'主表数值自定义项5' as field_name,'主表数值自定义项5' as title,
	60 as width,2150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'d_inv_sdefine1' as field,
	'存货字符自定义项1' as field_name,'存货字符自定义项1' as title,
	80 as width,3010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'d_inv_sdefine2' as field,
	'存货字符自定义项2' as field_name,'存货字符自定义项2' as title,
	80 as width,3020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'d_inv_sdefine3' as field,
	'存货字符自定义项3' as field_name,'存货字符自定义项3' as title,
	80 as width,3030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'d_inv_sdefine4' as field,
	'存货字符自定义项4' as field_name,'存货字符自定义项4' as title,
	80 as width,3040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'d_inv_sdefine5' as field,
	'存货字符自定义项5' as field_name,'存货字符自定义项5' as title,
	80 as width,3050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'d_inv_ndefine1' as field,
	'存货数值自定义项1' as field_name,'存货数值自定义项1' as title,
	80 as width,3110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'d_inv_ndefine2' as field,
	'存货数值自定义项2' as field_name,'存货数值自定义项2' as title,
	80 as width,3120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'d_inv_ndefine3' as field,
	'存货数值自定义项3' as field_name,'存货数值自定义项3' as title,
	80 as width,3130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'d_inv_ndefine4' as field,
	'存货数值自定义项4' as field_name,'存货数值自定义项4' as title,
	80 as width,3140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_MaterialOut_Details' as module,'d_inv_ndefine5' as field,
	'存货数值自定义项5' as field_name,'存货数值自定义项5' as title,
	80 as width,3150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

end
/**/GO


--delete System_ModuleFormat where module='Stock_Report_StockCount_Details';
--插入[盘点单明细表]报表界面格式
if(select count(1) from System_ModuleFormat where module='Stock_Report_StockCount_Details' and field='scs_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'scs_id' as field,
	'盘点单子表ID' as field_name,'盘点单子表ID' as title,
	60 as width,1 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'sc_id' as field,
	'盘点单主表ID' as field_name,'盘点单主表ID' as title,
	60 as width,2 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'order_number' as field,
	'盘点单号' as field_name,'盘点单号' as title,
	120 as width,110 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'new_date' as field,
	'出库日期' as field_name,'出库日期' as title,
	70 as width,120 as sort,1 as show,0 as hidden,0 as sum_field,'date' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'wh_id' as field,
	'仓库ID' as field_name,'仓库ID' as title,
	60 as width,130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'wh_code' as field,
	'仓库编码' as field_name,'仓库编码' as title,
	60 as width,140 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'wh_name' as field,
	'仓库名称' as field_name,'仓库名称' as title,
	60 as width,150 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'i_code' as field,
	'存货编码' as field_name,'存货编码' as title,
	98 as width,160 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'i_name' as field,
	'存货名称' as field_name,'存货名称' as title,
	120 as width,170 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'standard' as field,
	'规格型号' as field_name,'规格型号' as title,
	120 as width,180 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'munit' as field,
	'单位' as field_name,'单位' as title,
	40 as width,190 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'aunit' as field,
	'辅计单位' as field_name,'辅计量单位' as title,
	60 as width,200 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'free1' as field,
	'自由项1' as field_name,'自由项1' as title,
	80 as width,210 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'free2' as field,
	'自由项2' as field_name,'自由项2' as title,
	80 as width,220 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'batch' as field,
	'批次' as field_name,'批次' as title,
	80 as width,230 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'quantity' as field,
	'数量' as field_name,'数量' as title,
	60 as width,240 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'num' as field,
	'件数' as field_name,'件数' as title,
	60 as width,250 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'convert_rate' as field,
	'换算率' as field_name,'换算率' as title,
	60 as width,260 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'ic_name' as field,
	'存货分类' as field_name,'存货分类' as title,
	100 as width,300 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'d_remark' as field,
	'表体备注' as field_name,'表体备注' as title,
	100 as width,310 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'iot_name_in' as field,
	'入库类型' as field_name,'入库类型' as title,
	60 as width,320 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'iot_name_out' as field,
	'出库类型' as field_name,'出库类型' as title,
	60 as width,320 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'dep_name' as field,
	'部门' as field_name,'部门' as title,
	60 as width,330 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
		
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'new_user' as field,
	'新增人' as field_name,'新增人' as title,
	50 as width,340 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'verify_user' as field,
	'审核人' as field_name,'审核人' as title,
	50 as width,350 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'remark' as field,
	'表头备注' as field_name,'表头备注' as title,
	100 as width,360 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'d_sdefine1' as field,
	'子表字符自定义项1' as field_name,'子表字符自定义项1' as title,
	120 as width,1010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'d_sdefine2' as field,
	'子表字符自定义项2' as field_name,'子表字符自定义项2' as title,
	60 as width,1020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'d_sdefine3' as field,
	'子表字符自定义项3' as field_name,'子表字符自定义项3' as title,
	60 as width,1030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'d_sdefine4' as field,
	'子表字符自定义项4' as field_name,'子表字符自定义项4' as title,
	60 as width,1040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'d_sdefine5' as field,
	'子表字符自定义项5' as field_name,'子表字符自定义项5' as title,
	60 as width,1050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'d_ndefine1' as field,
	'子表数值自定义项1' as field_name,'子表数值自定义项1' as title,
	60 as width,1110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'d_ndefine2' as field,
	'子表数值自定义项2' as field_name,'子表数值自定义项2' as title,
	60 as width,1120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'d_ndefine3' as field,
	'子表数值自定义项3' as field_name,'子表数值自定义项3' as title,
	60 as width,1130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'d_ndefine4' as field,
	'子表数值自定义项4' as field_name,'子表数值自定义项4' as title,
	60 as width,1140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'d_ndefine5' as field,
	'子表数值自定义项5' as field_name,'子表数值自定义项5' as title,
	60 as width,1150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'sdefine1' as field,
	'主表字符自定义项1' as field_name,'主表字符自定义项1' as title,
	120 as width,2010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'sdefine2' as field,
	'主表字符自定义项2' as field_name,'主表字符自定义项2' as title,
	60 as width,2020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'sdefine3' as field,
	'主表字符自定义项3' as field_name,'主表字符自定义项3' as title,
	60 as width,2030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'sdefine4' as field,
	'主表字符自定义项4' as field_name,'主表字符自定义项4' as title,
	60 as width,2040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'sdefine5' as field,
	'主表字符自定义项5' as field_name,'主表字符自定义项5' as title,
	60 as width,2050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'ndefine1' as field,
	'主表数值自定义项1' as field_name,'主表数值自定义项1' as title,
	60 as width,2110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'ndefine2' as field,
	'主表数值自定义项2' as field_name,'主表数值自定义项2' as title,
	60 as width,2120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'ndefine3' as field,
	'主表数值自定义项3' as field_name,'主表数值自定义项3' as title,
	60 as width,2130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'ndefine4' as field,
	'主表数值自定义项4' as field_name,'主表数值自定义项4' as title,
	60 as width,2140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'ndefine5' as field,
	'主表数值自定义项5' as field_name,'主表数值自定义项5' as title,
	60 as width,2150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'d_inv_sdefine1' as field,
	'存货字符自定义项1' as field_name,'存货字符自定义项1' as title,
	80 as width,3010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'d_inv_sdefine2' as field,
	'存货字符自定义项2' as field_name,'存货字符自定义项2' as title,
	80 as width,3020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'d_inv_sdefine3' as field,
	'存货字符自定义项3' as field_name,'存货字符自定义项3' as title,
	80 as width,3030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'d_inv_sdefine4' as field,
	'存货字符自定义项4' as field_name,'存货字符自定义项4' as title,
	80 as width,3040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'d_inv_sdefine5' as field,
	'存货字符自定义项5' as field_name,'存货字符自定义项5' as title,
	80 as width,3050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'d_inv_ndefine1' as field,
	'存货数值自定义项1' as field_name,'存货数值自定义项1' as title,
	80 as width,3110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'d_inv_ndefine2' as field,
	'存货数值自定义项2' as field_name,'存货数值自定义项2' as title,
	80 as width,3120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'d_inv_ndefine3' as field,
	'存货数值自定义项3' as field_name,'存货数值自定义项3' as title,
	80 as width,3130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'d_inv_ndefine4' as field,
	'存货数值自定义项4' as field_name,'存货数值自定义项4' as title,
	80 as width,3140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Report_StockCount_Details' as module,'d_inv_ndefine5' as field,
	'存货数值自定义项5' as field_name,'存货数值自定义项5' as title,
	80 as width,3150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
end
/**/GO

--delete System_ModuleFormat where module='Stock_Report_InventoryBook';
--插入[库存台账]报表界面格式
if(select count(1) from System_ModuleFormat where module='Stock_Report_InventoryBook' and field='i_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook' as module,'wh_id' as field,
	'仓库ID' as field_name,'仓库ID' as title,
	60 as width,10 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook' as module,'wh_code' as field,
	'仓库编码' as field_name,'仓库编码' as title,
	60 as width,20 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook' as module,'wh_name' as field,
	'仓库名称' as field_name,'仓库名称' as title,
	60 as width,30 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook' as module,'i_id' as field,
	'存货ID' as field_name,'存货ID' as title,
	50 as width,40 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook' as module,'i_code' as field,
	'存货编码' as field_name,'存货编码' as title,
	150 as width,50 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook' as module,'i_name' as field,
	'存货名称' as field_name,'存货名称' as title,
	150 as width,60 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook' as module,'standard' as field,
	'规格型号' as field_name,'规格型号' as title,
	120 as width,70 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook' as module,'munit' as field,
	'单位' as field_name,'单位' as title,
	40 as width,80 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook' as module,'aunit' as field,
	'辅计单位' as field_name,'辅计量单位' as title,
	60 as width,90 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook' as module,'free1' as field,
	'自由项1' as field_name,'自由项1' as title,
	80 as width,100 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook' as module,'free2' as field,
	'自由项2' as field_name,'自由项2' as title,
	80 as width,110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook' as module,'batch' as field,
	'批次' as field_name,'批次' as title,
	80 as width,120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook' as module,'qc_sl' as field,
	'期初数量' as field_name,'期初数量' as title,
	60 as width,130 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook' as module,'bq_rk_sl' as field,
	'本期入库数量' as field_name,'本期入库数量' as title,
	75 as width,140 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook' as module,'bq_ck_sl' as field,
	'本期出库数量' as field_name,'本期出库数量' as title,
	75 as width,150 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,color)
	select 'Stock_Report_InventoryBook' as module,'bq_jc_sl' as field,
	'本期结存数量' as field_name,'本期结存数量' as title,
	75 as width,160 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,'blue' as color;
	
  insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,auth_view)
	select 'Stock_Report_InventoryBook' as module,'oh_quantity' as field,
	'当前结存数量' as field_name,'当前结存数量' as title,
	75 as width,165 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,
	'Stock_Report_InventoryBook_ViewPrice' as auth_view;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook' as module,'qc_js' as field,
	'期初件数' as field_name,'期初件数' as title,
	75 as width,170 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook' as module,'bq_rk_js' as field,
	'本期入库件数' as field_name,'本期入库件数' as title,
	75 as width,180 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook' as module,'bq_ck_js' as field,
	'本期出库件数' as field_name,'本期出库件数' as title,
	75 as width,190 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook' as module,'bq_jc_js' as field,
	'本期结存件数' as field_name,'本期结存件数' as title,
	75 as width,200 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type;

  insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,auth_view)
	select 'Stock_Report_InventoryBook' as module,'oh_num' as field,
	'当前结存件数' as field_name,'当前结存件数' as title,
	75 as width,205 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type,
	'Stock_Report_InventoryBook_ViewPrice' as auth_view;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,auth_view)
	select 'Stock_Report_InventoryBook' as module,'qc_je' as field,
	'期初金额' as field_name,'期初金额' as title,
	75 as width,210 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type,
	'Stock_Report_InventoryBook_ViewPrice' as auth_view;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,auth_view)
	select 'Stock_Report_InventoryBook' as module,'bq_rk_je' as field,
	'本期入库金额' as field_name,'本期入库金额' as title,
	75 as width,220 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type,
	'Stock_Report_InventoryBook_ViewPrice' as auth_view;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,auth_view)
	select 'Stock_Report_InventoryBook' as module,'bq_ck_je' as field,
	'本期出库金额' as field_name,'本期出库金额' as title,
	75 as width,230 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type,
	'Stock_Report_InventoryBook_ViewPrice' as auth_view;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,auth_view)
	select 'Stock_Report_InventoryBook' as module,'bq_jc_je' as field,
	'本期结存金额' as field_name,'本期结存金额' as title,
	75 as width,260 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,
	'Stock_Report_InventoryBook_ViewPrice' as auth_view;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook' as module,'ic_code' as field,
	'存货分类编码' as field_name,'存货分类编码' as title,
	75 as width,270 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook' as module,'ic_name' as field,
	'存货分类名称' as field_name,'存货分类名称' as title,
	75 as width,280 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook' as module,'sdefine1' as field,
	'存货字符自定义项1' as field_name,'存货字符自定义项1' as title,
	80 as width,3010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook' as module,'sdefine2' as field,
	'存货字符自定义项2' as field_name,'存货字符自定义项2' as title,
	80 as width,3020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook' as module,'sdefine3' as field,
	'存货字符自定义项3' as field_name,'存货字符自定义项3' as title,
	80 as width,3030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook' as module,'sdefine4' as field,
	'存货字符自定义项4' as field_name,'存货字符自定义项4' as title,
	80 as width,3040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook' as module,'sdefine5' as field,
	'存货字符自定义项5' as field_name,'存货字符自定义项5' as title,
	80 as width,3050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook' as module,'ndefine1' as field,
	'存货数值自定义项1' as field_name,'存货数值自定义项1' as title,
	80 as width,3110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook' as module,'ndefine2' as field,
	'存货数值自定义项2' as field_name,'存货数值自定义项2' as title,
	80 as width,3120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook' as module,'ndefine3' as field,
	'存货数值自定义项3' as field_name,'存货数值自定义项3' as title,
	80 as width,3130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook' as module,'ndefine4' as field,
	'存货数值自定义项4' as field_name,'存货数值自定义项4' as title,
	80 as width,3140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook' as module,'ndefine5' as field,
	'存货数值自定义项5' as field_name,'存货数值自定义项5' as title,
	80 as width,3150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type;

end
/**/GO

--delete System_ModuleFormat where module='Stock_Report_InventoryBook_Flow';
--插入[库存台账明细]报表界面格式
if(select count(1) from System_ModuleFormat where module='Stock_Report_InventoryBook_Flow' and field='free1')=0
begin	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook_Flow' as module,'flag' as field,
	'是否期初' as field_name,'是否期初' as title,
	60 as width,30 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook_Flow' as module,'new_date' as field,
	'日期' as field_name,'日期' as title,
	75 as width,40 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook_Flow' as module,'io_id' as field,
	'单据ID' as field_name,'单据ID' as title,
	60 as width,50 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook_Flow' as module,'order_number' as field,
	'单号' as field_name,'单号' as title,
	150 as width,60 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook_Flow' as module,'order_type' as field,
	'单据类型ID' as field_name,'单据类型ID' as title,
	60 as width,70 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook_Flow' as module,'ot_name' as field,
	'单据类型' as field_name,'单据类型' as title,
	70 as width,80 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook_Flow' as module,'wh_name' as field,
	'仓库名称' as field_name,'仓库名称' as title,
	60 as width,90 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook_Flow' as module,'free1' as field,
	'自由项1' as field_name,'自由项1' as title,
	80 as width,100 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook_Flow' as module,'free2' as field,
	'自由项2' as field_name,'自由项2' as title,
	80 as width,110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook_Flow' as module,'batch' as field,
	'批次' as field_name,'批次' as title,
	80 as width,120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook_Flow' as module,'rk_sl' as field,
	'入库数量' as field_name,'入库数量' as title,
	75 as width,140 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook_Flow' as module,'ck_sl' as field,
	'出库数量' as field_name,'出库数量' as title,
	75 as width,150 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,color)
	select 'Stock_Report_InventoryBook_Flow' as module,'jc_sl' as field,
	'结存数量' as field_name,'结存数量' as title,
	75 as width,160 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook_Flow' as module,'rk_js' as field,
	'入库件数' as field_name,'入库件数' as title,
	75 as width,170 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_InventoryBook_Flow' as module,'ck_js' as field,
	'出库件数' as field_name,'出库件数' as title,
	75 as width,180 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,color)
	select 'Stock_Report_InventoryBook_Flow' as module,'jc_js' as field,
	'结存件数' as field_name,'结存件数' as title,
	75 as width,190 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,'green' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,auth_view)
	select 'Stock_Report_InventoryBook_Flow' as module,'rk_je' as field,
	'入库金额' as field_name,'入库金额' as title,
	75 as width,200 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type,
	'Stock_Report_InventoryBook_ViewPrice' as auth_view;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,auth_view)
	select 'Stock_Report_InventoryBook_Flow' as module,'ck_je' as field,
	'出库金额' as field_name,'出库金额' as title,
	75 as width,210 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type,
	'Stock_Report_InventoryBook_ViewPrice' as auth_view;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,color,auth_view)
	select 'Stock_Report_InventoryBook_Flow' as module,'jc_je' as field,
	'结存金额' as field_name,'结存金额' as title,
	75 as width,220 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,'red' as color,
	'Stock_Report_InventoryBook_ViewPrice' as auth_view;
end
/**/GO


--delete System_ModuleFormat where module='Stock_Report_OrderTypeSummary';
--插入[单据类型汇总表]报表界面格式
if(select count(1) from System_ModuleFormat where module='Stock_Report_OrderTypeSummary' and field='i_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_OrderTypeSummary' as module,'i_id' as field,
	'存货ID' as field_name,'存货ID' as title,
	50 as width,40 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_OrderTypeSummary' as module,'wh_name' as field,
	'仓库名称' as field_name,'仓库名称' as title,
	60 as width,50 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_OrderTypeSummary' as module,'i_code' as field,
	'存货编码' as field_name,'存货编码' as title,
	120 as width,70 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_OrderTypeSummary' as module,'i_name' as field,
	'存货名称' as field_name,'存货名称' as title,
	100 as width,80 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_OrderTypeSummary' as module,'free1' as field,
	'自由项1' as field_name,'自由项1' as title,
	80 as width,120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_OrderTypeSummary' as module,'free2' as field,
	'自由项2' as field_name,'自由项2' as title,
	80 as width,130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_OrderTypeSummary' as module,'batch' as field,
	'批次' as field_name,'批次' as title,
	80 as width,140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_OrderTypeSummary' as module,'cg_rk_sl' as field,
	'采购入库数量' as field_name,'采购入库数量' as title,
	75 as width,210 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_OrderTypeSummary' as module,'qt_rk_sl' as field,
	'其它入库数量' as field_name,'其它入库数量' as title,
	75 as width,220 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_OrderTypeSummary' as module,'cp_rk_sl' as field,
	'成品入库数量' as field_name,'成品入库数量' as title,
	75 as width,230 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_OrderTypeSummary' as module,'cl_ck_sl' as field,
	'材料出库数量' as field_name,'材料出库数量' as title,
	75 as width,240 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_OrderTypeSummary' as module,'qt_ck_sl' as field,
	'其它出库数量' as field_name,'其它出库数量' as title,
	75 as width,250 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_OrderTypeSummary' as module,'xs_ck_sl' as field,
	'销售出库数量' as field_name,'销售出库数量' as title,
	75 as width,260 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,color)
	select 'Stock_Report_OrderTypeSummary' as module,'qc_sl' as field,
	'期初数量' as field_name,'期初数量' as title,
	60 as width,270 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,color)
	select 'Stock_Report_OrderTypeSummary' as module,'bq_rk_sl' as field,
	'本期入库数量' as field_name,'本期入库数量' as title,
	75 as width,280 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,color)
	select 'Stock_Report_OrderTypeSummary' as module,'bq_ck_sl' as field,
	'本期出库数量' as field_name,'本期出库数量' as title,
	75 as width,290 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,color)
	select 'Stock_Report_OrderTypeSummary' as module,'bq_jc_sl' as field,
	'本期结存数量' as field_name,'本期结存数量' as title,
	75 as width,300 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_OrderTypeSummary' as module,'cg_rk_num' as field,
	'采购入库件数' as field_name,'采购入库件数' as title,
	75 as width,410 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_OrderTypeSummary' as module,'qt_rk_num' as field,
	'其它入库件数' as field_name,'其它入库件数' as title,
	75 as width,420 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_OrderTypeSummary' as module,'cp_rk_num' as field,
	'成品入库件数' as field_name,'成品入库件数' as title,
	75 as width,430 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_OrderTypeSummary' as module,'cl_ck_num' as field,
	'材料出库件数' as field_name,'材料出库件数' as title,
	75 as width,440 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_OrderTypeSummary' as module,'qt_ck_num' as field,
	'其它出库件数' as field_name,'其它出库件数' as title,
	75 as width,450 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_OrderTypeSummary' as module,'xs_ck_num' as field,
	'销售出库件数' as field_name,'销售出库件数' as title,
	75 as width,460 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_OrderTypeSummary' as module,'qc_num' as field,
	'期初件数' as field_name,'期初件数' as title,
	60 as width,470 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_OrderTypeSummary' as module,'bq_rk_num' as field,
	'本期入库件数' as field_name,'本期入库件数' as title,
	75 as width,480 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_OrderTypeSummary' as module,'bq_ck_num' as field,
	'本期出库件数' as field_name,'本期出库件数' as title,
	75 as width,490 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,color)
	select 'Stock_Report_OrderTypeSummary' as module,'bq_jc_num' as field,
	'本期结存件数' as field_name,'本期结存件数' as title,
	75 as width,500 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_OrderTypeSummary' as module,'wh_id' as field,
	'仓库ID' as field_name,'仓库ID' as title,
	60 as width,600 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_OrderTypeSummary' as module,'wh_code' as field,
	'仓库编码' as field_name,'仓库编码' as title,
	60 as width,610 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_OrderTypeSummary' as module,'ic_code' as field,
	'存货分类编码' as field_name,'存货分类编码' as title,
	75 as width,630 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_OrderTypeSummary' as module,'ic_name' as field,
	'存货分类名称' as field_name,'存货分类名称' as title,
	75 as width,640 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_OrderTypeSummary' as module,'standard' as field,
	'规格型号' as field_name,'规格型号' as title,
	120 as width,650 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_OrderTypeSummary' as module,'munit' as field,
	'单位' as field_name,'单位' as title,
	40 as width,660 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_OrderTypeSummary' as module,'aunit' as field,
	'辅计单位' as field_name,'辅计量单位' as title,
	60 as width,660 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_OrderTypeSummary' as module,'sdefine1' as field,
	'存货字符自定义项1' as field_name,'存货字符自定义项1' as title,
	80 as width,3010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_OrderTypeSummary' as module,'sdefine2' as field,
	'存货字符自定义项2' as field_name,'存货字符自定义项2' as title,
	80 as width,3020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_OrderTypeSummary' as module,'sdefine3' as field,
	'存货字符自定义项3' as field_name,'存货字符自定义项3' as title,
	80 as width,3030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_OrderTypeSummary' as module,'sdefine4' as field,
	'存货字符自定义项4' as field_name,'存货字符自定义项4' as title,
	80 as width,3040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_OrderTypeSummary' as module,'sdefine5' as field,
	'存货字符自定义项5' as field_name,'存货字符自定义项5' as title,
	80 as width,3050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_OrderTypeSummary' as module,'ndefine1' as field,
	'存货数值自定义项1' as field_name,'存货数值自定义项1' as title,
	80 as width,3110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_OrderTypeSummary' as module,'ndefine2' as field,
	'存货数值自定义项2' as field_name,'存货数值自定义项2' as title,
	80 as width,3120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_OrderTypeSummary' as module,'ndefine3' as field,
	'存货数值自定义项3' as field_name,'存货数值自定义项3' as title,
	80 as width,3130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_OrderTypeSummary' as module,'ndefine4' as field,
	'存货数值自定义项4' as field_name,'存货数值自定义项4' as title,
	80 as width,3140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type)
	select 'Stock_Report_OrderTypeSummary' as module,'ndefine5' as field,
	'存货数值自定义项5' as field_name,'存货数值自定义项5' as title,
	80 as width,3150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type;

end
/**/GO
