


--Step 01 Add new colunm Inventory Stock Receive
Declare @f_menu_id numeric
Declare @f_menu_seq numeric

select @f_menu_seq = max(cf_menu_seq) + 1
From cf_menu
Where program_category = 'MBL'
and object_type = 'M'

INSERT INTO cf_menu ( language_cd, object_name, object_descs, object_type, program_category, ico_name, remarks, cf_menu_seq, audit_column, custom_flag, external_program, access_audit, mobile_object_type, audit_user, audit_date, column1, column2, column3, column4, column5 ) VALUES ('DEFAULT','m_ast_asset_meter','Asset - Asset Meter','M','MBL','(Default)',NULL,@f_menu_seq,'0','0','0','0','M','admin',getdate(),'Asset',NULL,NULL,NULL,NULL)
select TOP 1 @f_menu_id = RowID from cf_menu order by rowid desc
Insert cf_user_access (site_cd, empl_id, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag)  Select cf_site_user.site_cd, cf_site_user.empl_id,@f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 From cf_site_user 
Insert cf_menu_template_access (template_cd, menuid, exe_flag, view_flag, new_flag, edit_flag, del_flag, print_flag, audit_user, audit_date)  Select cf_menu_template.template_cd, @f_menu_id ,1 ,1 ,1 ,1 ,1 ,1 ,'admi' , GetDate() From cf_menu_template 


--NOTE: Approval Work order all & Approval Work Order My Group  if you see this two items in the list Currently we are not using this two values so we can remove the list and update the cf_menu_seq (Bec of this two already using in the Work request moduel so no need approval moduel)
--delete from cf_menu where object_name in ('m_appr_wr_approval_list_all_grp','m_appr_wr_approval_list_my_grp')





