|
From: <rc...@us...> - 2013-12-14 18:43:51
|
Revision: 6501
http://sourceforge.net/p/web-erp/reponame/6501
Author: rchacon
Date: 2013-12-14 18:43:48 +0000 (Sat, 14 Dec 2013)
Log Message:
-----------
Allow currency name translation.
Modified Paths:
--------------
trunk/ExchangeRateTrend.php
Modified: trunk/ExchangeRateTrend.php
===================================================================
--- trunk/ExchangeRateTrend.php 2013-12-14 14:03:15 UTC (rev 6500)
+++ trunk/ExchangeRateTrend.php 2013-12-14 18:43:48 UTC (rev 6501)
@@ -4,10 +4,8 @@
include('includes/session.inc');
$Title = _('View Currency Trends');
-
include('includes/header.inc');
-
$FunctionalCurrency = $_SESSION['CompanyRecord']['currencydefault'];
if ( isset($_GET['CurrencyToShow']) ){
@@ -27,22 +25,22 @@
_('View Currency Trend') . '" alt="" />' . ' ' . _('View Currency Trend') . '</p></div>';
echo '<table>'; // First column
- $SQL = "SELECT * FROM currencies";
+ $SQL = "SELECT currabrev FROM currencies";
$result=DB_query($SQL,$db);
+ include('includes/CurrenciesArray.php'); // To get the currency name from the currency code.
-
// CurrencyToShow Currency Picker
echo '<tr>
<td><select name="CurrencyToShow" onchange="ReloadForm(update.submit)">';
- DB_data_seek($result,0);
+ DB_data_seek($result, 0);
while ($myrow=DB_fetch_array($result)) {
if ($myrow['currabrev']!=$_SESSION['CompanyRecord']['currencydefault']){
+ echo '<option';
if ( $CurrencyToShow==$myrow['currabrev'] ) {
- echo '<option selected="selected" value="' . $myrow['currabrev'] . '">' . $myrow['country'] . ' ' . $myrow['currency'] . ' (' . $myrow['currabrev'] . ')'. '</option>';
- } else {
- echo '<option value="' . $myrow['currabrev'] . '">' . $myrow['country'] . ' ' . $myrow['currency'] . ' (' . $myrow['currabrev'] . ')'. '</option>';
+ echo ' selected="selected"';
}
+ echo ' value="' . $myrow['currabrev'] . '">' . $CurrencyName[$myrow['currabrev']] . ' (' . $myrow['currabrev'] . ')</option>';
}
}
echo '</select></td>
@@ -75,4 +73,4 @@
</table>';
include('includes/footer.inc');
-?>
\ No newline at end of file
+?>
|