Overpayment with different currency

When we try to make an overpayment of an invoice, we can’t do it if is different company’s currency, it shows you this message "Payment lines amount on invoice “9” can not be greater than the invoice amount. "

For example, we have an invoice with Total: 1.500€ and the company’s currency is $, some days later you have a superior amount because of rates, now you have 1.501€ (you have an overpayment) when you try to do it the system don’t allow it showing that warning.

When the system tries to do the account move, the payment lines are in the company’s currency, and when tries to do the move, it can’t because of the amount of payment lines is higher when do the currency exchange.

What’s is the funtion of overpayment then?

Normally it should be managed since Issue 9070: Allow overpay invoice with write-off - Tryton issue tracker

We tried to do it in the demo and it doesn’t work either. When we use the overpayment wizard to pay an invoice with a different currency than the company currency, Tryton does not allow it, due to the difference in exchange rates there is a difference between the payment lines and the invoice amount. We have seen that the problem is in the check_payment_lines.

I do not think so. This check is correct.

I do not understand. The overpayment is there for this case as overpayment is computed as amount_invoice - invoice.amount_to_pay.

@ced thanks for doing this feature. I had a look at this and it looks like there were two subsequent commits that fixed the issue for @mariaeugenia

However, I notice that the solution is putting the overpayment amount back into Accounts Receivable.

I think it would be more useful to have an account for realized currency gain/loss. The overpayment line of every payment would then go to that gain/loss account.


If you choose to make an overpayment but you can still make it a write-off.