use OmniClient
go

ALTER   procedure sp_GranjaVilla_0009
@cClieCode	varchar(10),
@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		:	2
	*	Modificado	:	13/05/2011
	*/

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

	insert into cliente(cClieCode,IdLocal,sClieApel,sClieName,sClieAddr,cDistCode,cProvCode,cDepaCode,sClieTelf,sClieMail,dNacmDate,iTipo,ctrancode,npuntCant,dultTDate,bflagsincro, bClienteVIP, sClieRout)
	values(@cClieCode,@IdLocal,upper(@sClieApel),upper(@sClieName),@sClieAddr,@cDistCode,@cProvCode,@cDepaCode,@sClieTelf,@sClieMail,@dNacmDate,@iTipo,'1','0',getdate(),'0', @bClienteVIP, @sClieRout)
end
GO