Merge branch 'foreign_currency_calc' into v5.0