DROP Procedure IN_ArticulosPorProveedorAlmacenProc
GO
CREATE Procedure IN_ArticulosPorProveedorAlmacenProc
(@VENDIDSS     	UD_IDVENDOR,
 @SITEID       	UD_IDSITE
)
AS
BEGIN   

	SELECT  in_inventory.INVTIDSKU,in_inventory.descr,QTYAVAIL,BUYCOD AS [Cd.Compra], STDCOST AS Costo  
    	FROM 	(((in_vendorinvt INNER JOIN in_vendor ON in_vendorinvt.VENDIDSS=in_vendor.VENDIDSS) INNER JOIN 
           	currency ON in_vendorinvt.curyid=currency.curyid) INNER JOIN in_inventory ON in_vendorinvt.INVTIDSKU=
           	in_inventory.INVTIDSKU) INNER JOIN in_INVENTORYDAT ON in_INVENTORYDAT.INVTIDSKU=in_inventory.INVTIDSKU
	WHERE   in_vendorinvt.VENDIDSS =@VENDIDSS AND IN_INVENTORYDAT.SITEID=@SITEID AND IN_VENDORINVT.SITEID=@SITEID
		and in_inventory.STKITEM=1
 
END
