drop proc op_cierrespendientes
go

create proc op_cierrespendientes
@DATEPROCE  ud_fecha,
@SALESPOINT ud_ptovta
as

select top 1 SALESPERNAME from op_reservationcash rc
join op_salesperson sp on rc.SALESPERID = sp.SALESPERID  
where DATEPROCE=@DATEPROCE and SALESPOINT=@SALESPOINT and STKCLSEDX = 0
go

op_cierrespendientes '20030120','PTOVTA09'

