automatic enter interest on to invoice

current working with 2021 sage 50 cloud Canadian addition.

trying to set up interest for my customer invoices, I can set up interest on my statement, but it doesn't enter the interest into the system, it s just printing the interest amount on the statement.

what I would like to see the this program is, that the interest is automatically entered into the system if the account hasn't been paid off fully.

my problem is, when I send out a statement to my customer with more then 1 invoice on it, and the customer decides to pay off 1 invoice and not the total amount owing, it recalculates the interest to the current amount owing.

so lets say I have a  customer with these invoices,

aug 1 2020 $2000.00

sept 5 2020 $1050.00

oct 3 2020 $2400.0

2% monthly interest over 60 days.

then I print my statement on Nov 4 2020

it says interest charged is 48.11

then my customer comes and makes a payment of $1000.00 towards the account, it automatically recalculates the interest.

why? it didn't make a full payment.

can you help?