
DECLARE @ReportID BIGINT = 1022 -- Inventory Extension

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

IF EXISTS(SELECT 1 FROM [dbo].[tbReportParameter] WHERE ReportID = @ReportID)
BEGIN
	
	DELETE FROM [dbo].[tbReportParameter] WHERE ReportID = @ReportID
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 = 0
	WHERE ReportID = @ReportID
END

IF EXISTS(SELECT 1 FROM [dbo].[tbReportParameter] WHERE ReportID = @ReportID)
BEGIN
	
	DELETE FROM [dbo].[tbReportParameter] WHERE ReportID = @ReportID
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 = 0
	WHERE ReportID = @ReportID
END

IF EXISTS(SELECT 1 FROM [dbo].[tbReportParameter] WHERE ReportID = @ReportID)
BEGIN
	
	DELETE FROM [dbo].[tbReportParameter] WHERE ReportID = @ReportID
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 = 0
	WHERE ReportID = @ReportID
END

IF EXISTS(SELECT 1 FROM [dbo].[tbReportParameter] WHERE ReportID = @ReportID)
BEGIN
	
	DELETE FROM [dbo].[tbReportParameter] WHERE ReportID = @ReportID
END
GO

DECLARE @ReportID BIGINT = 1086 -- Discouts/Giveaways

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

IF EXISTS(SELECT 1 FROM [dbo].[tbReportParameter] WHERE ReportID = @ReportID)
BEGIN
	
	DELETE FROM [dbo].[tbReportParameter] WHERE ReportID = @ReportID
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 = 0
	WHERE ReportID = @ReportID
END

IF EXISTS(SELECT 1 FROM [dbo].[tbReportParameter] WHERE ReportID = @ReportID)
BEGIN
	
	DELETE FROM [dbo].[tbReportParameter] WHERE ReportID = @ReportID
END
GO

DECLARE @ReportID BIGINT = 1097 -- Customer Sales

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

IF EXISTS(SELECT 1 FROM [dbo].[tbReportParameter] WHERE ReportID = @ReportID)
BEGIN
	
	DELETE FROM [dbo].[tbReportParameter] WHERE ReportID = @ReportID
END
GO


EXEC [dbo].[Rollback_RemoveDeployHistory] '190524-FMAS-1.sql'
GO
