
--插入收款单_主表界面格式
--delete System_ModuleFormat where module='ARAP_ShouKuan_Header'
if(select count(1) from System_ModuleFormat where module='ARAP_ShouKuan_Header' and field='sfk_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'ARAP_ShouKuan_Header' as module,'sfk_id' as field,
	'收款单主表ID' as field_name,'收款单主表ID' as title,
	120 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,color)
	select 'ARAP_ShouKuan_Header' 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,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'ARAP_ShouKuan_Header' 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,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'ARAP_ShouKuan_Header' as module,'cus_id' as field,
	'客户ID' as field_name,'客户ID' as title,
	120 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,color)
	select 'ARAP_ShouKuan_Header' as module,'cus_name' 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,'blue' as color;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'ARAP_ShouKuan_Header' as module,'vd_id' as field,
	'供应商ID' as field_name,'供应商ID' as title,
	120 as width,150 as sort,0 as show,1 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 'ARAP_ShouKuan_Header' as module,'vd_name' as field,
	'供应商名称' as field_name,'供应商名称' as title,
	98 as width,160 as sort,0 as show,1 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 'ARAP_ShouKuan_Header' as module,'invoice_no' 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,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'ARAP_ShouKuan_Header' as module,'ss_id' as field,
	'结算方式ID' as field_name,'结算方式ID' as title,
	120 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,color)
	select 'ARAP_ShouKuan_Header' as module,'ss_name' as field,
	'结算方式' as field_name,'结算方式' as title,
	98 as width,190 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 'ARAP_ShouKuan_Header' as module,'ac_id' as field,
	'结算账户ID' as field_name,'结算账户ID' as title,
	120 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 'ARAP_ShouKuan_Header' as module,'ac_name' as field,
	'结算账户' as field_name,'结算账户' as title,
	98 as width,210 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 'ARAP_ShouKuan_Header' as module,'crc_id' as field,
	'币种ID' as field_name,'币种ID' as title,
	120 as width,215 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 'ARAP_ShouKuan_Header' as module,'crc_name' as field,
	'币种' as field_name,'币种' as title,
	98 as width,216 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 'ARAP_ShouKuan_Header' as module,'exchange_rate' as field,
	'汇率' as field_name,'汇率' as title,
	120 as width,217 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,color)
	select 'ARAP_ShouKuan_Header' as module,'amount' as field,
	'收款金额' as field_name,'收款金额' as title,
	120 as width,220 as sort,1 as show,0 as hidden,1 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 'ARAP_ShouKuan_Header' as module,'acc_hx_amount' as field,
	'已核销金额' as field_name,'已核销金额' as title,
	120 as width,230 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 'ARAP_ShouKuan_Header' as module,'wait_hx_amount' as field,
	'未核销金额' as field_name,'未核销金额' as title,
	120 as width,240 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 'ARAP_ShouKuan_Header' as module,'nat_amount' as field,
	'本币收款金额' as field_name,'本币收款金额' as title,
	120 as width,250 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 'ARAP_ShouKuan_Header' as module,'acc_hx_nat_amount' as field,
	'本币已核销金额' as field_name,'本币已核销金额' as title,
	120 as width,260 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 'ARAP_ShouKuan_Header' as module,'wait_hx_nat_amount' as field,
	'本币未核销金额' as field_name,'本币未核销金额' as title,
	120 as width,270 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 'ARAP_ShouKuan_Header' as module,'dep_id' as field,
	'部门ID' as field_name,'部门ID' as title,
	120 as width,280 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 'ARAP_ShouKuan_Header' as module,'dep_name' as field,
	'部门' as field_name,'部门' as title,
	98 as width,300 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 'ARAP_ShouKuan_Header' as module,'ele_id' as field,
	'业务员ID' as field_name,'业务员ID' as title,
	120 as width,310 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 'ARAP_ShouKuan_Header' as module,'ele_name' as field,
	'业务员' as field_name,'业务员' as title,
	98 as width,320 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 'ARAP_ShouKuan_Header' as module,'new_user' as field,
	'新增人' as field_name,'新增人' as title,
	120 as width,400 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 'ARAP_ShouKuan_Header' as module,'update_user' as field,
	'修改人' as field_name,'修改人' as title,
	120 as width,410 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 'ARAP_ShouKuan_Header' as module,'update_date' as field,
	'修改日期' as field_name,'修改日期' as title,
	120 as width,420 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 'ARAP_ShouKuan_Header' as module,'verify_user' as field,
	'审核人' as field_name,'审核人' as title,
	120 as width,430 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 'ARAP_ShouKuan_Header' as module,'remark' as field,
	'备注' as field_name,'备注' as title,
	120 as width,440 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,can_select)
	select 'ARAP_ShouKuan_Header' as module,'sdefine1' as field,
	'字符自定义项1' as field_name,'字符自定义项1' as title,
	103 as width,1010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

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

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

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

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

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

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

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

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

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

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_ShouKuan_Header' as module,'cus_sdefine1' as field,
	'客户字符自定义项1' as field_name,'客户字符自定义项1' as title,
	103 as width,2010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_ShouKuan_Header' as module,'cus_sdefine2' as field,
	'客户字符自定义项2' as field_name,'客户字符自定义项2' as title,
	103 as width,2020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_ShouKuan_Header' as module,'cus_sdefine3' as field,
	'客户字符自定义项3' as field_name,'客户字符自定义项3' as title,
	103 as width,2030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_ShouKuan_Header' as module,'cus_sdefine4' as field,
	'客户字符自定义项4' as field_name,'客户字符自定义项4' as title,
	103 as width,2040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_ShouKuan_Header' as module,'cus_sdefine5' as field,
	'客户字符自定义项5' as field_name,'客户字符自定义项5' as title,
	103 as width,2050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_ShouKuan_Header' as module,'cus_ndefine1' as field,
	'客户数值自定义项1' as field_name,'客户数值自定义项1' as title,
	103 as width,2110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_ShouKuan_Header' as module,'cus_ndefine2' as field,
	'客户数值自定义项2' as field_name,'客户数值自定义项2' as title,
	103 as width,2120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_ShouKuan_Header' as module,'cus_ndefine3' as field,
	'客户数值自定义项3' as field_name,'客户数值自定义项3' as title,
	103 as width,2130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_ShouKuan_Header' as module,'cus_ndefine4' as field,
	'客户数值自定义项4' as field_name,'客户数值自定义项4' as title,
	103 as width,2140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_ShouKuan_Header' as module,'cus_ndefine5' as field,
	'客户数值自定义项5' as field_name,'客户数值自定义项5' as title,
	103 as width,2150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

end
/**/GO

--插入收款单核销部分_编辑界面格式
--delete System_ModuleFormat where module='ARAP_APCancel_ShouKuan_Input'
if(select count(1) from System_ModuleFormat where module='ARAP_APCancel_ShouKuan_Input' and field='acl_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'ARAP_APCancel_ShouKuan_Input' as module,'acl_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 'ARAP_APCancel_ShouKuan_Input' as module,'sfk_id' as field,
	'收款单主表ID' as field_name,'收款单主表ID' as title,
	60 as width,110 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 'ARAP_APCancel_ShouKuan_Input' as module,'apd_id' as field,
	'应收账ID' as field_name,'应收账ID' as title,
	120 as width,120 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 'ARAP_APCancel_ShouKuan_Input' as module,'from_order_number' as field,
	'单据号' as field_name,'单据号' as title,
	120 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 'ARAP_APCancel_ShouKuan_Input' as module,'from_type' as field,
	'单据类型' as field_name,'单据类型' as title,
	80 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 'ARAP_APCancel_ShouKuan_Input' as module,'i_code' 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,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'ARAP_APCancel_ShouKuan_Input' as module,'i_name' as field,
	'存货名称' as field_name,'存货名称' as title,
	100 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,color)
	select 'ARAP_APCancel_ShouKuan_Input' as module,'from_order_amount' 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,'' as color;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'ARAP_APCancel_ShouKuan_Input' as module,'acc_hx_amount' as field,
	'已核销金额' as field_name,'已核销金额' as title,
	80 as width,180 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,0 as can_edit,'' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'ARAP_APCancel_ShouKuan_Input' as module,'wait_hx_amount' as field,
	'未核销金额' as field_name,'未核销金额' as title,
	80 as width,190 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,0 as can_edit,'' as color;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'ARAP_APCancel_ShouKuan_Input' as module,'hx_amount' as field,
	'本次核销金额' as field_name,'本次核销金额' as title,
	80 as width,200 as sort,1 as show,0 as hidden,1 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 'ARAP_APCancel_ShouKuan_Input' as module,'crc_name' 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 'ARAP_APCancel_ShouKuan_Input' as module,'d_exchange_rate' as field,
	'汇率' as field_name,'汇率' as title,
	60 as width,220 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,color)
	select 'ARAP_APCancel_ShouKuan_Input' as module,'acc_hx_nat_amount' as field,
	'本币累计核销金额' as field_name,'本币累计核销金额' as title,
	80 as width,230 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type,0 as can_edit,'' as color;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'ARAP_APCancel_ShouKuan_Input' as module,'nat_hx_amount' as field,
	'本币本次核销金额' as field_name,'本币本次核销金额' as title,
	80 as width,240 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 'ARAP_APCancel_ShouKuan_Input' as module,'bus_order_number' as field,
	'销售订单号' as field_name,'销售订单号' as title,
	120 as width,250 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 'ARAP_APCancel_ShouKuan_Input' as module,'standard' as field,
	'规格型号' as field_name,'规格型号' as title,
	120 as width,260 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 'ARAP_APCancel_ShouKuan_Input' as module,'munit' 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,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'ARAP_APCancel_ShouKuan_Input' as module,'aunit' 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,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_APCancel_ShouKuan_Input' as module,'free1' as field,
	'自由项1' as field_name,'自由项1' as title,
	103 as width,290 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_APCancel_ShouKuan_Input' as module,'free2' as field,
	'自由项2' as field_name,'自由项2' as title,
	103 as width,300 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_APCancel_ShouKuan_Input' as module,'batch' as field,
	'批次' as field_name,'批次' as title,
	103 as width,310 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'ARAP_APCancel_ShouKuan_Input' as module,'i_id' as field,
	'存货ID' as field_name,'存货ID' as title,
	120 as width,320 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='ARAP_APCancel_ShouKuan_Input' and field='d_sdefine1')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_APCancel_ShouKuan_Input' as module,'d_sdefine1' as field,
	'字符自定义项1' as field_name,'字符自定义项1' as title,
	103 as width,1010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

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

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

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

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

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

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

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

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

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

--插入付款单_主表界面格式
--delete System_ModuleFormat where module='ARAP_FuKuan_Header'
if(select count(1) from System_ModuleFormat where module='ARAP_FuKuan_Header' and field='sfk_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'ARAP_FuKuan_Header' as module,'sfk_id' as field,
	'付款单主表ID' as field_name,'付款单主表ID' as title,
	120 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,color)
	select 'ARAP_FuKuan_Header' 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,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'ARAP_FuKuan_Header' 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,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'ARAP_FuKuan_Header' as module,'vd_id' as field,
	'供应商ID' as field_name,'供应商ID' as title,
	120 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,color)
	select 'ARAP_FuKuan_Header' as module,'vd_name' 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,'blue' as color;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'ARAP_FuKuan_Header' as module,'cus_id' as field,
	'客户ID' as field_name,'客户ID' as title,
	120 as width,150 as sort,0 as show,1 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 'ARAP_FuKuan_Header' as module,'cus_name' as field,
	'客户名称' as field_name,'客户名称' as title,
	98 as width,160 as sort,0 as show,1 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 'ARAP_FuKuan_Header' as module,'invoice_no' 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,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'ARAP_FuKuan_Header' as module,'ss_id' as field,
	'结算方式ID' as field_name,'结算方式ID' as title,
	120 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,color)
	select 'ARAP_FuKuan_Header' as module,'ss_name' as field,
	'结算方式' as field_name,'结算方式' as title,
	98 as width,190 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 'ARAP_FuKuan_Header' as module,'ac_id' as field,
	'结算账户ID' as field_name,'结算账户ID' as title,
	120 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 'ARAP_FuKuan_Header' as module,'ac_name' as field,
	'结算账户' as field_name,'结算账户' as title,
	98 as width,210 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 'ARAP_FuKuan_Header' as module,'crc_id' as field,
	'币种ID' as field_name,'币种ID' as title,
	120 as width,215 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 'ARAP_FuKuan_Header' as module,'crc_name' as field,
	'币种' as field_name,'币种' as title,
	98 as width,216 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 'ARAP_FuKuan_Header' as module,'exchange_rate' as field,
	'汇率' as field_name,'汇率' as title,
	120 as width,217 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,color)
	select 'ARAP_FuKuan_Header' as module,'amount' as field,
	'付款金额' as field_name,'付款金额' as title,
	120 as width,220 as sort,1 as show,0 as hidden,1 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 'ARAP_FuKuan_Header' as module,'acc_hx_amount' as field,
	'已核销金额' as field_name,'已核销金额' as title,
	120 as width,230 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 'ARAP_FuKuan_Header' as module,'wait_hx_amount' as field,
	'未核销金额' as field_name,'未核销金额' as title,
	120 as width,240 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 'ARAP_FuKuan_Header' as module,'nat_amount' as field,
	'本币付款金额' as field_name,'本币付款金额' as title,
	120 as width,250 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 'ARAP_FuKuan_Header' as module,'acc_hx_nat_amount' as field,
	'本币已核销金额' as field_name,'本币已核销金额' as title,
	120 as width,260 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 'ARAP_FuKuan_Header' as module,'wait_hx_nat_amount' as field,
	'本币未核销金额' as field_name,'本币未核销金额' as title,
	120 as width,270 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 'ARAP_FuKuan_Header' as module,'dep_id' as field,
	'部门ID' as field_name,'部门ID' as title,
	120 as width,280 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 'ARAP_FuKuan_Header' as module,'dep_name' as field,
	'部门' as field_name,'部门' as title,
	98 as width,300 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 'ARAP_FuKuan_Header' as module,'ele_id' as field,
	'业务员ID' as field_name,'业务员ID' as title,
	120 as width,310 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 'ARAP_FuKuan_Header' as module,'ele_name' as field,
	'业务员' as field_name,'业务员' as title,
	98 as width,320 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 'ARAP_FuKuan_Header' as module,'new_user' as field,
	'新增人' as field_name,'新增人' as title,
	120 as width,400 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 'ARAP_FuKuan_Header' as module,'update_user' as field,
	'修改人' as field_name,'修改人' as title,
	120 as width,410 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 'ARAP_FuKuan_Header' as module,'update_date' as field,
	'修改日期' as field_name,'修改日期' as title,
	120 as width,420 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 'ARAP_FuKuan_Header' as module,'verify_user' as field,
	'审核人' as field_name,'审核人' as title,
	120 as width,430 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 'ARAP_FuKuan_Header' as module,'remark' as field,
	'备注' as field_name,'备注' as title,
	120 as width,440 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,can_select)
	select 'ARAP_FuKuan_Header' as module,'sdefine1' as field,
	'字符自定义项1' as field_name,'字符自定义项1' as title,
	103 as width,1010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

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

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

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

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

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

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

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

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

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

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_FuKuan_Header' as module,'vd_sdefine1' as field,
	'供应商字符自定义项1' as field_name,'供应商字符自定义项1' as title,
	103 as width,2010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_FuKuan_Header' as module,'vd_sdefine2' as field,
	'供应商字符自定义项2' as field_name,'供应商字符自定义项2' as title,
	103 as width,2020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_FuKuan_Header' as module,'vd_sdefine3' as field,
	'供应商字符自定义项3' as field_name,'供应商字符自定义项3' as title,
	103 as width,2030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_FuKuan_Header' as module,'vd_sdefine4' as field,
	'供应商字符自定义项4' as field_name,'供应商字符自定义项4' as title,
	103 as width,2040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_FuKuan_Header' as module,'vd_sdefine5' as field,
	'供应商字符自定义项5' as field_name,'供应商字符自定义项5' as title,
	103 as width,2050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_FuKuan_Header' as module,'vd_ndefine1' as field,
	'供应商数值自定义项1' as field_name,'供应商数值自定义项1' as title,
	103 as width,2110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_FuKuan_Header' as module,'vd_ndefine2' as field,
	'供应商数值自定义项2' as field_name,'供应商数值自定义项2' as title,
	103 as width,2120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_FuKuan_Header' as module,'vd_ndefine3' as field,
	'供应商数值自定义项3' as field_name,'供应商数值自定义项3' as title,
	103 as width,2130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_FuKuan_Header' as module,'vd_ndefine4' as field,
	'供应商数值自定义项4' as field_name,'供应商数值自定义项4' as title,
	103 as width,2140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_FuKuan_Header' as module,'vd_ndefine5' as field,
	'供应商数值自定义项5' as field_name,'供应商数值自定义项5' as title,
	103 as width,2150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

end
/**/GO
--插入付款单核销部分_编辑界面格式
--delete System_ModuleFormat where module='ARAP_APCancel_FuKuan_Input'
if(select count(1) from System_ModuleFormat where module='ARAP_APCancel_FuKuan_Input' and field='acl_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'ARAP_APCancel_FuKuan_Input' as module,'acl_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 'ARAP_APCancel_FuKuan_Input' as module,'sfk_id' as field,
	'付款单主表ID' as field_name,'付款单主表ID' as title,
	60 as width,110 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 'ARAP_APCancel_FuKuan_Input' as module,'apd_id' as field,
	'应付账ID' as field_name,'应付账ID' as title,
	120 as width,120 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 'ARAP_APCancel_FuKuan_Input' as module,'from_order_number' as field,
	'单据号' as field_name,'单据号' as title,
	120 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 'ARAP_APCancel_FuKuan_Input' as module,'from_type' as field,
	'单据类型' as field_name,'单据类型' as title,
	80 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 'ARAP_APCancel_FuKuan_Input' as module,'i_code' 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,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'ARAP_APCancel_FuKuan_Input' as module,'i_name' as field,
	'存货名称' as field_name,'存货名称' as title,
	100 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,color)
	select 'ARAP_APCancel_FuKuan_Input' as module,'from_order_amount' 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,'' as color;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'ARAP_APCancel_FuKuan_Input' as module,'acc_hx_amount' as field,
	'已核销金额' as field_name,'已核销金额' as title,
	80 as width,180 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,0 as can_edit,'' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'ARAP_APCancel_FuKuan_Input' as module,'wait_hx_amount' as field,
	'未核销金额' as field_name,'未核销金额' as title,
	80 as width,190 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,0 as can_edit,'' as color;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'ARAP_APCancel_FuKuan_Input' as module,'hx_amount' as field,
	'本次核销金额' as field_name,'本次核销金额' as title,
	80 as width,200 as sort,1 as show,0 as hidden,1 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,color)
	select 'ARAP_APCancel_FuKuan_Input' as module,'acc_hx_nat_amount' as field,
	'本币累计核销金额' as field_name,'本币累计核销金额' as title,
	100 as width,210 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type,0 as can_edit,'' as color;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'ARAP_APCancel_FuKuan_Input' as module,'nat_hx_amount' as field,
	'本币本次核销金额' as field_name,'本币本次核销金额' as title,
	100 as width,220 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 'ARAP_APCancel_FuKuan_Input' as module,'crc_name' 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,0 as can_edit;
  /*
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'ARAP_APCancel_FuKuan_Input' as module,'d_exchange_rate' as field,
	'汇率' as field_name,'汇率' as title,
	60 as width,240 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 'ARAP_APCancel_FuKuan_Input' as module,'bus_order_number' as field,
	'采购订单号' as field_name,'采购订单号' as title,
	120 as width,250 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 'ARAP_APCancel_FuKuan_Input' as module,'standard' as field,
	'规格型号' as field_name,'规格型号' as title,
	120 as width,260 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 'ARAP_APCancel_FuKuan_Input' as module,'munit' 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,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'ARAP_APCancel_FuKuan_Input' as module,'aunit' 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,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_APCancel_FuKuan_Input' as module,'free1' as field,
	'自由项1' as field_name,'自由项1' as title,
	103 as width,290 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_APCancel_FuKuan_Input' as module,'free2' as field,
	'自由项2' as field_name,'自由项2' as title,
	103 as width,300 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_APCancel_FuKuan_Input' as module,'batch' as field,
	'批次' as field_name,'批次' as title,
	103 as width,310 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'ARAP_APCancel_FuKuan_Input' as module,'i_id' as field,
	'存货ID' as field_name,'存货ID' as title,
	120 as width,320 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='ARAP_APCancel_FuKuan_Input' and field='d_sdefine1')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_APCancel_FuKuan_Input' as module,'d_sdefine1' as field,
	'字符自定义项1' as field_name,'字符自定义项1' as title,
	103 as width,1010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

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

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

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

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

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

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

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

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

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

--插入应收单_主表界面格式
--delete System_ModuleFormat where module='ARAP_OtherRP_AR_Header'
if(select count(1) from System_ModuleFormat where module='ARAP_OtherRP_AR_Header' and field='orp_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'ARAP_OtherRP_AR_Header' as module,'orp_id' as field,
	'应收单主表ID' as field_name,'应收单主表ID' as title,
	120 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,color)
	select 'ARAP_OtherRP_AR_Header' 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,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'ARAP_OtherRP_AR_Header' 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,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'ARAP_OtherRP_AR_Header' as module,'cus_id' as field,
	'客户ID' as field_name,'客户ID' as title,
	120 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,color)
	select 'ARAP_OtherRP_AR_Header' as module,'cus_name' 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,'blue' as color;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'ARAP_OtherRP_AR_Header' as module,'vd_id' as field,
	'供应商ID' as field_name,'供应商ID' as title,
	120 as width,130 as sort,0 as show,1 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 'ARAP_OtherRP_AR_Header' as module,'vd_name' as field,
	'供应商名称' as field_name,'供应商名称' as title,
	98 as width,140 as sort,0 as show,1 as hidden,0 as sum_field,'text' as type,1 as can_edit,'' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'ARAP_OtherRP_AR_Header' as module,'dep_id' as field,
	'部门ID' as field_name,'部门ID' as title,
	120 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 'ARAP_OtherRP_AR_Header' as module,'dep_name' as field,
	'部门' as field_name,'部门' as title,
	98 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)
	select 'ARAP_OtherRP_AR_Header' as module,'ele_id' as field,
	'业务员ID' as field_name,'业务员ID' as title,
	120 as width,210 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 'ARAP_OtherRP_AR_Header' as module,'ele_name' as field,
	'业务员' as field_name,'业务员' as title,
	98 as width,220 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 'ARAP_OtherRP_AR_Header' as module,'crc_id' as field,
	'币种ID' as field_name,'币种ID' as title,
	120 as 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,color)
	select 'ARAP_OtherRP_AR_Header' as module,'crc_name' as field,
	'币种' as field_name,'币种' as title,
	98 as width,240 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 'ARAP_OtherRP_AR_Header' as module,'exchange_rate' as field,
	'汇率' as field_name,'汇率' as title,
	120 as width,250 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 'ARAP_OtherRP_AR_Header' as module,'tax_rate' as field,
	'税率' as field_name,'税率' as title,
	120 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,auth_view,auth_edit)
	select 'ARAP_OtherRP_AR_Header' as module,'total_price' as field,
	'无税金额' as field_name,'无税金额' as title,
	120 as width,280 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit,
	'' as auth_view,
	'' as auth_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,auth_view,auth_edit)
	select 'ARAP_OtherRP_AR_Header' as module,'tax_total_price' as field,
	'含税金额' as field_name,'含税金额' as title,
	120 as width,290 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit,
	'' as auth_view,
	'' as auth_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,auth_view,auth_edit)
	select 'ARAP_OtherRP_AR_Header' as module,'nat_total_price' as field,
	'本币金额' as field_name,'本币金额' as title,
	120 as width,300 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type,0 as can_edit,
	'' as auth_view,
	'' as auth_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,auth_view,auth_edit)
	select 'ARAP_OtherRP_AR_Header' as module,'nat_tax_total_price' as field,
	'本币含税金额' as field_name,'本币含税金额' as title,
	120 as width,310 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type,0 as can_edit,
	'' as auth_view,
	'' as auth_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'ARAP_OtherRP_AR_Header' as module,'new_user' as field,
	'新增人' as field_name,'新增人' as title,
	120 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 'ARAP_OtherRP_AR_Header' as module,'update_user' as field,
	'修改人' as field_name,'修改人' as title,
	120 as width,330 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 'ARAP_OtherRP_AR_Header' as module,'update_date' as field,
	'修改日期' as field_name,'修改日期' as title,
	120 as width,340 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 'ARAP_OtherRP_AR_Header' as module,'verify_user' as field,
	'审核人' as field_name,'审核人' as title,
	120 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 'ARAP_OtherRP_AR_Header' as module,'remark' as field,
	'备注' as field_name,'备注' as title,
	120 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,can_select)
	select 'ARAP_OtherRP_AR_Header' as module,'sdefine1' as field,
	'字符自定义项1' as field_name,'字符自定义项1' as title,
	103 as width,1010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

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

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

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

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

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

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

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

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

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

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_OtherRP_AR_Header' as module,'cus_sdefine1' as field,
	'客户字符自定义项1' as field_name,'客户字符自定义项1' as title,
	103 as width,2010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_OtherRP_AR_Header' as module,'cus_sdefine2' as field,
	'客户字符自定义项2' as field_name,'客户字符自定义项2' as title,
	103 as width,2020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_OtherRP_AR_Header' as module,'cus_sdefine3' as field,
	'客户字符自定义项3' as field_name,'客户字符自定义项3' as title,
	103 as width,2030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_OtherRP_AR_Header' as module,'cus_sdefine4' as field,
	'客户字符自定义项4' as field_name,'客户字符自定义项4' as title,
	103 as width,2040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_OtherRP_AR_Header' as module,'cus_sdefine5' as field,
	'客户字符自定义项5' as field_name,'客户字符自定义项5' as title,
	103 as width,2050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_OtherRP_AR_Header' as module,'cus_ndefine1' as field,
	'客户数值自定义项1' as field_name,'客户数值自定义项1' as title,
	103 as width,2110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_OtherRP_AR_Header' as module,'cus_ndefine2' as field,
	'客户数值自定义项2' as field_name,'客户数值自定义项2' as title,
	103 as width,2120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_OtherRP_AR_Header' as module,'cus_ndefine3' as field,
	'客户数值自定义项3' as field_name,'客户数值自定义项3' as title,
	103 as width,2130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_OtherRP_AR_Header' as module,'cus_ndefine4' as field,
	'客户数值自定义项4' as field_name,'客户数值自定义项4' as title,
	103 as width,2140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_OtherRP_AR_Header' as module,'cus_ndefine5' as field,
	'客户数值自定义项5' as field_name,'客户数值自定义项5' as title,
	103 as width,2150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

end
/**/GO



--插入应付单_主表界面格式
--delete System_ModuleFormat where module='ARAP_OtherRP_AP_Header'
if(select count(1) from System_ModuleFormat where module='ARAP_OtherRP_AP_Header' and field='orp_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'ARAP_OtherRP_AP_Header' as module,'orp_id' as field,
	'应付单主表ID' as field_name,'应付单主表ID' as title,
	120 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,color)
	select 'ARAP_OtherRP_AP_Header' 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,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'ARAP_OtherRP_AP_Header' 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,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'ARAP_OtherRP_AP_Header' as module,'vd_id' as field,
	'供应商ID' as field_name,'供应商ID' as title,
	120 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,color)
	select 'ARAP_OtherRP_AP_Header' as module,'vd_name' 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,'blue' as color;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'ARAP_OtherRP_AP_Header' as module,'cus_id' as field,
	'客户ID' as field_name,'客户ID' as title,
	120 as width,130 as sort,0 as show,1 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 'ARAP_OtherRP_AP_Header' as module,'cus_name' as field,
	'客户名称' as field_name,'客户名称' as title,
	98 as width,140 as sort,0 as show,1 as hidden,0 as sum_field,'text' as type,1 as can_edit,'' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'ARAP_OtherRP_AP_Header' as module,'dep_id' as field,
	'部门ID' as field_name,'部门ID' as title,
	120 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 'ARAP_OtherRP_AP_Header' as module,'dep_name' as field,
	'部门' as field_name,'部门' as title,
	98 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)
	select 'ARAP_OtherRP_AP_Header' as module,'ele_id' as field,
	'业务员ID' as field_name,'业务员ID' as title,
	120 as width,210 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 'ARAP_OtherRP_AP_Header' as module,'ele_name' as field,
	'业务员' as field_name,'业务员' as title,
	98 as width,220 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 'ARAP_OtherRP_AP_Header' as module,'crc_id' as field,
	'币种ID' as field_name,'币种ID' as title,
	120 as 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,color)
	select 'ARAP_OtherRP_AP_Header' as module,'crc_name' as field,
	'币种' as field_name,'币种' as title,
	98 as width,240 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 'ARAP_OtherRP_AP_Header' as module,'exchange_rate' as field,
	'汇率' as field_name,'汇率' as title,
	120 as width,250 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 'ARAP_OtherRP_AP_Header' as module,'tax_rate' as field,
	'税率' as field_name,'税率' as title,
	120 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,auth_view,auth_edit)
	select 'ARAP_OtherRP_AP_Header' as module,'total_price' as field,
	'无税金额' as field_name,'无税金额' as title,
	120 as width,280 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit,
	'' as auth_view,
	'' as auth_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,auth_view,auth_edit)
	select 'ARAP_OtherRP_AP_Header' as module,'tax_total_price' as field,
	'含税金额' as field_name,'含税金额' as title,
	120 as width,290 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit,
	'' as auth_view,
	'' as auth_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,auth_view,auth_edit)
	select 'ARAP_OtherRP_AP_Header' as module,'nat_total_price' as field,
	'本币金额' as field_name,'本币金额' as title,
	120 as width,300 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type,0 as can_edit,
	'' as auth_view,
	'' as auth_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,auth_view,auth_edit)
	select 'ARAP_OtherRP_AP_Header' as module,'nat_tax_total_price' as field,
	'本币含税金额' as field_name,'本币含税金额' as title,
	120 as width,310 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type,0 as can_edit,
	'' as auth_view,
	'' as auth_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'ARAP_OtherRP_AP_Header' as module,'new_user' as field,
	'新增人' as field_name,'新增人' as title,
	120 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 'ARAP_OtherRP_AP_Header' as module,'update_user' as field,
	'修改人' as field_name,'修改人' as title,
	120 as width,330 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 'ARAP_OtherRP_AP_Header' as module,'update_date' as field,
	'修改日期' as field_name,'修改日期' as title,
	120 as width,340 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 'ARAP_OtherRP_AP_Header' as module,'verify_user' as field,
	'审核人' as field_name,'审核人' as title,
	120 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 'ARAP_OtherRP_AP_Header' as module,'remark' as field,
	'备注' as field_name,'备注' as title,
	120 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,can_select)
	select 'ARAP_OtherRP_AP_Header' as module,'sdefine1' as field,
	'字符自定义项1' as field_name,'字符自定义项1' as title,
	103 as width,1010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

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

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

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

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

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

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

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

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

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

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_OtherRP_AP_Header' as module,'vd_sdefine1' as field,
	'供应商字符自定义项1' as field_name,'供应商字符自定义项1' as title,
	103 as width,2010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_OtherRP_AP_Header' as module,'vd_sdefine2' as field,
	'供应商字符自定义项2' as field_name,'供应商字符自定义项2' as title,
	103 as width,2020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_OtherRP_AP_Header' as module,'vd_sdefine3' as field,
	'供应商字符自定义项3' as field_name,'供应商字符自定义项3' as title,
	103 as width,2030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_OtherRP_AP_Header' as module,'vd_sdefine4' as field,
	'供应商字符自定义项4' as field_name,'供应商字符自定义项4' as title,
	103 as width,2040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_OtherRP_AP_Header' as module,'vd_sdefine5' as field,
	'供应商字符自定义项5' as field_name,'供应商字符自定义项5' as title,
	103 as width,2050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_OtherRP_AP_Header' as module,'vd_ndefine1' as field,
	'供应商数值自定义项1' as field_name,'供应商数值自定义项1' as title,
	103 as width,2110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_OtherRP_AP_Header' as module,'vd_ndefine2' as field,
	'供应商数值自定义项2' as field_name,'供应商数值自定义项2' as title,
	103 as width,2120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_OtherRP_AP_Header' as module,'vd_ndefine3' as field,
	'供应商数值自定义项3' as field_name,'供应商数值自定义项3' as title,
	103 as width,2130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_OtherRP_AP_Header' as module,'vd_ndefine4' as field,
	'供应商数值自定义项4' as field_name,'供应商数值自定义项4' as title,
	103 as width,2140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'ARAP_OtherRP_AP_Header' as module,'vd_ndefine5' as field,
	'供应商数值自定义项5' as field_name,'供应商数值自定义项5' as title,
	103 as width,2150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

end
/**/GO

--插入核销单_主表界面格式
--delete System_ModuleFormat where module='ARAP_CancelOrder_Header'
if(select count(1) from System_ModuleFormat where module='ARAP_CancelOrder_Header' and field='co_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'ARAP_CancelOrder_Header' as module,'co_id' as field,
	'核销单主表ID' as field_name,'核销单主表ID' as title,
	120 as width,80 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 'ARAP_CancelOrder_Header' as module,'cl_type' as field,
	'核销类型ID' as field_name,'核销类型ID' as title,
	120 as width,90 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 'ARAP_CancelOrder_Header' as module,'cl_type_name' as field,
	'核销类型' as field_name,'核销类型' as title,
	98 as width,100 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,color)
	select 'ARAP_CancelOrder_Header' 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,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'ARAP_CancelOrder_Header' 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,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'ARAP_CancelOrder_Header' as module,'cus_id' as field,
	'客户ID' as field_name,'客户ID' as title,
	120 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,color)
	select 'ARAP_CancelOrder_Header' as module,'cus_name' 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,'blue' as color;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'ARAP_CancelOrder_Header' as module,'vd_id' as field,
	'供应商ID' as field_name,'供应商ID' as title,
	120 as width,150 as sort,0 as show,1 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 'ARAP_CancelOrder_Header' as module,'vd_name' as field,
	'供应商名称' as field_name,'供应商名称' as title,
	98 as width,160 as sort,0 as show,1 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 'ARAP_CancelOrder_Header' as module,'crc_id' as field,
	'币种ID' as field_name,'币种ID' as title,
	120 as width,215 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 'ARAP_CancelOrder_Header' as module,'crc_name' as field,
	'币种' as field_name,'币种' as title,
	98 as width,216 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 'ARAP_CancelOrder_Header' as module,'exchange_rate' as field,
	'汇率' as field_name,'汇率' as title,
	120 as width,217 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 'ARAP_CancelOrder_Header' as module,'new_user' as field,
	'新增人' as field_name,'新增人' as title,
	120 as width,400 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 'ARAP_CancelOrder_Header' as module,'update_user' as field,
	'修改人' as field_name,'修改人' as title,
	120 as width,410 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 'ARAP_CancelOrder_Header' as module,'update_date' as field,
	'修改日期' as field_name,'修改日期' as title,
	120 as width,420 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 'ARAP_CancelOrder_Header' as module,'verify_user' as field,
	'审核人' as field_name,'审核人' as title,
	120 as width,430 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 'ARAP_CancelOrder_Header' as module,'remark' as field,
	'备注' as field_name,'备注' as title,
	120 as width,440 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
end
/**/GO



--delete System_ModuleFormat where module='ARAP_Cancel1_Input'
if(select count(1) from System_ModuleFormat where module='ARAP_Cancel1_Input' and field='acl_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'ARAP_Cancel1_Input' as module,'acl_id' as field,
	'核销单子表1ID' as field_name,'核销单子表1ID' as title,
	120 as width,80 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 'ARAP_Cancel1_Input' as module,'co_id' as field,
	'核销单主表ID' as field_name,'核销单主表ID' as title,
	120 as width,90 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 'ARAP_Cancel1_Input' as module,'sfk_id' as field,
	'收付款单主表ID' as field_name,'收付款单主表ID' as title,
	120 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,color)
	select 'ARAP_Cancel1_Input' 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,'' as color;

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

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'ARAP_Cancel1_Input' as module,'amount' as field,
	'金额' as field_name,'金额' as title,
	80 as width,220 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit,'' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'ARAP_Cancel1_Input' as module,'acc_hx_amount' as field,
	'已核销金额' as field_name,'已核销金额' as title,
	80 as width,230 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 'ARAP_Cancel1_Input' as module,'wait_hx_amount' as field,
	'未核销金额' as field_name,'未核销金额' as title,
	80 as width,240 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,color)
	select 'ARAP_Cancel1_Input' as module,'hx_amount' as field,
	'本次核销金额' as field_name,'本次核销金额' as title,
	100 as width,245 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,0 as can_edit,'blue' as color;
 
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'ARAP_Cancel1_Input' as module,'nat_amount' as field,
	'本币金额' as field_name,'本币金额' as title,
	80 as width,250 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 'ARAP_Cancel1_Input' as module,'acc_hx_nat_amount' as field,
	'本币已核销金额' as field_name,'本币已核销金额' as title,
	100 as width,260 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 'ARAP_Cancel1_Input' as module,'wait_hx_nat_amount' as field,
	'本币未核销金额' as field_name,'本币未核销金额' as title,
	100 as width,270 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,color)
	select 'ARAP_Cancel1_Input' as module,'nat_hx_amount' as field,
	'本币本次核销金额' as field_name,'本币本次核销金额' as title,
	100 as width,275 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type,0 as can_edit,'' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'ARAP_Cancel1_Input' as module,'d_remark' as field,
	'备注' as field_name,'备注' as title,
	120 as width,440 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
end
/**/GO

--delete System_ModuleFormat where module='ARAP_Cancel2_Input'
if(select count(1) from System_ModuleFormat where module='ARAP_Cancel2_Input' and field='acl_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'ARAP_Cancel2_Input' as module,'acl_id' as field,
	'核销单子表1ID' as field_name,'核销单子表1ID' as title,
	120 as width,80 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 'ARAP_Cancel2_Input' as module,'co_id' as field,
	'核销单主表ID' as field_name,'核销单主表ID' as title,
	120 as width,90 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 'ARAP_Cancel2_Input' as module,'apd_id' as field,
	'应收应付ID' as field_name,'应收应付ID' as title,
	120 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,color)
	select 'ARAP_Cancel2_Input' 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,'' as color;

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

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'ARAP_Cancel2_Input' as module,'amount' as field,
	'金额' as field_name,'金额' as title,
	80 as width,220 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit,'' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'ARAP_Cancel2_Input' as module,'acc_hx_amount' as field,
	'已核销金额' as field_name,'已核销金额' as title,
	80 as width,230 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 'ARAP_Cancel2_Input' as module,'wait_hx_amount' as field,
	'未核销金额' as field_name,'未核销金额' as title,
	80 as width,240 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,color)
	select 'ARAP_Cancel2_Input' as module,'hx_amount' as field,
	'本次核销金额' as field_name,'本次核销金额' as title,
	100 as width,245 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,0 as can_edit,'blue' as color;
 
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'ARAP_Cancel2_Input' as module,'nat_amount' as field,
	'本币金额' as field_name,'本币金额' as title,
	100 as width,250 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 'ARAP_Cancel2_Input' as module,'acc_hx_nat_amount' as field,
	'本币已核销金额' as field_name,'本币已核销金额' as title,
	100 as width,260 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 'ARAP_Cancel2_Input' as module,'wait_hx_nat_amount' as field,
	'本币未核销金额' as field_name,'本币未核销金额' as title,
	100 as width,270 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,color)
	select 'ARAP_Cancel2_Input' as module,'nat_hx_amount' as field,
	'本币本次核销金额' as field_name,'本币本次核销金额' as title,
	100 as width,275 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type,0 as can_edit,'' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'ARAP_Cancel2_Input' as module,'d_remark' as field,
	'备注' as field_name,'备注' as title,
	120 as width,440 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
end
/**/GO
