<?php
-
+/**********************************************************************
+ Copyright (C) FrontAccounting, LLC.
+ Released under the terms of the GNU General Public License, GPL,
+ as published by the Free Software Foundation, either version 3
+ of the License, or (at your option) any later version.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
+***********************************************************************/
include_once($path_to_root . "/gl/includes/gl_db.inc");
//----------------------------------------------------------------------------------
function to_home_currency($amount, $currency_code, $date_)
{
$ex_rate = get_exchange_rate_to_home_currency($currency_code, $date_);
- return round($amount / $ex_rate, user_price_dec());
+ return round2($amount / $ex_rate, user_price_dec());
}
//----------------------------------------------------------------------------------
}
if (is_company_currency($curr))
return;
- $inv_amt = round($amount * $trans['rate'], user_price_dec());
- $pay_amt = round($amount * $pyt_trans['rate'], user_price_dec());
+ $inv_amt = round2($amount * $trans['rate'], user_price_dec());
+ $pay_amt = round2($amount * $pyt_trans['rate'], user_price_dec());
if ($inv_amt != $pay_amt)
{
$diff = $inv_amt - $pay_amt;