

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'WINV_ArtiCode_GetCombo') )
DROP PROCEDURE WINV_ArtiCode_GetCombo
GO

CREATE PROCEDURE WINV_ArtiCode_GetCombo --Carga la informacion a el combobox
AS
BEGIN

	select codigo=LTRIM(RTRIM(dbo.FullArtiCode(a.id_arti))),LTRIM(RTRIM(a.descripcion))descripcion,LTRIM(RTRIM(a.id_arti))id_arti,LTRIM(RTRIM( fa.tipo))tipo,LTRIM(RTRIM( a.cant_unme_al))cant_unme_al, LTRIM(RTRIM(a.cant_unme_se))cant_unme_se
	from stokarti a 
	inner join stokfami fa on a.id_fami=fa.id_fami  
	where a.activo=1 order by 1

END
GO

