-- =============================================
-- Author:		<Yonatan Gaete>
-- Create date: <29/09/2024>
-- Description:	<Leer datos Afi Bienes>
-- =============================================
ALTER PROCEDURE [dbo].[sp_AfiBienes_Sel] 
(
	@id INT
)
AS
BEGIN
	SELECT 
		[id]
	   ,[nombre]
	   ,[descripcion]
   	   ,[numeroSerie]
	   ,[codigoBarra]
	   ,[codigoInterno]
	   ,[uniNeg]
	   ,[fechaCompra]
	   ,[costoCompra]
	   ,[vidaUtil]
	   ,[valorResidual]
	   ,[metodoDepreciacion]
	   ,[grupo]
	   ,[subgrupo]
	   ,[ubicacion]
	   ,[responsable]
	   ,[estado]
	   ,[fechaUltimaDepreciacion]
	   ,[manejaMantencion]
	   ,[permiteMovimiento]
	   ,[cuentaContable]
	   ,[rutCyV]
	   ,[tipoDocCyV]
	   ,[numDocCyV]
	   ,[codbus]
	   ,[orderCompra]
	   ,[enMantenimiento]
	   ,[departamento]
	   ,[deBaja]
	   ,[fechaIngreso]
	   ,[loging]
  FROM afiBienes
  WHERE (id = @id OR @id = 0)
END