Fix switch of currencies when converting invoice line amount to company currency

issue4393
review6731002
(grafted from 288b4d6b861b9e6dafea942bb03e4f8300db8514)

--HG--
branch : 3.0
extra : source : 288b4d6b861b9e6dafea942bb03e4f8300db8514