Just thinks logically if your accrual balance is 2 50% is 2*50/100 = 1 the same is 2*0.5 = 1 what exactly your requirement is same multiply it with 0.5 that is on the basis of date of joining.
If employee joining date is greater than 15 store the balance as 0.5 and multiply with accrual balance date is greater than 25 than multiply with "0" i.e 2 days 2*0=0.
Regards
Venkatesh