Currencies convert

Hello

In a custom module, when we save a record with diferent currencie witch function we should call to save the value also in the currencie of the aplication?

Best regards

$roundPrecision = 10;
$currency = new Currency();
$currency->retrieve($item->currency_id);
$item->price_usdollar = $currency->convertToDollar($item->price, (int)$roundPrecision);

2 Likes