I agree with you, and I had the same conclusion yesterday.
I also investigate a bit more and found this:
- Why have we the write-off into payment tabs in the invoice form (when you'r currency rating has changed between invoice and payment date) ?
- The function _get_lines into account.invoice seems to provide the wrong move line to the _amount_residual function. So I think the problem come from here. The _amount_residual function is correct, but the _get_lines or the move_line_id_payment_get function have some trouble.
It's not that easy to understand what they are doing... I run out of time, but if I can, I will fix this.
@nullpointer
I agree with you, and I had the same conclusion yesterday.
I also investigate a bit more and found this:
- Why have we the write-off into payment tabs in the invoice form (when you'r currency rating has changed between invoice and payment date) ?
- The function _get_lines into account.invoice seems to provide the wrong move line to the _amount_residual function. So I think the problem come from here. The _amount_residual function is correct, but the _get_lines or the move_line_ id_payment_ get function have some trouble.
It's not that easy to understand what they are doing... I run out of time, but if I can, I will fix this.
Regards,
Joël