|
From: <dai...@us...> - 2012-10-20 01:18:07
|
Revision: 5719
http://sourceforge.net/p/web-erp/reponame/5719
Author: daintree
Date: 2012-10-20 01:18:03 +0000 (Sat, 20 Oct 2012)
Log Message:
-----------
google exchange rates option - fix exchange rate trend graph using google based chart creation
Modified Paths:
--------------
trunk/ExchangeRateTrend.php
trunk/SystemParameters.php
trunk/doc/Change.log
trunk/includes/MiscFunctions.php
trunk/includes/session.inc
trunk/sql/mysql/upgrade4.09-4.10.sql
Modified: trunk/ExchangeRateTrend.php
===================================================================
--- trunk/ExchangeRateTrend.php 2012-10-18 12:53:18 UTC (rev 5718)
+++ trunk/ExchangeRateTrend.php 2012-10-20 01:18:03 UTC (rev 5719)
@@ -57,23 +57,14 @@
// SHOW OUR GRAPH
// **************
+ $image = 'https://encrypted.google.com/finance/chart?q=CURRENCY:' . $FunctionalCurrency . $CurrencyToShow .'&tkr=1&p=5Y&chst=cob';
+ //$graphA = $CurrencyToShow. '/' . $FunctionalCurrency . $graph;
+ //$image = 'http://www.x-rates.com/d/' . $graphA;
- $graphA = $CurrencyToShow. '/' . $FunctionalCurrency . $graph;
- $image = 'http://www.x-rates.com/d/' . $graphA;
-
echo '<br /><table class="selection">';
echo '<tr><th><div class="centre"><b>' . $FunctionalCurrency . ' / ' . $CurrencyToShow . '</b></div></th></tr>';
echo '<tr><td><img src="' . $image . '" alt="' ._('Trend Currently Unavailable') . '" /></td></tr>';
echo '</table>';
- $graphB = $FunctionalCurrency. '/' . $CurrencyToShow . $graph;
- $image = 'http://www.x-rates.com/d/' . $graphB;
-
- echo '<br /><table class="selection">';
- echo '<tr><th><div class="centre"><b>' . $CurrencyToShow . ' / ' . $FunctionalCurrency . '</b></div></th></tr>';
- echo '<tr><td><img src="' . $image . '" alt="' ._('Trend Currently Unavailable') . '" /></td></tr>';
- echo '</table>';
-
-
include('includes/footer.inc');
?>
\ No newline at end of file
Modified: trunk/SystemParameters.php
===================================================================
--- trunk/SystemParameters.php 2012-10-18 12:53:18 UTC (rev 5718)
+++ trunk/SystemParameters.php 2012-10-20 01:18:03 UTC (rev 5719)
@@ -285,6 +285,9 @@
$sql[] = "UPDATE config SET confvalue='0' WHERE confname='UpdateCurrencyRatesDaily'";
}
}
+ if ($_SESSION['ExchangeRateFeed'] != $_POST['X_ExchangeRateFeed']){
+ $sql[] = "UPDATE config SET confvalue='" . $_POST['X_ExchangeRateFeed'] . "' WHERE confname='ExchangeRateFeed'";
+ }
if ($_SESSION['FactoryManagerEmail'] != $_POST['X_FactoryManagerEmail']){
$sql[] = "UPDATE config SET confvalue='" . $_POST['X_FactoryManagerEmail'] . "' WHERE confname='FactoryManagerEmail'";
}
@@ -452,8 +455,15 @@
<option '.($_SESSION['UpdateCurrencyRatesDaily']!='1'?'selected="selected" ':'').'value="1">'._('Automatic').'</option>
<option '.($_SESSION['UpdateCurrencyRatesDaily']=='0'?'selected="selected" ':'').'value="0">'._('Manual').'</option>
</select></td>
- <td>' . _('Automatic updates to exchange rates will retrieve the latest daily rates from the European Central Bank once per day - when the first user logs in for the day. Manual will never update the rates automatically - exchange rates will need to be maintained manually') . '</td>
+ <td>' . _('Automatic updates to exchange rates will retrieve the latest daily rates from either the European Central Bank or Google once per day - when the first user logs in for the day. Manual will never update the rates automatically - exchange rates will need to be maintained manually') . '</td>
</tr>';
+echo ' |