DECLARE @site varchar(4)

Select TOP 1 @site = site_cd from cf_site where site_cd  = 'SMCP'

If @site = 'SMCP'
BEGIN
	BEGIN TRANSACTION

	--drop table lri_mst;
	--drop table lri_det;
	--drop table lri_ls1;
	--drop table lri_ls2;
	--drop table lri_ref;

	CREATE TABLE [dbo].[lri_mst](
		[site_cd] [varchar](4) NOT NULL,
		[lri_mst_lri_no] [varchar](11) NOT NULL,
		[lri_mst_lri_date] [datetime] NULL,
		[lri_mst_status] [varchar](3) NULL,
		[lri_mst_desc] [varchar](255) NULL,
		[lri_mst_department] [varchar](50) NULL,
		[lri_mst_ttl_item] [numeric](12, 0) NULL,
		[lri_mst_ttl_par] [numeric](12, 0) NULL,
		[lri_mst_ttl_bal] [numeric](12, 0) NULL,
		[lri_mst_ttl_issue] [numeric](12, 0) NULL,
		[lri_mst_ttl_sf] [numeric](12, 0) NULL,
		[lri_mst_remark] [varchar](255) NULL,
		[lri_mst_create_by] [varchar](50) NULL,
		[lri_mst_create_date] [datetime] NULL,
		[audit_user] [varchar](50) NULL,
		[audit_date] [datetime] NOT NULL,
		[mbl_audit_user] [varchar](50) NULL,
		[mbl_audit_date] [datetime] NULL,
		[column1] [varchar](60) NULL,
		[column2] [varchar](60) NULL,
		[column3] [varchar](60) NULL,
		[column4] [varchar](60) NULL,
		[column5] [varchar](60) NULL,
		[RowID] [numeric](12, 0) IDENTITY(1,1) NOT NULL
	) ON [PRIMARY]

	INSERT	cf_table (	table_name,           
						table_desc,
						custom_report,
						audit_user,
						audit_date )
	VALUES (			'lri_mst',
						'Clean Linen Issue Record',
						'0',
						'admin',
						GETDATE())


	Delete from cf_label where table_name = 'lri_mst' AND column_name = 'lri_mst_lri_no'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_mst', 'lri_mst_lri_no', 'Routine No:', 'Routine No:', 'Routine No:', 'Routine No', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_mst' AND column_name = 'lri_mst_lri_date'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_mst', 'lri_mst_lri_date', 'Routine Date:', 'Routine Date:', 'Routine Date:', 'Routine Date', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_mst' AND column_name = 'lri_mst_status'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_mst', 'lri_mst_status', 'Status:', 'Status:', 'Status:', 'Status', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_mst' AND column_name = 'lri_mst_department'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_mst', 'lri_mst_department', 'Department:', 'Department:', 'Department:', 'Department', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_mst' AND column_name = 'lri_mst_desc'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_mst', 'lri_mst_desc', 'Description:', 'Description:', 'Description:', 'Description', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_mst' AND column_name = 'lri_mst_ttl_item'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_mst', 'lri_mst_ttl_item', 'Total Items:', 'Total Items:', 'Total Items:', 'Total Items', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_mst' AND column_name = 'lri_mst_ttl_par'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_mst', 'lri_mst_ttl_par', 'Total PAR:', 'Total PAR:', 'Total PAR:', 'Total PAR', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_mst' AND column_name = 'lri_mst_ttl_bal'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_mst', 'lri_mst_ttl_bal', 'Total Balance:', 'Total Balance:', 'Total Balance:', 'Total Balance', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_mst' AND column_name = 'lri_mst_ttl_issue'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_mst', 'lri_mst_ttl_issue', 'Total Issue:', 'Total Issue:', 'Total Issue:', 'Total Issue', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_mst' AND column_name = 'lri_mst_ttl_sf'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_mst', 'lri_mst_ttl_sf', 'Total ShortFall:', 'Total ShortFall:', 'Total ShortFall:', 'Total ShortFall', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_mst' AND column_name = 'lri_mst_remark'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_mst', 'lri_mst_remark', 'Remark:', 'Remark:', 'Remark:', 'Remark', '0', '0', 'admin', getdate() FROM cf_language
	


	CREATE TABLE [dbo].[lri_det](
		[site_cd] [varchar](4) NOT NULL,
		[mst_RowID] [numeric](12, 0) NULL,
		[lri_det_sign_by] [varchar](100) NULL,
		[lri_det_sign_by_id] [varchar](100) NULL,
		[lri_det_sign_by_contact] [varchar](100) NULL,
		[lri_det_sign_by_title] [varchar](100) NULL,
		[lri_det_sign_date] [datetime] NULL,
		[lri_det_varchar1] [varchar](100) NULL,
		[lri_det_varchar2] [varchar](100) NULL,
		[lri_det_varchar3] [varchar](100) NULL,
		[lri_det_varchar4] [varchar](100) NULL,
		[lri_det_varchar5] [varchar](100) NULL,
		[lri_det_varchar6] [varchar](100) NULL,
		[lri_det_varchar7] [varchar](100) NULL,
		[lri_det_varchar8] [varchar](100) NULL,
		[lri_det_varchar9] [varchar](100) NULL,
		[lri_det_varchar10] [varchar](100) NULL,
		[lri_det_numeric1] [numeric](21, 4) NULL,
		[lri_det_numeric2] [numeric](21, 4) NULL,
		[lri_det_numeric3] [numeric](21, 4) NULL,
		[lri_det_numeric4] [numeric](21, 4) NULL,
		[lri_det_numeric5] [numeric](21, 4) NULL,
		[lri_det_datetime1] [datetime] NULL,
		[lri_det_datetime2] [datetime] NULL,
		[lri_det_datetime3] [datetime] NULL,
		[lri_det_datetime4] [datetime] NULL,
		[lri_det_datetime5] [datetime] NULL,
		[lri_det_note1] [varchar](1000) NULL,
		[audit_user] [varchar](50) NULL,
		[audit_date] [datetime] NOT NULL,
		[mbl_audit_user] [varchar](50) NULL,
		[mbl_audit_date] [datetime] NULL,
		[column1] [varchar](60) NULL,
		[column2] [varchar](60) NULL,
		[column3] [varchar](60) NULL,
		[column4] [varchar](60) NULL,
		[column5] [varchar](60) NULL,
		[RowID] [numeric](12, 0) IDENTITY(1,1) NOT NULL	
	) ON [PRIMARY]
	

	INSERT	cf_table (	table_name,           
						table_desc,
						custom_report,
						audit_user,
						audit_date )
	VALUES (			'lri_det',
						'Clean Linen Issue Detail Record',
						'0',
						'admin',
						GETDATE())
	

	Delete from cf_label where table_name = 'lri_det' AND column_name = 'lri_det_sign_by'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_det', 'lri_det_sign_by', 'Sign By:', 'Sign By:', 'Sign By:', 'Sign By', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_det' AND column_name = 'lri_det_sign_by_title'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_det', 'lri_det_sign_by_title', 'Sign By Title:', 'Sign By Title:', 'Sign By Title:', 'Sign By Title', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_det' AND column_name = 'lri_det_sign_by_id'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_det', 'lri_det_sign_by_id', 'Sign By ID:', 'Sign By ID:', 'Sign By ID:', 'Sign By ID', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_det' AND column_name = 'lri_det_sign_by_contact'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_det', 'lri_det_sign_by_contact', 'Contact Number:', 'Contact Number:', 'Contact Number:', 'Contact Number', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_det' AND column_name = 'lri_det_sign_date'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_det', 'lri_det_sign_date', 'Sign Date:', 'Sign Date:', 'Sign Date:', 'Sign Date', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_det' AND column_name = 'lri_det_varchar1'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_det', 'lri_det_varchar1', 'Varchar1:', 'Varchar1:', 'Varchar1:', 'Varchar1', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_det' AND column_name = 'lri_det_varchar2'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_det', 'lri_det_varchar2', 'Varchar2:', 'Varchar2:', 'Varchar2:', 'Varchar2', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_det' AND column_name = 'lri_det_varchar3'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_det', 'lri_det_varchar3', 'Varchar3:', 'Varchar3:', 'Varchar3:', 'Varchar3', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_det' AND column_name = 'lri_det_varchar4'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_det', 'lri_det_varchar4', 'Varchar4:', 'Varchar4:', 'Varchar4:', 'Varchar4', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_det' AND column_name = 'lri_det_varchar5'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_det', 'lri_det_varchar5', 'Varchar5:', 'Varchar5:', 'Varchar5:', 'Varchar5', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_det' AND column_name = 'lri_det_datetime1'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_det', 'lri_det_datetime1', 'Datetime1:', 'Datetime1:', 'Datetime1:', 'Datetime1', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_det' AND column_name = 'lri_det_datetime2'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_det', 'lri_det_datetime2', 'Datetime2:', 'Datetime2:', 'Datetime2:', 'Datetime2', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_det' AND column_name = 'lri_det_datetime3'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_det', 'lri_det_datetime3', 'Datetime3:', 'Datetime3:', 'Datetime3:', 'Datetime3', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_det' AND column_name = 'lri_det_datetime4'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_det', 'lri_det_datetime4', 'Datetime4:', 'Datetime4:', 'Datetime4:', 'Datetime4', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_det' AND column_name = 'lri_det_datetime5'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_det', 'lri_det_datetime5', 'Datetime5:', 'Datetime5:', 'Datetime5:', 'Datetime5', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_det' AND column_name = 'lri_det_numeric1'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_det', 'lri_det_numeric1', 'Numeric1:', 'Numeric1:', 'Numeric1:', 'Numeric1', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_det' AND column_name = 'lri_det_numeric2'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_det', 'lri_det_numeric2', 'Numeric2:', 'Numeric2:', 'Numeric2:', 'Numeric2', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_det' AND column_name = 'lri_det_numeric3'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_det', 'lri_det_numeric3', 'Numeric3:', 'Numeric3:', 'Numeric3:', 'Numeric3', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_det' AND column_name = 'lri_det_numeric4'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_det', 'lri_det_numeric4', 'Numeric4:', 'Numeric4:', 'Numeric4:', 'Numeric4', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_det' AND column_name = 'lri_det_numeric5'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_det', 'lri_det_numeric5', 'Numeric5:', 'Numeric5:', 'Numeric5:', 'Numeric5', '0', '0', 'admin', getdate() FROM cf_language
	

	CREATE TABLE [dbo].[lri_ls1](
		[site_cd] [varchar](4) NOT NULL,
		[mst_RowID] [numeric](12, 0) NULL,
		[lri_ls1_linen] [varchar](50) NULL,
		[lri_ls1_par_qty] [numeric](5, 0) NULL,
		[lri_ls1_bal_qty] [numeric](5, 0) NULL,
		[lri_ls1_issue1_qty] [numeric](5, 0) NULL,
		[lri_ls1_issue2_qty] [numeric](5, 0) NULL,
		[lri_ls1_sf_qty] [numeric](5, 0) NULL,
		[lri_ls1_remark] [varchar](255) NULL,
		[lri_ls1_varchar1] [varchar](100) NULL,
		[lri_ls1_varchar2] [varchar](100) NULL,
		[lri_ls1_varchar3] [varchar](100) NULL,
		[lri_ls1_varchar4] [varchar](100) NULL,
		[lri_ls1_varchar5] [varchar](100) NULL,
		[lri_ls1_numeric1] [numeric](21, 4) NULL,
		[lri_ls1_numeric2] [numeric](21, 4) NULL,
		[lri_ls1_numeric3] [numeric](21, 4) NULL,
		[lri_ls1_numeric4] [numeric](21, 4) NULL,
		[lri_ls1_numeric5] [numeric](21, 4) NULL,
		[lri_ls1_datetime1] [datetime] NULL,
		[lri_ls1_datetime2] [datetime] NULL,
		[lri_ls1_datetime3] [datetime] NULL,
		[lri_ls1_datetime4] [datetime] NULL,
		[lri_ls1_datetime5] [datetime] NULL,
		[audit_user] [varchar](50) NULL,
		[audit_date] [datetime] NOT NULL,
		[mbl_audit_user] [varchar](50) NULL,
		[mbl_audit_date] [datetime] NULL,
		[column1] [varchar](60) NULL,
		[column2] [varchar](60) NULL,
		[column3] [varchar](60) NULL,
		[column4] [varchar](60) NULL,
		[column5] [varchar](60) NULL,
		[RowID] [numeric](12, 0) IDENTITY(1,1) NOT NULL
	) ON [PRIMARY] 
	

	INSERT	cf_table (	table_name,           
						table_desc,
						custom_report,
						audit_user,
						audit_date )
	VALUES (			'lri_ls1',
						'Clean Linen Issue List Record',
						'0',
						'admin',
						GETDATE())
	

	Delete from cf_label where table_name = 'lri_ls1' AND column_name = 'lri_ls1_linen'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_ls1', 'lri_ls1_linen', 'Linen:', 'Linen:', 'Linen:', 'Linen', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_ls1' AND column_name = 'lri_ls1_par_qty'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_ls1', 'lri_ls1_par_qty', 'Par Qty:', 'Par Qty:', 'Par Qty:', 'Par Qty', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_ls1' AND column_name = 'lri_ls1_bal_qty'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_ls1', 'lri_ls1_bal_qty', 'Balance Qty:', 'Balance Qty:', 'Balance Qty:', 'Balance Qty', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_ls1' AND column_name = 'lri_ls1_issue1_qty'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_ls1', 'lri_ls1_issue1_qty', 'Issue 1 Qty:', 'Issue 1 Qty:', 'Issue 1 Qty:', 'Issue 1 Qty', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_ls1' AND column_name = 'lri_ls1_issue2_qty'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_ls1', 'lri_ls1_issue2_qty', 'Issue 2 Qty:', 'Issue 2 Qty:', 'Issue 2 Qty:', 'Issue 2 Qty', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_ls1' AND column_name = 'lri_ls1_sf_qty'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_ls1', 'lri_ls1_sf_qty', 'Shortfall Qty:', 'Shortfall Qty:', 'Shortfall Qty:', 'Shortfall Qty', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_ls1' AND column_name = 'lri_ls1_remark'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_ls1', 'lri_ls1_remark', 'Remark:', 'Remark:', 'Remark:', 'Remark', '0', '0', 'admin', getdate() FROM cf_language
	


	CREATE TABLE [dbo].[lri_ls2](
		[site_cd] [varchar](4) NOT NULL,
		[mst_RowID] [numeric](12, 0) NULL,
		[lri_ls2_varchar1] [varchar](100) NULL,
		[lri_ls2_varchar2] [varchar](100) NULL,
		[lri_ls2_varchar3] [varchar](100) NULL,
		[lri_ls2_varchar4] [varchar](100) NULL,
		[lri_ls2_varchar5] [varchar](100) NULL,
		[lri_ls2_varchar6] [varchar](100) NULL,
		[lri_ls2_varchar7] [varchar](100) NULL,
		[lri_ls2_varchar8] [varchar](100) NULL,
		[lri_ls2_varchar9] [varchar](100) NULL,
		[lri_ls2_varchar10] [varchar](100) NULL,
		[lri_ls2_numeric1] [numeric](21, 4) NULL,
		[lri_ls2_numeric2] [numeric](21, 4) NULL,
		[lri_ls2_numeric3] [numeric](21, 4) NULL,
		[lri_ls2_numeric4] [numeric](21, 4) NULL,
		[lri_ls2_numeric5] [numeric](21, 4) NULL,
		[lri_ls2_numeric6] [numeric](21, 4) NULL,
		[lri_ls2_numeric7] [numeric](21, 4) NULL,
		[lri_ls2_numeric8] [numeric](21, 4) NULL,
		[lri_ls2_numeric9] [numeric](21, 4) NULL,
		[lri_ls2_numeric10] [numeric](21, 4) NULL,
		[lri_ls2_datetime1] [datetime] NULL,
		[lri_ls2_datetime2] [datetime] NULL,
		[lri_ls2_datetime3] [datetime] NULL,
		[lri_ls2_datetime4] [datetime] NULL,
		[lri_ls2_datetime5] [datetime] NULL,
		[lri_ls2_datetime6] [datetime] NULL,
		[lri_ls2_datetime7] [datetime] NULL,
		[lri_ls2_datetime8] [datetime] NULL,
		[lri_ls2_datetime9] [datetime] NULL,
		[lri_ls2_datetime10] [datetime] NULL,
		[audit_user] [varchar](50) NULL,
		[audit_date] [datetime] NOT NULL,
		[mbl_audit_user] [varchar](50) NULL,
		[mbl_audit_date] [datetime] NULL,
		[column1] [varchar](60) NULL,
		[column2] [varchar](60) NULL,
		[column3] [varchar](60) NULL,
		[column4] [varchar](60) NULL,
		[column5] [varchar](60) NULL,
		[RowID] [numeric](12, 0) IDENTITY(1,1) NOT NULL
	) ON [PRIMARY]
	

	INSERT	cf_table (	table_name,           
						table_desc,
						custom_report,
						audit_user,
						audit_date )
	VALUES (			'lri_ls2',
						'Clean Linen Issue Status Audit Record',
						'0',
						'admin',
						GETDATE())
	

	Delete from cf_label where table_name = 'lri_ls2' AND column_name = 'lri_ls2_varchar1'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_ls2', 'lri_ls2_varchar1', 'Varchar1:', 'Varchar1:', 'Varchar1:', 'Varchar1', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_ls2' AND column_name = 'lri_ls2_varchar2'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_ls2', 'lri_ls2_varchar2', 'Varchar2:', 'Varchar2:', 'Varchar2:', 'Varchar2', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_ls2' AND column_name = 'lri_ls2_varchar3'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_ls2', 'lri_ls2_varchar3', 'Varchar3:', 'Varchar3:', 'Varchar3:', 'Varchar3', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_ls2' AND column_name = 'lri_ls2_varchar4'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_ls2', 'lri_ls2_varchar4', 'Varchar4:', 'Varchar4:', 'Varchar4:', 'Varchar4', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_ls2' AND column_name = 'lri_ls2_varchar5'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_ls2', 'lri_ls2_varchar5', 'Varchar5:', 'Varchar5:', 'Varchar5:', 'Varchar5', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_ls2' AND column_name = 'lri_ls2_datetime1'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_ls2', 'lri_ls2_datetime1', 'Datetime1:', 'Datetime1:', 'Datetime1:', 'Datetime1', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_ls2' AND column_name = 'lri_ls2_datetime2'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_ls2', 'lri_ls2_datetime2', 'Datetime2:', 'Datetime2:', 'Datetime2:', 'Datetime2', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_ls2' AND column_name = 'lri_ls2_datetime3'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_ls2', 'lri_ls2_datetime3', 'Datetime3:', 'Datetime3:', 'Datetime3:', 'Datetime3', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_ls2' AND column_name = 'lri_ls2_datetime4'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_ls2', 'lri_ls2_datetime4', 'Datetime4:', 'Datetime4:', 'Datetime4:', 'Datetime4', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_ls2' AND column_name = 'lri_ls2_datetime5'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_ls2', 'lri_ls2_datetime5', 'Datetime5:', 'Datetime5:', 'Datetime5:', 'Datetime5', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_ls2' AND column_name = 'lri_ls2_numeric1'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_ls2', 'lri_ls2_numeric1', 'Numeric1:', 'Numeric1:', 'Numeric1:', 'Numeric1', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_ls2' AND column_name = 'lri_ls2_numeric2'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_ls2', 'lri_ls2_numeric2', 'Numeric2:', 'Numeric2:', 'Numeric2:', 'Numeric2', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_ls2' AND column_name = 'lri_ls2_numeric3'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_ls2', 'lri_ls2_numeric3', 'Numeric3:', 'Numeric3:', 'Numeric3:', 'Numeric3', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_ls2' AND column_name = 'lri_ls2_numeric4'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_ls2', 'lri_ls2_numeric4', 'Numeric4:', 'Numeric4:', 'Numeric4:', 'Numeric4', '0', '0', 'admin', getdate() FROM cf_language
	
	Delete from cf_label where table_name = 'lri_ls2' AND column_name = 'lri_ls2_numeric5'			
	 
	INSERT  cf_label (language_cd, table_name, column_name, default_label, customize_label, default_header, customize_header, cfr_flag, cf_label_required, audit_user, audit_date ) 
	SELECT  language_cd, 'lri_ls2', 'lri_ls2_numeric5', 'Numeric5:', 'Numeric5:', 'Numeric5:', 'Numeric5', '0', '0', 'admin', getdate() FROM cf_language
	

	CREATE TABLE [dbo].[lri_ref](
		[site_cd] [varchar](4) NOT NULL,
		[mst_RowID] [numeric](12, 0) NULL,
		[file_name] [varchar](200) NULL,
		[type] [varchar](10) NULL,
		[status] [varchar](10) NULL,
		[attachment] [image] NULL,
		[category] [varchar](30) NULL,
		[audit_user] [varchar](50) NULL,
		[audit_date] [datetime] NOT NULL,
		[mbl_audit_user] [varchar](50) NULL,
		[mbl_audit_date] [datetime] NULL,
		[column1] [varchar](60) NULL,
		[column2] [varchar](60) NULL,
		[column3] [varchar](60) NULL,
		[column4] [varchar](60) NULL,
		[column5] [varchar](60) NULL,
		[RowID] [numeric](12, 0) IDENTITY(1,1) NOT NULL
	) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
	
	COMMIT TRANSACTION;
END