How do they calculate the amount of grant you have to payback if you decide to postpone progression/leave the course at the end of the year?

I've been notified that I have to payback a certain amount, and it comes out of the grant that I received in the tertiary term; sustenance for the summer break.