Duplicate payment on invoice

Why does sales invoice can receive money multiple times.It create confusion.sometime i receive money 2 times.Is there a way to prevent this duplicate payment?

There is no way to prevent this. Accounting software is meant to record financial events. It’s not unheard of for customer to pay twice for the same invoice in error. So you would record money received against this invoice twice.

Any overpayment on invoice would be automatically transferred to general credit account for that customer and customer can be either paid back or leave it as a customer credit which can be applied to the next invoice.

ok thanks