During the settlement, you can use the cash discount. This way Rs 5 will be posted as cash discount and journal will be posted by 1995. Rs 5 will hit the cash discount account or alternative cash discount account.
Post the payment journal for Rs1995 with settlement to 2000. Now post another general journal for remaining Rs 5 and settle to the same invoice.
You can also try full settlement feature but i am not sure of that.
Apart from the above solutions , is there any default setup ( like Payment tolerance functionality- which is available in NAVISION ) in Ax 09 & 12 to settle automatically ?