
DECLARE @ReportID BIGINT = 1022 -- Inventory Extension

IF EXISTS(SELECT 1 FROM [dbo].[tbReport] WHERE ReportID = @ReportID)
BEGIN
	
	UPDATE [dbo].[tbReport]
	SET ShowInMobile = 1
	WHERE ReportID = @ReportID
END

IF NOT EXISTS(SELECT 1 FROM [dbo].[tbReportParameter] WHERE ReportID = @ReportID)
BEGIN
	
	INSERT INTO [dbo].[tbReportParameter] (ReportID, ParameterTypeEnum, Name, IsRequired ) VALUES (@ReportID, 56, 'Store', 1)
	INSERT INTO [dbo].[tbReportParameter] (ReportID, ParameterTypeEnum, Name, IsRequired ) VALUES (@ReportID, -2, 'Month', 0)
	INSERT INTO [dbo].[tbReportParameter] (ReportID, ParameterTypeEnum, Name, IsRequired ) VALUES (@ReportID, 370, 'Print Mode', 0)

END
GO

DECLARE @ReportID BIGINT = 1053 -- Paid In/ Paid Out Summary (PettyCash)

IF EXISTS(SELECT 1 FROM [dbo].[tbReport] WHERE ReportID = @ReportID)
BEGIN
	
	UPDATE [dbo].[tbReport]
	SET ShowInMobile = 1
	WHERE ReportID = @ReportID
END

IF NOT EXISTS(SELECT 1 FROM [dbo].[tbReportParameter] WHERE ReportID = @ReportID)
BEGIN
	
	INSERT INTO [dbo].[tbReportParameter] (ReportID, ParameterTypeEnum, Name, IsRequired ) VALUES (@ReportID, 56, 'Store', 1)
	INSERT INTO [dbo].[tbReportParameter] (ReportID, ParameterTypeEnum, Name, IsRequired ) VALUES (@ReportID, -1, 'Date Range', 0)
	INSERT INTO [dbo].[tbReportParameter] (ReportID, ParameterTypeEnum, Name, IsRequired ) VALUES (@ReportID, 370, 'Print Mode', 0)
	INSERT INTO [dbo].[tbReportParameter] (ReportID, ParameterTypeEnum, Name, IsRequired ) VALUES (@ReportID, 59, 'Entity Name', 1)

END
GO

DECLARE @ReportID BIGINT = 1067 -- Daily Report Summary Sheet

IF EXISTS(SELECT 1 FROM [dbo].[tbReport] WHERE ReportID = @ReportID)
BEGIN
	
	UPDATE [dbo].[tbReport]
	SET ShowInMobile = 1
	WHERE ReportID = @ReportID
END

IF NOT EXISTS(SELECT 1 FROM [dbo].[tbReportParameter] WHERE ReportID = @ReportID)
BEGIN
	
	INSERT INTO [dbo].[tbReportParameter] (ReportID, ParameterTypeEnum, Name, IsRequired ) VALUES (@ReportID, 56, 'Store', 1)
	INSERT INTO [dbo].[tbReportParameter] (ReportID, ParameterTypeEnum, Name, IsRequired ) VALUES (@ReportID, -2, 'Month', 0)
	INSERT INTO [dbo].[tbReportParameter] (ReportID, ParameterTypeEnum, Name, IsRequired ) VALUES (@ReportID, 370, 'Print Mode', 0)
	INSERT INTO [dbo].[tbReportParameter] (ReportID, ParameterTypeEnum, Name, IsRequired ) VALUES (@ReportID, 59, 'Entity Name', 1)

END
GO

DECLARE @ReportID BIGINT = 1068 -- Monthly Sales Summary

IF EXISTS(SELECT 1 FROM [dbo].[tbReport] WHERE ReportID = @ReportID)
BEGIN
	
	UPDATE [dbo].[tbReport]
	SET ShowInMobile = 1
	WHERE ReportID = @ReportID
END

IF NOT EXISTS(SELECT 1 FROM [dbo].[tbReportParameter] WHERE ReportID = @ReportID)
BEGIN
	
	INSERT INTO [dbo].[tbReportParameter] (ReportID, ParameterTypeEnum, Name, IsRequired ) VALUES (@ReportID, 56, 'Store', 1)
	INSERT INTO [dbo].[tbReportParameter] (ReportID, ParameterTypeEnum, Name, IsRequired ) VALUES (@ReportID, -2, 'Month', 0)
	INSERT INTO [dbo].[tbReportParameter] (ReportID, ParameterTypeEnum, Name, IsRequired ) VALUES (@ReportID, 370, 'Print Mode', 0)
	INSERT INTO [dbo].[tbReportParameter] (ReportID, ParameterTypeEnum, Name, IsRequired ) VALUES (@ReportID, 59, 'Entity Name', 1)

END
GO

DECLARE @ReportID BIGINT = 1086 -- Discouts/Giveaways

IF EXISTS(SELECT 1 FROM [dbo].[tbReport] WHERE ReportID = @ReportID)
BEGIN
	
	UPDATE [dbo].[tbReport]
	SET ShowInMobile = 1
	WHERE ReportID = @ReportID
END

IF NOT EXISTS(SELECT 1 FROM [dbo].[tbReportParameter] WHERE ReportID = @ReportID)
BEGIN
	
	INSERT INTO [dbo].[tbReportParameter] (ReportID, ParameterTypeEnum, Name, IsRequired ) VALUES (@ReportID, 56, 'Store', 1)
	INSERT INTO [dbo].[tbReportParameter] (ReportID, ParameterTypeEnum, Name, IsRequired ) VALUES (@ReportID, -2, 'Month', 0)
	INSERT INTO [dbo].[tbReportParameter] (ReportID, ParameterTypeEnum, Name, IsRequired ) VALUES (@ReportID, 370, 'Print Mode', 0)
	INSERT INTO [dbo].[tbReportParameter] (ReportID, ParameterTypeEnum, Name, IsRequired ) VALUES (@ReportID, 59, 'Entity Name', 1)

END
GO

DECLARE @ReportID BIGINT = 1088 -- Tax Exempt Sales

IF EXISTS(SELECT 1 FROM [dbo].[tbReport] WHERE ReportID = @ReportID)
BEGIN
	
	UPDATE [dbo].[tbReport]
	SET ShowInMobile = 1
	WHERE ReportID = @ReportID
END

IF NOT EXISTS(SELECT 1 FROM [dbo].[tbReportParameter] WHERE ReportID = @ReportID)
BEGIN
	
	INSERT INTO [dbo].[tbReportParameter] (ReportID, ParameterTypeEnum, Name, IsRequired ) VALUES (@ReportID, 56, 'Store', 1)
	INSERT INTO [dbo].[tbReportParameter] (ReportID, ParameterTypeEnum, Name, IsRequired ) VALUES (@ReportID, -1, 'Date Range', 0)
	INSERT INTO [dbo].[tbReportParameter] (ReportID, ParameterTypeEnum, Name, IsRequired ) VALUES (@ReportID, 370, 'Print Mode', 0)
	INSERT INTO [dbo].[tbReportParameter] (ReportID, ParameterTypeEnum, Name, IsRequired ) VALUES (@ReportID, 59, 'Entity Name', 1)

END
GO

DECLARE @ReportID BIGINT = 1097 -- Customer Sales

IF EXISTS(SELECT 1 FROM [dbo].[tbReport] WHERE ReportID = @ReportID)
BEGIN
	
	UPDATE [dbo].[tbReport]
	SET ShowInMobile = 1
	WHERE ReportID = @ReportID
END

IF NOT EXISTS(SELECT 1 FROM [dbo].[tbReportParameter] WHERE ReportID = @ReportID)
BEGIN
	
	INSERT INTO [dbo].[tbReportParameter] (ReportID, ParameterTypeEnum, Name, IsRequired ) VALUES (@ReportID, 56, 'Store', 1)
	INSERT INTO [dbo].[tbReportParameter] (ReportID, ParameterTypeEnum, Name, IsRequired ) VALUES (@ReportID, -1, 'Date Range', 0)
	INSERT INTO [dbo].[tbReportParameter] (ReportID, ParameterTypeEnum, Name, IsRequired ) VALUES (@ReportID, 370, 'Print Mode', 0)
	INSERT INTO [dbo].[tbReportParameter] (ReportID, ParameterTypeEnum, Name, IsRequired ) VALUES (@ReportID, 59, 'Entity Name', 1)

END
GO
