Automatic LWP calculation

Is it possible to automatically make LWP in case the allocated Leave Type runs out and the employee applies for more leaves?

@teamcodez

If allocated leaves run out Employee cant able to apply further,but he can use LWP at any time.