Wrong amount remainder for last deferred move
When deferring an invoice line with all the existing period, the amount remainder is missing the defer amount since e0e0ce0953cd. Indeed we should defer the amount first but exclude this move from the period computation, this way the behavior will be the same if all the period exists or not.