USE [bp2]
GO
/****** Object:  StoredProcedure [dbo].[sp_zavrsenTransfer]    Script Date: 2/8/2014 10:18:19 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO


CREATE procedure [dbo].[sp_zavrsenTransfer](
	@sifraPaketa int,
	@sifraPosteSlanja int,
	@sifraPostePrimanja int,
	@datumSlanja date
)
as
begin
    begin tran
		update transferi set datumPrimanja = getdate()
		where sifraPaketa = @sifraPaketa and 
			sifraPosteSlanja = @sifraPosteSlanja and
			sifraPostePrimanja = @sifraPostePrimanja and
			datumSlanja = @datumSlanja
	commit tran
end