IF NOT EXISTS(SELECT * FROM sys.columns 
		WHERE Name = N'deleted'
		AND Object_ID = Object_ID(N'pal_MSEraClaimItemAccount'))
BEGIN
	ALTER TABLE pal_MSEraClaimItemAccount
		ADD deleted BIT NULL;
END




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




IF EXISTS ( SELECT * 
            FROM   sys.views 
            WHERE  name='pal_vAccountUnprocessedEra' and type='v')
BEGIN
    DROP VIEW [dbo].[pal_vAccountUnprocessedEra]
END




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




IF EXISTS ( SELECT * 
            FROM   sys.views 
            WHERE  name='pal_vReceiptListing' and type='v')
BEGIN
    DROP VIEW [dbo].[pal_vReceiptListing]
END