actually the function does not work properly after many tests
for example I\'ve triedSelect * from [dbo].[fn_GetLeaveDays] (\'2020-09-24\',1,\'2020-09-25\',1,1,1)
Select * from [dbo].[fn_GetLeaveDays] (\'2020-09-24\',1,\'2020-09-25\',1,1,1)