if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[paInsConcDiversos]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[paInsConcDiversos]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[paUpConcDiversos]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[paUpConcDiversos]
GO

SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS OFF 
GO

CREATE PROCEDURE paInsConcDiversos @pmIdConcepto VARCHAR(4),@pmConcepto VARCHAR(250),@pmGrupo VARCHAR(20),@pmEsServicio BIT,@pmDeManfsto BIT,@pmCdIva VARCHAR(4)
,@pmCdRet VARCHAR(4),@pmCdIca VARCHAR(4),@pmIdCueDeb VARCHAR(16),@pmIdCueCre VARCHAR(16),@pmInactivo BIT,@pmFechaAdd SMALLDATETIME,@pmIdUsuario VARCHAR(11)
 AS 
 INSERT INTO ConcDiversos (IdConcepto,Concepto,Grupo,EsServicio,DeManfsto,CdIva,CdRet,CdIca,IdCueDeb,IdCueCre,Inactivo,FechaAdd,IdUsuario)
 VALUES (@pmIdConcepto,@pmConcepto,@pmGrupo,@pmEsServicio,@pmDeManfsto,@pmCdIva,@pmCdRet,@pmCdIca,@pmIdCueDeb,@pmIdCueCre,@pmInactivo,@pmFechaAdd,@pmIdUsuario)
GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO

SET QUOTED_IDENTIFIER ON 
GO
SET ANSI_NULLS OFF 
GO

CREATE PROCEDURE paUpConcDiversos @pmIdConcepto VARCHAR(4),@pmConcepto VARCHAR(250),@pmGrupo VARCHAR(20),@pmEsServicio BIT
,@pmDeManfsto BIT,@pmCdIva VARCHAR(4),@pmCdRet VARCHAR(4)
,@pmCdIca VARCHAR(4),@pmIdCueDeb VARCHAR(16),@pmIdCueCre VARCHAR(16),@pmInactivo BIT,@pmFechaUpdate SMALLDATETIME
 AS 
 UPDATE ConcDiversos SET Concepto=@pmConcepto,Grupo=@pmGrupo,EsServicio=@pmEsServicio,DeManfsto=@pmDeManfsto,CdIva=@pmCdIva
,CdRet=@pmCdRet,CdIca=@pmCdIca,Inactivo=@pmInactivo,IdCueDeb=@pmIdCueDeb,IdCueCre=@pmIdCueCre,FechaUpdate=@pmFechaUpdate
 WHERE IdConcepto=@pmIdConcepto
GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO

