IF EXISTS ( SELECT  * FROM    dbo.sysobjects WHERE   id = OBJECT_ID(N'[dbo].[Create_Sanad_Auto]')  AND OBJECTPROPERTY(id, N'IsProcedure') = 1 )
    DROP PROCEDURE [dbo].[Create_Sanad_Auto]


IF EXISTS ( SELECT  * FROM    dbo.sysobjects WHERE   id = OBJECT_ID(N'[dbo].[Create_Sanad_Radif]')  AND OBJECTPROPERTY(id, N'IsProcedure') = 1 )
    DROP PROCEDURE [dbo].[Create_Sanad_Radif]


IF EXISTS ( SELECT  * FROM    dbo.sysobjects WHERE   id = OBJECT_ID(N'[dbo].[Sp_SodorFactor_Retail]')  AND OBJECTPROPERTY(id, N'IsProcedure') = 1 )
    DROP PROCEDURE [dbo].[Sp_SodorFactor_Retail]



IF EXISTS ( SELECT  * FROM  dbo.sysobjects WHERE   id = OBJECT_ID(N'[dbo].[Sodor_Vajeh]')  AND OBJECTPROPERTY(id, N'IsProcedure') = 1 )
    DROP PROCEDURE [dbo].[Sodor_Vajeh]



if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[TI_Cheqe]') and OBJECTPROPERTY(id, N'IsTrigger') = 1)
Drop Trigger [dbo].[TI_Cheqe]


IF EXISTS ( SELECT  * FROM  dbo.sysobjects WHERE   id = OBJECT_ID(N'[dbo].[CalcIncrementalDeductionFactor]')  AND OBJECTPROPERTY(id, N'IsProcedure') = 1 )
    DROP PROCEDURE [dbo].[CalcIncrementalDeductionFactor]


IF EXISTS ( SELECT  * FROM  dbo.sysobjects WHERE   id = OBJECT_ID(N'[dbo].[Delete_Mandeh_Data]')  AND OBJECTPROPERTY(id, N'IsProcedure') = 1 )
    DROP PROCEDURE [dbo].[Delete_Mandeh_Data]



