Variable Bonus is not stipulated in Employment Act, and it depends on your employment contract as well as the individual company policy.
Some company practises to forfeit the bonus payout once resignation letter given but some allow bonus payout during the resignation notice.