ALTER PROCEDURE [dbo].[sp_cobAnticiposSel]
(
@rut as int
)

-- Add the parameters for the stored procedure here
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

    -- Insert statements for procedure here
	SELECT id_anticipo,rut, monto, fechamov, CASE centralizado WHEN 's' THEN 'Centralizado' ELSE 'No Centralizado' END AS centralizado 
	FROM cobAnticipos 
	WHERE rut = @rut
	AND tipo = 1
	ORDER BY id_anticipo DESC
END