From: <dai...@us...> - 2014-01-14 06:59:16
|
Revision: 6537 http://sourceforge.net/p/web-erp/reponame/6537 Author: daintree Date: 2014-01-14 06:59:12 +0000 (Tue, 14 Jan 2014) Log Message: ----------- Tim: system would go to get currency rates even though they were set to manual - bug fixed Modified Paths: -------------- trunk/SuppInvGRNs.php trunk/doc/Change.log trunk/includes/MiscFunctions.php Modified: trunk/SuppInvGRNs.php =================================================================== --- trunk/SuppInvGRNs.php 2014-01-13 05:31:11 UTC (rev 6536) +++ trunk/SuppInvGRNs.php 2014-01-14 06:59:12 UTC (rev 6537) @@ -91,10 +91,10 @@ $_SESSION['SuppTrans']->GRNs[$_POST['GRNNo'.$i]]->OrderPrice, filter_number_format($_POST['ChgPrice' . $i]), $Complete, - $_POST['StdCostUnit'], - $_POST['ShiptRef'], - $_POST['JobRef'], - $_POST['GLCode'], + $_SESSION['SuppTrans']->GRNs[$_POST['GRNNo'.$i]]->StdCostUnit, + $_SESSION['SuppTrans']->GRNs[$_POST['GRNNo'.$i]]->ShiptRef, + $_SESSION['SuppTrans']->GRNs[$_POST['GRNNo'.$i]]->JobRef, + $_SESSION['SuppTrans']->GRNs[$_POST['GRNNo'.$i]]->GLCode, $Hold); } } Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2014-01-13 05:31:11 UTC (rev 6536) +++ trunk/doc/Change.log 2014-01-14 06:59:12 UTC (rev 6537) @@ -1,5 +1,8 @@ webERP Change Log +14/4/14 Tim: system would go to get currency rates even though they were set to manual - bug fixed. +14/1/14 Phil: Fixed bug that was not recording the standard cost against goods received - this would put all accounting out for both standard and weighted average journals. +13/1/14 Phil: Fixed SuppInvGRNs.php price variance was not calculated correctly because cost not brought accross correctly as reported by Don Grimes 11/1/14 CQZ: Fixed that no bank accounts recorded in gl in CounterReturns.php 6/1/14 Phil: Apply Tim's bug report regarding conversion of database name to lower case in ConnectDB.inc Although uppercase characters should not be included in database names, removing this trap allows backward compatibility with users who did install with upper case database name 4/1/14 Phil: Add option to create CSV from inventory valuation rather than create PDF Modified: trunk/includes/MiscFunctions.php =================================================================== --- trunk/includes/MiscFunctions.php 2014-01-13 05:31:11 UTC (rev 6536) +++ trunk/includes/MiscFunctions.php 2014-01-14 06:59:12 UTC (rev 6537) @@ -192,21 +192,21 @@ } function GetCurrencyRate($CurrCode,$CurrenciesArray) { - if ((!isset($CurrenciesArray[$CurrCode]) or !isset($CurrenciesArray[$_SESSION['CompanyRecord']['currencydefault']]))){ - return quote_oanda_currency($CurrCode); - } elseif ($CurrCode=='EUR'){ - if ($CurrenciesArray[$_SESSION['CompanyRecord']['currencydefault']]==0) { - return 0; - } else { - return 1/$CurrenciesArray[$_SESSION['CompanyRecord']['currencydefault']]; - } - } else { - if ($CurrenciesArray[$_SESSION['CompanyRecord']['currencydefault']]==0) { - return 0; - } else { - return $CurrenciesArray[$CurrCode]/$CurrenciesArray[$_SESSION['CompanyRecord']['currencydefault']]; - } - } + if ((!isset($CurrenciesArray[$CurrCode]) OR !isset($CurrenciesArray[$_SESSION['CompanyRecord']['currencydefault']])) AND $_SESSION['UpdateCurrencyRatesDaily'] != '0') { + return quote_oanda_currency($CurrCode); + } elseif ($CurrCode=='EUR'){ + if ($CurrenciesArray[$_SESSION['CompanyRecord']['currencydefault']]==0) { + return 0; + } else { + return 1/$CurrenciesArray[$_SESSION['CompanyRecord']['currencydefault']]; + } + } else { + if ($CurrenciesArray[$_SESSION['CompanyRecord']['currencydefault']]==0) { + return 0; + } else { + return $CurrenciesArray[$CurrCode]/$CurrenciesArray[$_SESSION['CompanyRecord']['currencydefault']]; + } + } } function quote_oanda_currency($CurrCode) { |