Type bugs.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Sat, 6 Feb 2010 21:53:05 +0000 (21:53 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Sat, 6 Feb 2010 21:53:05 +0000 (21:53 +0000)
purchasing/includes/db/grn_db.inc
purchasing/includes/db/invoice_db.inc

index b055c1f94eb8b14a955b9f8afa302d9eaf04303a..d80fc0e1c9581d7d04762fa1fd4b5cce00382903 100644 (file)
@@ -21,7 +21,7 @@ function update_average_material_cost($supplier, $stock_id, $price, $qty, $date,
        $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);
        }       
index 1b7d3aaa22aea133c0ae4ddd50dfe0f985e39ef5..5491eee113452784e090131a742a160b067cda70 100644 (file)
@@ -117,7 +117,7 @@ function get_diff_in_home_currency($supplier, $old_date, $date, $amount1, $amoun
        $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);