Adding Fine to Overdue Fees in Education Domain

Hi everyone , I was working on the Education domain. In the fee module I need to add a fine to the overdue fee.
I tried to make change to the fee doctype by creating a field name fine
and then tried to change the grand total in the fee.py but i think that was not a good approach.
It will be really greatfull if anyone can help .