You know the SP is going to be fun when I start it out with:
IF (@count>0) --Ok we have some calls, try and fill the gaps - giggity
BEGIN
--Gonna get looooooooopy until everything is marked as processed
While (Select COUNT(id) from @timecard where agent_no=@agent and processed=0)>0
Begin