ALTER  procedure [dbo].[sp_GranjaVilla_0013]
@cClieCode	varchar(20),
@IdLocal	varchar(2),
@sClieApel	varchar(100),
@sClieName	varchar(100),
@sClieAddr	varchar(200),
@cDistCode	varchar(10),
@cProvCode	varchar(10),
@cDepaCode	varchar(10),
@sClieTelf	varchar(30),
@sClieMail	varchar(100),
@dNacmDate	varchar(20),
@iTipo		varchar(10),
@sClieRout	varchar(150)='',
@bClienteVIP	int = 0
as 
begin
	/*
	*	Descripcion	:
	*	Version		:	3
	*	Modificado	:	27/07/2012
	*/

	set @dNacmDate=convert(datetime,substring(@dNacmDate,7,4)+substring(@dNacmDate,4,2)+substring(@dNacmDate,1,2))

	update a set /*idLocal=@IdLocal,*/sclieapel=@sClieApel,scliename=@sClieName,sclieAddr=@sClieAddr,cDistCode=@cDistCode,cProvCode=@cProvCode,
	cDepaCode=@cDepaCode,sclietelf=@sClieTelf,scliemail=@sClieMail,dnacmdate=@dNacmDate,dulttdate=getdate(),itipo=@iTipo, 
	bClienteVIP = @bClienteVIP, sClieRout=@sClieRout
	,bFlagSincro = 0 --sw Add 27/07/2012
	from  cliente a where ccliecode=@cClieCode and idLocal=@IdLocal
end
GO