$price = price_decimal_format($price, $dec);
if ($currency != null)
{
- $ex_rate = get_exchange_rate_to_home_currency($currency, $date_);
+ $ex_rate = get_exchange_rate_to_home_currency($currency, $date);
$price_in_home_currency = $price / $ex_rate;
//$price_in_home_currency = to_home_currency($price, $currency, $date);
}
$currency = get_supplier_currency($supplier);
$ex_rate = get_exchange_rate_to_home_currency($currency, $old_date);
$amount1 = $amount1 / $ex_rate;
- $ex_rate = get_exchange_rate_to_home_currency($currency, $date_);
+ $ex_rate = get_exchange_rate_to_home_currency($currency, $date);
$amount2 = $amount2 / $ex_rate;
$diff = $amount2 - $amount1;
return round2($diff, $dec);