The SQL that checks to make sure the vacation is between the start and stop dates is only in one of 3 queries. Here's the patch (against rev 757, but I see the fix isn't in 882 either) to add the SQL conditions to the other two queries.
I'm not sure if this is the most efficient solution, though. Perhaps this logic shouldn't be in the queries at all, and instead maybe the find_real_address() should return the entire record, and have the date range checking done at the end of the script in the main program?
Log in to post a comment.