UPDATE pal_Module 
SET isActive = 1 
WHERE module = 'FAQ' 



IF EXISTS ( SELECT * 
            FROM   sysobjects 
            WHERE  id = object_id(N'[dbo].[sp_DebtorsAssistedReportResult]') 
                   and OBJECTPROPERTY(id, N'IsProcedure') = 1 )
BEGIN
    DROP PROCEDURE [dbo].[sp_DebtorsAssistedReportResult]
END



IF EXISTS ( SELECT * 
            FROM   sysobjects 
            WHERE  id = object_id(N'[dbo].[sp_DebtorsAssistedReportSummary]') 
                   and OBJECTPROPERTY(id, N'IsProcedure') = 1 )
BEGIN
    DROP PROCEDURE [dbo].[sp_DebtorsAssistedReportSummary]
END



IF EXISTS ( SELECT * 
            FROM   sysobjects 
            WHERE  id = object_id(N'[dbo].[v_ReconByFiscalPeriod]') 
                   and OBJECTPROPERTY(id, N'IsView') = 1 )
BEGIN
    DROP VIEW [dbo].[v_ReconByFiscalPeriod]
END



IF EXISTS ( SELECT * 
            FROM   sysobjects 
            WHERE  id = object_id(N'[dbo].[v_InvoiceListing]') 
                   and OBJECTPROPERTY(id, N'IsView') = 1 )
BEGIN
    DROP VIEW [dbo].[v_InvoiceListing]
END



IF EXISTS ( SELECT * 
            FROM   sysobjects 
            WHERE  id = object_id(N'[dbo].[v_DebitListing]') 
                   and OBJECTPROPERTY(id, N'IsView') = 1 )
BEGIN
    DROP VIEW [dbo].[v_DebitListing]
END



IF EXISTS ( SELECT * 
            FROM   sysobjects 
            WHERE  id = object_id(N'[dbo].[v_CreditListing]') 
                   and OBJECTPROPERTY(id, N'IsView') = 1 )
BEGIN
    DROP VIEW [dbo].[v_CreditListing]
END



IF EXISTS ( SELECT * 
            FROM   sysobjects 
            WHERE  id = object_id(N'[dbo].[v_ReceiptListing]') 
                   and OBJECTPROPERTY(id, N'IsView') = 1 )
BEGIN
    DROP VIEW [dbo].[v_ReceiptListing]
END



IF EXISTS ( SELECT * 
            FROM   sysobjects 
            WHERE  id = object_id(N'[dbo].[sp_ReconByFiscalPeriod]') 
                   and OBJECTPROPERTY(id, N'IsProcedure') = 1 )
BEGIN
    DROP PROCEDURE [dbo].[sp_ReconByFiscalPeriod]
END



IF EXISTS ( SELECT * 
            FROM   sysobjects 
            WHERE  id = object_id(N'[dbo].[sp_ReceiptListingByDate]') 
                   and OBJECTPROPERTY(id, N'IsProcedure') = 1 )
BEGIN
    DROP PROCEDURE [dbo].[sp_ReceiptListingByDate]
END



IF EXISTS ( SELECT * 
            FROM   sysobjects 
            WHERE  id = object_id(N'[dbo].[sp_InvoiceListingByDate]') 
                   and OBJECTPROPERTY(id, N'IsProcedure') = 1 )
BEGIN
    DROP PROCEDURE [dbo].[sp_InvoiceListingByDate]
END



IF EXISTS ( SELECT * 
            FROM   sysobjects 
            WHERE  id = object_id(N'[dbo].[sp_DebitListingByDate]') 
                   and OBJECTPROPERTY(id, N'IsProcedure') = 1 )
BEGIN
    DROP PROCEDURE [dbo].[sp_DebitListingByDate]
END



IF EXISTS ( SELECT * 
            FROM   sysobjects 
            WHERE  id = object_id(N'[dbo].[sp_CreditListingByDate]') 
                   and OBJECTPROPERTY(id, N'IsProcedure') = 1 )
BEGIN
    DROP PROCEDURE [dbo].[sp_CreditListingByDate]
END

