From: <rc...@us...> - 2013-12-11 20:33:50
|
Revision: 6494 http://sourceforge.net/p/web-erp/reponame/6494 Author: rchacon Date: 2013-12-11 20:33:46 +0000 (Wed, 11 Dec 2013) Log Message: ----------- Reduces currencies array from two dimensions (currency-name and currency-numeric-code) to one dimension (currency-name). Modified Paths: -------------- trunk/CompanyPreferences.php trunk/Currencies.php trunk/CustomerInquiry.php trunk/CustomerReceipt.php trunk/Customers.php trunk/Payments.php trunk/Prices.php trunk/SupplierInquiry.php trunk/includes/CurrenciesArray.php trunk/includes/PDFQuotationPageHeader.inc trunk/includes/PDFTransPageHeader.inc trunk/includes/PDFTransPageHeaderPortrait.inc trunk/includes/PO_PDFOrderPageHeader.inc Modified: trunk/CompanyPreferences.php =================================================================== --- trunk/CompanyPreferences.php 2013-12-11 08:45:52 UTC (rev 6493) +++ trunk/CompanyPreferences.php 2013-12-11 20:33:46 UTC (rev 6494) @@ -231,7 +231,7 @@ $result=DB_query("SELECT currabrev, currency FROM currencies",$db); -include($PathPrefix . 'includes/CurrenciesArray.php'); // To get the currency name. +include('includes/CurrenciesArray.php'); // To get the currency name from the currency code. echo '<tr> <td>' . _('Home Currency') . ':</td> @@ -239,9 +239,9 @@ while ($myrow = DB_fetch_array($result)) { if ($_POST['CurrencyDefault']==$myrow['currabrev']){ - echo '<option selected="selected" value="'. $myrow['currabrev'] . '">' . $CurrenciesArray[$myrow['currabrev']]['Currency'] . '</option>'; + echo '<option selected="selected" value="'. $myrow['currabrev'] . '">' . $CurrencyName[$myrow['currabrev']] . '</option>'; } else { - echo '<option value="' . $myrow['currabrev'] . '">' . $CurrenciesArray[$myrow['currabrev']]['Currency'] . '</option>'; + echo '<option value="' . $myrow['currabrev'] . '">' . $CurrencyName[$myrow['currabrev']] . '</option>'; } } //end while loop Modified: trunk/Currencies.php =================================================================== --- trunk/Currencies.php 2013-12-11 08:45:52 UTC (rev 6493) +++ trunk/Currencies.php 2013-12-11 20:33:46 UTC (rev 6494) @@ -7,7 +7,7 @@ $ViewTopic= 'Currencies'; $BookMark = 'Currencies'; include('includes/header.inc'); -include('includes/CurrenciesArray.php'); +include('includes/CurrenciesArray.php'); // To get the currency name from the currency code. include('includes/SQL_CommonFunctions.inc'); if (isset($_GET['SelectedCurrency'])){ @@ -124,7 +124,7 @@ decimalplaces, rate, webcart) - VALUES ('" . $CurrenciesArray[$_POST['Abbreviation']]['Currency'] . "', + VALUES ('" . $CurrencyName[$_POST['Abbreviation']] . "', '" . $_POST['Abbreviation'] . "', '" . $_POST['Country'] . "', '" . $_POST['HundredsName'] . "', @@ -291,7 +291,7 @@ echo '<table class="selection">'; echo '<tr> - <td></td> + <th> </th> <th>' . _('ISO4217 Code') . '</th> <th>' . _('Currency Name') . '</th> <th>' . _('Country') . '</th> @@ -301,6 +301,7 @@ <th>' . _('Exchange Rate') . '</th> <th>' . _('1 / Ex Rate') . '</th> <th>' . _('Ex Rate - ECB') . '</th> + <th colspan="3">' . _('Maintenance') . '</th> </tr>'; $k=0; //row colour counter @@ -340,7 +341,7 @@ <td>%s</td> <td>%s</td> <td class="number">%s</td> - <td>%s</td> + <td class="centre">%s</td> <td class="number">%s</td> <td class="number">%s</td> <td class="number">%s</td> @@ -350,7 +351,7 @@ </tr>', $ImageFile, $myrow['currabrev'], - $CurrenciesArray[$myrow['currabrev']]['Currency'], // To get the currency name from the Currencies Array. + $CurrencyName[$myrow['currabrev']], $myrow['country'], $myrow['hundredsname'], locale_number_format($myrow['decimalplaces'],0), @@ -373,17 +374,20 @@ <td>%s</td> <td>%s</td> <td class="number">%s</td> - <td>%s</td> - <td colspan="5">%s</td> + <td class="centre">%s</td> + <td class="number">%s</td> + <td class="number">%s</td> + <td class="centre" colspan="4">%s</td> </tr>', $ImageFile, $myrow['currabrev'], - $CurrenciesArray[$myrow['currabrev']]['Currency'], // To get the currency name from the Currencies Array. + $CurrencyName[$myrow['currabrev']], $myrow['country'], $myrow['hundredsname'], locale_number_format($myrow['decimalplaces'],0), $ShowInWebText, - 1, + locale_number_format(1,8), + locale_number_format(1,2), _('Functional Currency')); } @@ -444,8 +448,8 @@ <tr> <td>' ._('Currency') . ':</td> <td><select name="Abbreviation">'; - foreach ($CurrenciesArray as $CurrencyAbbreviation => $CurrencyArray) { - echo '<option value="' . $CurrencyAbbreviation . '">' . $CurrencyAbbreviation . '-' . $CurrencyArray['Currency'] . '</option>'; + foreach ($CurrencyName as $CurrencyCode => $CurrencyNameTxt) { + echo '<option value="' . $CurrencyCode . '">' . $CurrencyCode . ' - ' . $CurrencyNameTxt . '</option>'; } echo '</select></td> Modified: trunk/CustomerInquiry.php =================================================================== --- trunk/CustomerInquiry.php 2013-12-11 08:45:52 UTC (rev 6493) +++ trunk/CustomerInquiry.php 2013-12-11 20:33:46 UTC (rev 6494) @@ -126,13 +126,13 @@ $CustomerRecord['overdue1']=0; $CustomerRecord['overdue2']=0; } -include('includes/CurrenciesArray.php'); // To get the currency name. +include('includes/CurrenciesArray.php'); // To get the currency name from the currency code. echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/customer.png" title="' . _('Customer') . '" alt="" /> ' . _('Customer') . ': ' . $CustomerID . ' - ' . $CustomerRecord['name'] . '<br />' . _('All amounts stated in') . ': ' . $CustomerRecord['currency'] . '<br />' . // To be replaced by: -/* $CustomerRecord['currcode'] . ' - ' . $CurrenciesArray[$CustomerRecord['currcode']]['Currency'] . '<br />' . // <-- Replacement */ +/* $CustomerRecord['currcode'] . ' - ' . $CurrencyName[$CustomerRecord['currcode']] . '<br />' . // <-- Replacement */ _('Terms') . ': ' . $CustomerRecord['terms'] . '<br />' . _('Credit Limit') . ': ' . Modified: trunk/CustomerReceipt.php =================================================================== --- trunk/CustomerReceipt.php 2013-12-11 08:45:52 UTC (rev 6493) +++ trunk/CustomerReceipt.php 2013-12-11 20:33:46 UTC (rev 6494) @@ -817,12 +817,12 @@ prnMsg(_('No currencies are defined yet') . '. ' . _('Receipts cannot be entered until a currency is defined'),'warn'); } else { - include($PathPrefix . 'includes/CurrenciesArray.php'); // To get the currency name. + include('includes/CurrenciesArray.php'); // To get the currency name from the currency code. while ($myrow=DB_fetch_array($result)){ if ($_SESSION['ReceiptBatch']->Currency==$myrow['currabrev']){ - echo '<option selected="selected" value="' . $myrow['currabrev'] . '">' . $CurrenciesArray[$myrow['currabrev']]['Currency'] . '</option>'; + echo '<option selected="selected" value="' . $myrow['currabrev'] . '">' . $CurrencyName[$myrow['currabrev']] . '</option>'; } else { - echo '<option value="' . $myrow['currabrev'] . '">' . $CurrenciesArray[$myrow['currabrev']]['Currency'] . '</option>'; + echo '<option value="' . $myrow['currabrev'] . '">' . $CurrencyName[$myrow['currabrev']] . '</option>'; } } echo '</select></td> Modified: trunk/Customers.php =================================================================== --- trunk/Customers.php 2013-12-11 08:45:52 UTC (rev 6493) +++ trunk/Customers.php 2013-12-11 20:33:46 UTC (rev 6494) @@ -3,7 +3,7 @@ /* $Id$ */ include('includes/session.inc'); -include('includes/CurrenciesArray.php'); +include('includes/CurrenciesArray.php'); // To get the currency name from the currency code. if (isset($_POST['Edit']) or isset($_GET['Edit']) or isset($_GET['DebtorNo'])) { $ViewTopic = 'AccountsReceivable'; @@ -988,7 +988,7 @@ if (isset($_GET['Modify'])) { echo '<tr> <td>' . _('Customer Currency') . ':</td> - <td>' . $CurrenciesArray[$_POST['CurrCode']]['Currency'] . '</td></tr>'; // Translates from currencies.currency *** + <td>' . $CurrencyName[$_POST['CurrCode']] . '</td></tr>'; // Translates from currencies.currency *** } else { $result=DB_query("SELECT currency, currabrev FROM currencies",$db); echo '<tr> @@ -999,7 +999,7 @@ if ($_POST['CurrCode']==$myrow['currabrev']){ echo ' selected="selected"'; } - echo ' value="'. $myrow['currabrev'] . '">' . $CurrenciesArray[$myrow['currabrev']]['Currency'] . '</option>'; // Translates from currencies.currency *** + echo ' value="'. $myrow['currabrev'] . '">' . $CurrencyName[$myrow['currabrev']] . '</option>'; } //end while loop DB_data_seek($result,0); echo '</select></td> Modified: trunk/Payments.php =================================================================== --- trunk/Payments.php 2013-12-11 08:45:52 UTC (rev 6493) +++ trunk/Payments.php 2013-12-11 20:33:46 UTC (rev 6494) @@ -829,12 +829,12 @@ </tr>'; prnMsg( _('No currencies are defined yet. Payments cannot be entered until a currency is defined'),'error'); } else { - include($PathPrefix . 'includes/CurrenciesArray.php'); // To get the currency name. + include('includes/CurrenciesArray.php'); // To get the currency name from the currency code. while ($myrow=DB_fetch_array($result)){ if ($_SESSION['PaymentDetail' . $identifier]->Currency==$myrow['currabrev']){ - echo '<option selected="selected" value="' . $myrow['currabrev'] . '">' . $CurrenciesArray[$myrow['currabrev']]['Currency'] . '</option>'; + echo '<option selected="selected" value="' . $myrow['currabrev'] . '">' . $CurrencyName[$myrow['currabrev']] . '</option>'; } else { - echo '<option value="' . $myrow['currabrev'] . '">' . $CurrenciesArray[$myrow['currabrev']]['Currency'] . '</option>'; + echo '<option value="' . $myrow['currabrev'] . '">' . $CurrencyName[$myrow['currabrev']] . '</option>'; } } echo '</select></td> Modified: trunk/Prices.php =================================================================== --- trunk/Prices.php 2013-12-11 08:45:52 UTC (rev 6493) +++ trunk/Prices.php 2013-12-11 20:33:46 UTC (rev 6494) @@ -229,8 +229,7 @@ echo '</tr>'; $k=0; //row colour counter - - include('includes/CurrenciesArray.php'); // To get the currency name. + include('includes/CurrenciesArray.php'); // To get the currency name from the currency code. while ($myrow = DB_fetch_array($result)) { if ($k==1){ echo '<tr class="EvenTableRows">'; @@ -245,7 +244,7 @@ $EndDateDisplay = ConvertSQLDate($myrow['enddate']); } - echo '<td>' . $CurrenciesArray[$myrow['currabrev']]['Currency'] . '</td> + echo '<td>' . $CurrencyName[$myrow['currabrev']] . '</td> <td>' . $myrow['sales_type'] . '</td> <td class="number">' . locale_number_format($myrow['price'], $myrow['currdecimalplaces']+2) . '</td> <td>' . ConvertSQLDate($myrow['startdate']) . '</td> @@ -299,7 +298,7 @@ if ($myrow['currabrev']==$_POST['CurrAbrev']) { echo ' selected="selected"'; } - echo ' value="' . $myrow['currabrev'] . '">' . $CurrenciesArray[$myrow['currabrev']]['Currency'] . '</option>'; + echo ' value="' . $myrow['currabrev'] . '">' . $CurrencyName[$myrow['currabrev']] . '</option>'; } // End while loop DB_free_result($result); Modified: trunk/SupplierInquiry.php =================================================================== --- trunk/SupplierInquiry.php 2013-12-11 08:45:52 UTC (rev 6493) +++ trunk/SupplierInquiry.php 2013-12-11 20:33:46 UTC (rev 6494) @@ -112,12 +112,12 @@ $SupplierRecord['overdue1'] = 0; $SupplierRecord['overdue2'] = 0; } -include('includes/CurrenciesArray.php'); // To get the currency name. +include('includes/CurrenciesArray.php'); // To get the currency name from the currency code. echo '<p class="page_title_text"><img src="'.$RootPath.'/css/'.$Theme.'/images/supplier.png" title="' . _('Supplier') . '" alt="" /> ' . _('Supplier') . ': ' . $SupplierID . ' - ' . $SupplierRecord['suppname'] . '<br />' . _('All amounts stated in') . ': ' . - $SupplierRecord['currcode'] . ' - ' . $CurrenciesArray[$SupplierRecord['currcode']]['Currency'] . '<br />' . + $SupplierRecord['currcode'] . ' - ' . $CurrencyName[$SupplierRecord['currcode']] . '<br />' . _('Terms') . ': ' . $SupplierRecord['terms'] . '</p>'; Modified: trunk/includes/CurrenciesArray.php =================================================================== --- trunk/includes/CurrenciesArray.php 2013-12-11 08:45:52 UTC (rev 6493) +++ trunk/includes/CurrenciesArray.php 2013-12-11 20:33:46 UTC (rev 6494) @@ -2,190 +2,190 @@ /* $Id: CurrenciesArray.php 2 2013-05-23 18:10:36Z chacon $*/ /* Currency codes based on the three-letter alphabetic code from ISO 4217:2008 Codes for the representation of currencies and funds. - This program is under the GNU General Public License version 3.*/ + This program is under the GNU General Public License version 3. */ -$CurrenciesArray = array(); +$CurrencyName = array(); -/* BEGIN AlphabeticCode and CurrencyName data */ -$CurrenciesArray['AED']['Currency'] = _('United Arab Emirates dirham'); -$CurrenciesArray['AFN']['Currency'] = _('Afghan afghani'); -$CurrenciesArray['ALL']['Currency'] = _('Albanian lek'); -$CurrenciesArray['AMD']['Currency'] = _('Armenian dram'); -$CurrenciesArray['ANG']['Currency'] = _('Netherlands Antillean guilder'); -$CurrenciesArray['AOA']['Currency'] = _('Angolan kwanza'); -$CurrenciesArray['ARS']['Currency'] = _('Argentine peso'); -$CurrenciesArray['AUD']['Currency'] = _('Australian dollar'); -$CurrenciesArray['AWG']['Currency'] = _('Aruban florin'); -$CurrenciesArray['AZN']['Currency'] = _('Azerbaijani manat'); -$CurrenciesArray['BAM']['Currency'] = _('Bosnia and Herzegovina convertible mark'); -$CurrenciesArray['BBD']['Currency'] = _('Barbados dollar'); -$CurrenciesArray['BDT']['Currency'] = _('Bangladeshi taka'); -$CurrenciesArray['BGN']['Currency'] = _('Bulgarian lev'); -$CurrenciesArray['BHD']['Currency'] = _('Bahraini dinar'); -$CurrenciesArray['BIF']['Currency'] = _('Burundian franc'); -$CurrenciesArray['BMD']['Currency'] = _('Bermudian dollar'); -$CurrenciesArray['BND']['Currency'] = _('Brunei dollar'); -$CurrenciesArray['BOB']['Currency'] = _('Bolivian Boliviano'); -$CurrenciesArray['BOV']['Currency'] = _('Bolivian Mvdol (funds code)'); -$CurrenciesArray['BRL']['Currency'] = _('Brazilian real'); -$CurrenciesArray['BSD']['Currency'] = _('Bahamian dollar'); -$CurrenciesArray['BTN']['Currency'] = _('Bhutanese ngultrum'); -$CurrenciesArray['BWP']['Currency'] = _('Botswana pula'); -$CurrenciesArray['BYR']['Currency'] = _('Belarusian ruble'); -$CurrenciesArray['BZD']['Currency'] = _('Belize dollar'); -$CurrenciesArray['CAD']['Currency'] = _('Canadian dollar'); -$CurrenciesArray['CDF']['Currency'] = _('Congolese franc'); -$CurrenciesArray['CHE']['Currency'] = _('Swiss WIR Euro (complementary currency)'); -$CurrenciesArray['CHF']['Currency'] = _('Swiss franc'); -$CurrenciesArray['CHW']['Currency'] = _('Swiss WIR Franc (complementary currency)'); -$CurrenciesArray['CLF']['Currency'] = _('Chilean Unidad de Fomento (funds code)'); -$CurrenciesArray['CLP']['Currency'] = _('Chilean peso'); -$CurrenciesArray['CNY']['Currency'] = _('Chinese yuan'); -$CurrenciesArray['COP']['Currency'] = _('Colombian peso'); -$CurrenciesArray['COU']['Currency'] = _('Colombian Unidad de Valor Real'); -$CurrenciesArray['CRC']['Currency'] = _('Costa Rican colon'); -$CurrenciesArray['CUC']['Currency'] = _('Cuban peso convertible'); -$CurrenciesArray['CUP']['Currency'] = _('Cuban peso'); -$CurrenciesArray['CVE']['Currency'] = _('Cape Verde escudo'); -$CurrenciesArray['CZK']['Currency'] = _('Czech koruna'); -$CurrenciesArray['DJF']['Currency'] = _('Djiboutian franc'); -$CurrenciesArray['DKK']['Currency'] = _('Danish krone'); -$CurrenciesArray['DOP']['Currency'] = _('Dominican peso'); -$CurrenciesArray['DZD']['Currency'] = _('Algerian dinar'); -$CurrenciesArray['EGP']['Currency'] = _('Egyptian pound'); -$CurrenciesArray['ERN']['Currency'] = _('Eritrean nakfa'); -$CurrenciesArray['ETB']['Currency'] = _('Ethiopian birr'); -$CurrenciesArray['EUR']['Currency'] = _('European Union euro'); -$CurrenciesArray['FJD']['Currency'] = _('Fiji dollar'); -$CurrenciesArray['FKP']['Currency'] = _('Falkland Islands pound'); -$CurrenciesArray['GBP']['Currency'] = _('United Kingdom pound sterling'); -$CurrenciesArray['GEL']['Currency'] = _('Georgian lari'); -$CurrenciesArray['GHS']['Currency'] = _('Ghanaian cedi'); -$CurrenciesArray['GIP']['Currency'] = _('Gibraltar pound'); -$CurrenciesArray['GMD']['Currency'] = _('Gambian dalasi'); -$CurrenciesArray['GNF']['Currency'] = _('Guinean franc'); -$CurrenciesArray['GTQ']['Currency'] = _('Guatemalan quetzal'); -$CurrenciesArray['GYD']['Currency'] = _('Guyanese dollar'); -$CurrenciesArray['HKD']['Currency'] = _('Hong Kong dollar'); -$CurrenciesArray['HNL']['Currency'] = _('Honduran lempira'); -$CurrenciesArray['HRK']['Currency'] = _('Croatian kuna'); -$CurrenciesArray['HTG']['Currency'] = _('Haitian gourde'); -$CurrenciesArray['HUF']['Currency'] = _('Hungarian forint'); -$CurrenciesArray['IDR']['Currency'] = _('Indonesian rupiah'); -$CurrenciesArray['ILS']['Currency'] = _('Israeli new shekel'); -$CurrenciesArray['INR']['Currency'] = _('Indian rupee'); -$CurrenciesArray['IQD']['Currency'] = _('Iraqi dinar'); -$CurrenciesArray['IRR']['Currency'] = _('Iranian rial'); -$CurrenciesArray['ISK']['Currency'] = _('Icelandic króna'); -$CurrenciesArray['JMD']['Currency'] = _('Jamaican dollar'); -$CurrenciesArray['JOD']['Currency'] = _('Jordanian dinar'); -$CurrenciesArray['JPY']['Currency'] = _('Japanese yen'); -$CurrenciesArray['KES']['Currency'] = _('Kenyan shilling'); -$CurrenciesArray['KGS']['Currency'] = _('Kyrgyzstani som'); -$CurrenciesArray['KHR']['Currency'] = _('Cambodian riel'); -$CurrenciesArray['KMF']['Currency'] = _('Comoro franc'); -$CurrenciesArray['KPW']['Currency'] = _('North Korean won'); -$CurrenciesArray['KRW']['Currency'] = _('South Korean won'); -$CurrenciesArray['KWD']['Currency'] = _('Kuwaiti dinar'); -$CurrenciesArray['KYD']['Currency'] = _('Cayman Islands dollar'); -$CurrenciesArray['KZT']['Currency'] = _('Kazakhstani tenge'); -$CurrenciesArray['LAK']['Currency'] = _('Lao kip'); -$CurrenciesArray['LBP']['Currency'] = _('Lebanese pound'); -$CurrenciesArray['LKR']['Currency'] = _('Sri Lankan rupee'); -$CurrenciesArray['LRD']['Currency'] = _('Liberian dollar'); -$CurrenciesArray['LSL']['Currency'] = _('Lesotho loti'); -$CurrenciesArray['LTL']['Currency'] = _('Lithuanian litas'); -$CurrenciesArray['LVL']['Currency'] = _('Latvian lats'); -$CurrenciesArray['LYD']['Currency'] = _('Libyan dinar'); -$CurrenciesArray['MAD']['Currency'] = _('Moroccan dirham'); -$CurrenciesArray['MDL']['Currency'] = _('Moldovan leu'); -$CurrenciesArray['MGA']['Currency'] = _('Malagasy ariary'); -$CurrenciesArray['MKD']['Currency'] = _('Macedonian denar'); -$CurrenciesArray['MMK']['Currency'] = _('Myanmar kyat'); -$CurrenciesArray['MNT']['Currency'] = _('Mongolian tugrik'); -$CurrenciesArray['MOP']['Currency'] = _('Macanese pataca'); -$CurrenciesArray['MRO']['Currency'] = _('Mauritanian ouguiya'); -$CurrenciesArray['MUR']['Currency'] = _('Mauritian rupee'); -$CurrenciesArray['MVR']['Currency'] = _('Maldivian rufiyaa'); -$CurrenciesArray['MWK']['Currency'] = _('Malawian kwacha'); -$CurrenciesArray['MXN']['Currency'] = _('Mexican peso'); -$CurrenciesArray['MXV']['Currency'] = _('Mexican Unidad de Inversion (funds code)'); -$CurrenciesArray['MYR']['Currency'] = _('Malaysian ringgit'); -$CurrenciesArray['MZN']['Currency'] = _('Mozambican metical'); -$CurrenciesArray['NAD']['Currency'] = _('Namibian dollar'); -$CurrenciesArray['NGN']['Currency'] = _('Nigerian naira'); -$CurrenciesArray['NIO']['Currency'] = _('Nicaraguan córdoba'); -$CurrenciesArray['NOK']['Currency'] = _('Norwegian krone'); -$CurrenciesArray['NPR']['Currency'] = _('Nepalese rupee'); -$CurrenciesArray['NZD']['Currency'] = _('New Zealand dollar'); -$CurrenciesArray['OMR']['Currency'] = _('Omani rial'); -$CurrenciesArray['PAB']['Currency'] = _('Panamanian balboa'); -$CurrenciesArray['PEN']['Currency'] = _('Peruvian nuevo sol'); -$CurrenciesArray['PGK']['Currency'] = _('Papua New Guinean kina'); -$CurrenciesArray['PHP']['Currency'] = _('Philippine peso'); -$CurrenciesArray['PKR']['Currency'] = _('Pakistani rupee'); -$CurrenciesArray['PLN']['Currency'] = _('Polish złoty'); -$CurrenciesArray['PYG']['Currency'] = _('Paraguayan guaraní'); -$CurrenciesArray['QAR']['Currency'] = _('Qatari riyal'); -$CurrenciesArray['RON']['Currency'] = _('Romanian new leu'); -$CurrenciesArray['RSD']['Currency'] = _('Serbian dinar'); -$CurrenciesArray['RUB']['Currency'] = _('Russian rouble'); -$CurrenciesArray['RWF']['Currency'] = _('Rwandan franc'); -$CurrenciesArray['SAR']['Currency'] = _('Saudi riyal'); -$CurrenciesArray['SBD']['Currency'] = _('Solomon Islands dollar'); -$CurrenciesArray['SCR']['Currency'] = _('Seychelles rupee'); -$CurrenciesArray['SDG']['Currency'] = _('Sudanese pound'); -$CurrenciesArray['SEK']['Currency'] = _('Swedish krona'); -$CurrenciesArray['SGD']['Currency'] = _('Singapore dollar'); -$CurrenciesArray['SHP']['Currency'] = _('Saint Helena pound'); -$CurrenciesArray['SLL']['Currency'] = _('Sierra Leonean leone'); -$CurrenciesArray['SOS']['Currency'] = _('Somali shilling'); -$CurrenciesArray['SRD']['Currency'] = _('Surinamese dollar'); -$CurrenciesArray['SSP']['Currency'] = _('South Sudanese pound'); -$CurrenciesArray['STD']['Currency'] = _('São Tomé and Príncipe dobra'); -$CurrenciesArray['SYP']['Currency'] = _('Syrian pound'); -$CurrenciesArray['SZL']['Currency'] = _('Swazi lilangeni'); -$CurrenciesArray['THB']['Currency'] = _('Thai baht'); -$CurrenciesArray['TJS']['Currency'] = _('Tajikistani somoni'); -$CurrenciesArray['TMT']['Currency'] = _('Turkmenistani manat'); -$CurrenciesArray['TND']['Currency'] = _('Tunisian dinar'); -$CurrenciesArray['TOP']['Currency'] = _('Tongan paʻanga'); -$CurrenciesArray['TRY']['Currency'] = _('Turkish lira'); -$CurrenciesArray['TTD']['Currency'] = _('Trinidad and Tobago dollar'); -$CurrenciesArray['TWD']['Currency'] = _('Taiwan new dollar'); -$CurrenciesArray['TZS']['Currency'] = _('Tanzanian shilling'); -$CurrenciesArray['UAH']['Currency'] = _('Ukrainian hryvnia'); -$CurrenciesArray['UGX']['Currency'] = _('Ugandan shilling'); -$CurrenciesArray['USD']['Currency'] = _('United States dollar'); -$CurrenciesArray['USN']['Currency'] = _('United States dollar next day (funds code)'); -$CurrenciesArray['USS']['Currency'] = _('United States dollar same day (funds code)'); -$CurrenciesArray['UYI']['Currency'] = _('Uruguayan unidad indexada (funds code)'); -$CurrenciesArray['UYU']['Currency'] = _('Uruguayan peso'); -$CurrenciesArray['UZS']['Currency'] = _('Uzbekistan som'); -$CurrenciesArray['VEF']['Currency'] = _('Venezuelan bolívar fuerte'); -$CurrenciesArray['VND']['Currency'] = _('Vietnamese dong'); -$CurrenciesArray['VUV']['Currency'] = _('Vanuatu vatu'); -$CurrenciesArray['WST']['Currency'] = _('Samoan tala'); -$CurrenciesArray['XAF']['Currency'] = _('CFA franc BEAC'); -$CurrenciesArray['XAG']['Currency'] = _('Silver (one troy ounce)'); -$CurrenciesArray['XAU']['Currency'] = _('Gold (one troy ounce)'); -$CurrenciesArray['XBA']['Currency'] = _('European Composite Unit'); -$CurrenciesArray['XBB']['Currency'] = _('European Monetary Unit'); -$CurrenciesArray['XBC']['Currency'] = _('European Unit of Account 9'); -$CurrenciesArray['XBD']['Currency'] = _('European Unit of Account 17'); -$CurrenciesArray['XCD']['Currency'] = _('East Caribbean dollar'); -$CurrenciesArray['XDR']['Currency'] = _('Special drawing rights'); -$CurrenciesArray['XFU']['Currency'] = _('UIC franc (special settlement currency)'); -$CurrenciesArray['XOF']['Currency'] = _('CFA franc BCEAO'); -$CurrenciesArray['XPD']['Currency'] = _('Palladium (one troy ounce)'); -$CurrenciesArray['XPF']['Currency'] = _('CFP franc'); -$CurrenciesArray['XPT']['Currency'] = _('Platinum (one troy ounce)'); -$CurrenciesArray['XTS']['Currency'] = _('Code reserved for testing purposes'); -$CurrenciesArray['XXX']['Currency'] = _('No currency'); -$CurrenciesArray['YER']['Currency'] = _('Yemeni rial'); -$CurrenciesArray['ZAR']['Currency'] = _('South African rand'); -$CurrenciesArray['ZMW']['Currency'] = _('Zambian kwacha'); -/* END AlphabeticCode and CurrencyName data */ +// BEGIN: AlphabeticCode and CurrencyName data. +$CurrencyName['AED'] = _('United Arab Emirates dirham'); +$CurrencyName['AFN'] = _('Afghan afghani'); +$CurrencyName['ALL'] = _('Albanian lek'); +$CurrencyName['AMD'] = _('Armenian dram'); +$CurrencyName['ANG'] = _('Netherlands Antillean guilder'); +$CurrencyName['AOA'] = _('Angolan kwanza'); +$CurrencyName['ARS'] = _('Argentine peso'); +$CurrencyName['AUD'] = _('Australian dollar'); +$CurrencyName['AWG'] = _('Aruban florin'); +$CurrencyName['AZN'] = _('Azerbaijani manat'); +$CurrencyName['BAM'] = _('Bosnia and Herzegovina convertible mark'); +$CurrencyName['BBD'] = _('Barbados dollar'); +$CurrencyName['BDT'] = _('Bangladeshi taka'); +$CurrencyName['BGN'] = _('Bulgarian lev'); +$CurrencyName['BHD'] = _('Bahraini dinar'); +$CurrencyName['BIF'] = _('Burundian franc'); +$CurrencyName['BMD'] = _('Bermudian dollar'); +$CurrencyName['BND'] = _('Brunei dollar'); +$CurrencyName['BOB'] = _('Bolivian Boliviano'); +$CurrencyName['BOV'] = _('Bolivian Mvdol (funds code)'); +$CurrencyName['BRL'] = _('Brazilian real'); +$CurrencyName['BSD'] = _('Bahamian dollar'); +$CurrencyName['BTN'] = _('Bhutanese ngultrum'); +$CurrencyName['BWP'] = _('Botswana pula'); +$CurrencyName['BYR'] = _('Belarusian ruble'); +$CurrencyName['BZD'] = _('Belize dollar'); +$CurrencyName['CAD'] = _('Canadian dollar'); +$CurrencyName['CDF'] = _('Congolese franc'); +$CurrencyName['CHE'] = _('Swiss WIR Euro (complementary currency)'); +$CurrencyName['CHF'] = _('Swiss franc'); +$CurrencyName['CHW'] = _('Swiss WIR Franc (complementary currency)'); +$CurrencyName['CLF'] = _('Chilean Unidad de Fomento (funds code)'); +$CurrencyName['CLP'] = _('Chilean peso'); +$CurrencyName['CNY'] = _('Chinese yuan'); +$CurrencyName['COP'] = _('Colombian peso'); +$CurrencyName['COU'] = _('Colombian Unidad de Valor Real'); +$CurrencyName['CRC'] = _('Costa Rican colon'); +$CurrencyName['CUC'] = _('Cuban peso convertible'); +$CurrencyName['CUP'] = _('Cuban peso'); +$CurrencyName['CVE'] = _('Cape Verde escudo'); +$CurrencyName['CZK'] = _('Czech koruna'); +$CurrencyName['DJF'] = _('Djiboutian franc'); +$CurrencyName['DKK'] = _('Danish krone'); +$CurrencyName['DOP'] = _('Dominican peso'); +$CurrencyName['DZD'] = _('Algerian dinar'); +$CurrencyName['EGP'] = _('Egyptian pound'); +$CurrencyName['ERN'] = _('Eritrean nakfa'); +$CurrencyName['ETB'] = _('Ethiopian birr'); +$CurrencyName['EUR'] = _('European Union euro'); +$CurrencyName['FJD'] = _('Fiji dollar'); +$CurrencyName['FKP'] = _('Falkland Islands pound'); +$CurrencyName['GBP'] = _('United Kingdom pound sterling'); +$CurrencyName['GEL'] = _('Georgian lari'); +$CurrencyName['GHS'] = _('Ghanaian cedi'); +$CurrencyName['GIP'] = _('Gibraltar pound'); +$CurrencyName['GMD'] = _('Gambian dalasi'); +$CurrencyName['GNF'] = _('Guinean franc'); +$CurrencyName['GTQ'] = _('Guatemalan quetzal'); +$CurrencyName['GYD'] = _('Guyanese dollar'); +$CurrencyName['HKD'] = _('Hong Kong dollar'); +$CurrencyName['HNL'] = _('Honduran lempira'); +$CurrencyName['HRK'] = _('Croatian kuna'); +$CurrencyName['HTG'] = _('Haitian gourde'); +$CurrencyName['HUF'] = _('Hungarian forint'); +$CurrencyName['IDR'] = _('Indonesian rupiah'); +$CurrencyName['ILS'] = _('Israeli new shekel'); +$CurrencyName['INR'] = _('Indian rupee'); +$CurrencyName['IQD'] = _('Iraqi dinar'); +$CurrencyName['IRR'] = _('Iranian rial'); +$CurrencyName['ISK'] = _('Icelandic króna'); +$CurrencyName['JMD'] = _('Jamaican dollar'); +$CurrencyName['JOD'] = _('Jordanian dinar'); +$CurrencyName['JPY'] = _('Japanese yen'); +$CurrencyName['KES'] = _('Kenyan shilling'); +$CurrencyName['KGS'] = _('Kyrgyzstani som'); +$CurrencyName['KHR'] = _('Cambodian riel'); +$CurrencyName['KMF'] = _('Comoro franc'); +$CurrencyName['KPW'] = _('North Korean won'); +$CurrencyName['KRW'] = _('South Korean won'); +$CurrencyName['KWD'] = _('Kuwaiti dinar'); +$CurrencyName['KYD'] = _('Cayman Islands dollar'); +$CurrencyName['KZT'] = _('Kazakhstani tenge'); +$CurrencyName['LAK'] = _('Lao kip'); +$CurrencyName['LBP'] = _('Lebanese pound'); +$CurrencyName['LKR'] = _('Sri Lankan rupee'); +$CurrencyName['LRD'] = _('Liberian dollar'); +$CurrencyName['LSL'] = _('Lesotho loti'); +$CurrencyName['LTL'] = _('Lithuanian litas'); +$CurrencyName['LVL'] = _('Latvian lats'); +$CurrencyName['LYD'] = _('Libyan dinar'); +$CurrencyName['MAD'] = _('Moroccan dirham'); +$CurrencyName['MDL'] = _('Moldovan leu'); +$CurrencyName['MGA'] = _('Malagasy ariary'); +$CurrencyName['MKD'] = _('Macedonian denar'); +$CurrencyName['MMK'] = _('Myanmar kyat'); +$CurrencyName['MNT'] = _('Mongolian tugrik'); +$CurrencyName['MOP'] = _('Macanese pataca'); +$CurrencyName['MRO'] = _('Mauritanian ouguiya'); +$CurrencyName['MUR'] = _('Mauritian rupee'); +$CurrencyName['MVR'] = _('Maldivian rufiyaa'); +$CurrencyName['MWK'] = _('Malawian kwacha'); +$CurrencyName['MXN'] = _('Mexican peso'); +$CurrencyName['MXV'] = _('Mexican Unidad de Inversion (funds code)'); +$CurrencyName['MYR'] = _('Malaysian ringgit'); +$CurrencyName['MZN'] = _('Mozambican metical'); +$CurrencyName['NAD'] = _('Namibian dollar'); +$CurrencyName['NGN'] = _('Nigerian naira'); +$CurrencyName['NIO'] = _('Nicaraguan córdoba'); +$CurrencyName['NOK'] = _('Norwegian krone'); +$CurrencyName['NPR'] = _('Nepalese rupee'); +$CurrencyName['NZD'] = _('New Zealand dollar'); +$CurrencyName['OMR'] = _('Omani rial'); +$CurrencyName['PAB'] = _('Panamanian balboa'); +$CurrencyName['PEN'] = _('Peruvian nuevo sol'); +$CurrencyName['PGK'] = _('Papua New Guinean kina'); +$CurrencyName['PHP'] = _('Philippine peso'); +$CurrencyName['PKR'] = _('Pakistani rupee'); +$CurrencyName['PLN'] = _('Polish złoty'); +$CurrencyName['PYG'] = _('Paraguayan guaraní'); +$CurrencyName['QAR'] = _('Qatari riyal'); +$CurrencyName['RON'] = _('Romanian new leu'); +$CurrencyName['RSD'] = _('Serbian dinar'); +$CurrencyName['RUB'] = _('Russian rouble'); +$CurrencyName['RWF'] = _('Rwandan franc'); +$CurrencyName['SAR'] = _('Saudi riyal'); +$CurrencyName['SBD'] = _('Solomon Islands dollar'); +$CurrencyName['SCR'] = _('Seychelles rupee'); +$CurrencyName['SDG'] = _('Sudanese pound'); +$CurrencyName['SEK'] = _('Swedish krona'); +$CurrencyName['SGD'] = _('Singapore dollar'); +$CurrencyName['SHP'] = _('Saint Helena pound'); +$CurrencyName['SLL'] = _('Sierra Leonean leone'); +$CurrencyName['SOS'] = _('Somali shilling'); +$CurrencyName['SRD'] = _('Surinamese dollar'); +$CurrencyName['SSP'] = _('South Sudanese pound'); +$CurrencyName['STD'] = _('São Tomé and Príncipe dobra'); +$CurrencyName['SYP'] = _('Syrian pound'); +$CurrencyName['SZL'] = _('Swazi lilangeni'); +$CurrencyName['THB'] = _('Thai baht'); +$CurrencyName['TJS'] = _('Tajikistani somoni'); +$CurrencyName['TMT'] = _('Turkmenistani manat'); +$CurrencyName['TND'] = _('Tunisian dinar'); +$CurrencyName['TOP'] = _('Tongan paʻanga'); +$CurrencyName['TRY'] = _('Turkish lira'); +$CurrencyName['TTD'] = _('Trinidad and Tobago dollar'); +$CurrencyName['TWD'] = _('Taiwan new dollar'); +$CurrencyName['TZS'] = _('Tanzanian shilling'); +$CurrencyName['UAH'] = _('Ukrainian hryvnia'); +$CurrencyName['UGX'] = _('Ugandan shilling'); +$CurrencyName['USD'] = _('United States dollar'); +$CurrencyName['USN'] = _('United States dollar next day (funds code)'); +$CurrencyName['USS'] = _('United States dollar same day (funds code)'); +$CurrencyName['UYI'] = _('Uruguayan unidad indexada (funds code)'); +$CurrencyName['UYU'] = _('Uruguayan peso'); +$CurrencyName['UZS'] = _('Uzbekistan som'); +$CurrencyName['VEF'] = _('Venezuelan bolívar fuerte'); +$CurrencyName['VND'] = _('Vietnamese dong'); +$CurrencyName['VUV'] = _('Vanuatu vatu'); +$CurrencyName['WST'] = _('Samoan tala'); +$CurrencyName['XAF'] = _('CFA franc BEAC'); +$CurrencyName['XAG'] = _('Silver (one troy ounce)'); +$CurrencyName['XAU'] = _('Gold (one troy ounce)'); +$CurrencyName['XBA'] = _('European Composite Unit'); +$CurrencyName['XBB'] = _('European Monetary Unit'); +$CurrencyName['XBC'] = _('European Unit of Account 9'); +$CurrencyName['XBD'] = _('European Unit of Account 17'); +$CurrencyName['XCD'] = _('East Caribbean dollar'); +$CurrencyName['XDR'] = _('Special drawing rights'); +$CurrencyName['XFU'] = _('UIC franc (special settlement currency)'); +$CurrencyName['XOF'] = _('CFA franc BCEAO'); +$CurrencyName['XPD'] = _('Palladium (one troy ounce)'); +$CurrencyName['XPF'] = _('CFP franc'); +$CurrencyName['XPT'] = _('Platinum (one troy ounce)'); +$CurrencyName['XTS'] = _('Code reserved for testing purposes'); +$CurrencyName['XXX'] = _('No currency'); +$CurrencyName['YER'] = _('Yemeni rial'); +$CurrencyName['ZAR'] = _('South African rand'); +$CurrencyName['ZMW'] = _('Zambian kwacha'); +// END: AlphabeticCode and CurrencyName data. -asort($CurrenciesArray); +asort($CurrencyName); ?> Modified: trunk/includes/PDFQuotationPageHeader.inc =================================================================== --- trunk/includes/PDFQuotationPageHeader.inc 2013-12-11 08:45:52 UTC (rev 6493) +++ trunk/includes/PDFQuotationPageHeader.inc 2013-12-11 20:33:46 UTC (rev 6494) @@ -89,8 +89,8 @@ $pdf->addTextWrap($Page_Width-$Right_Margin-200, $Page_Height-$Top_Margin-$FontSize*3, 200, $FontSize, _('Date'). ': '.ConvertSQLDate($myrow['orddate']), 'right'); $pdf->addTextWrap($Page_Width-$Right_Margin-200, $Page_Height-$Top_Margin-$FontSize*4, 200, $FontSize, _('Page').': '.$PageNumber, 'right'); -include($PathPrefix . 'includes/CurrenciesArray.php'); /* To get the currency name */ -$pdf->addText($Page_Width/2-60, $YPos-5, $FontSize, _('All amounts stated in') . ' - ' . $myrow['currcode'] . ' ' . $CurrenciesArray[$myrow['currcode']]['Currency']); +include($PathPrefix . 'includes/CurrenciesArray.php'); // To get the currency name from the currency code. +$pdf->addText($Page_Width/2-60, $YPos-5, $FontSize, _('All amounts stated in') . ' - ' . $myrow['currcode'] . ' ' . $CurrencyName[$myrow['currcode']]); $YPos -= 37; $XPos = 40; Modified: trunk/includes/PDFTransPageHeader.inc =================================================================== --- trunk/includes/PDFTransPageHeader.inc 2013-12-11 08:45:52 UTC (rev 6493) +++ trunk/includes/PDFTransPageHeader.inc 2013-12-11 20:33:46 UTC (rev 6494) @@ -155,8 +155,8 @@ $XPos = $Left_Margin; $YPos -= ($line_height*2); -include($PathPrefix . 'includes/CurrenciesArray.php'); // To get the currency name -$pdf->addText($Left_Margin, $YPos-8, $FontSize, _('All amounts stated in') . ': ' . $myrow['currcode'] . ' ' . $CurrenciesArray[$myrow['currcode']]['Currency']); +include($PathPrefix . 'includes/CurrenciesArray.php'); // To get the currency name from the currency code. +$pdf->addText($Left_Margin, $YPos-8, $FontSize, _('All amounts stated in') . ': ' . $myrow['currcode'] . ' ' . $CurrencyName[$myrow['currcode']]); /*draw a box with nice round corner for entering line items */ /*90 degree arc at top right of box 0 degrees starts a bottom */ @@ -219,4 +219,4 @@ $YPos -= ($line_height); -?> \ No newline at end of file +?> Modified: trunk/includes/PDFTransPageHeaderPortrait.inc =================================================================== --- trunk/includes/PDFTransPageHeaderPortrait.inc 2013-12-11 08:45:52 UTC (rev 6493) +++ trunk/includes/PDFTransPageHeaderPortrait.inc 2013-12-11 20:33:46 UTC (rev 6494) @@ -208,8 +208,8 @@ $XPos = $Left_Margin; $FontSize = 8; -include($PathPrefix . 'includes/CurrenciesArray.php'); // To get the currency name -$pdf->addText($Left_Margin, $YPos-8, $FontSize, _('All amounts stated in') . ': ' . $myrow['currcode'] . ' ' . $CurrenciesArray[$myrow['currcode']]['Currency']); +include($PathPrefix . 'includes/CurrenciesArray.php'); // To get the currency name from the currency code. +$pdf->addText($Left_Margin, $YPos-8, $FontSize, _('All amounts stated in') . ': ' . $myrow['currcode'] . ' ' . $CurrencyName[$myrow['currcode']]); $BoxHeight = $Page_Height-282; Modified: trunk/includes/PO_PDFOrderPageHeader.inc =================================================================== --- trunk/includes/PO_PDFOrderPageHeader.inc 2013-12-11 08:45:52 UTC (rev 6493) +++ trunk/includes/PO_PDFOrderPageHeader.inc 2013-12-11 20:33:46 UTC (rev 6494) @@ -67,8 +67,8 @@ $LeftOvers = $pdf->addTextWrap($FormDesign->Comments->x, $Page_Height - $FormDesign->Comments->y-$line_height,$FormDesign->Comments->Length,$FormDesign->Comments->FontSize,$LeftOvers, 'left'); } /*Now the currency the order is in */ -include($PathPrefix . 'includes/CurrenciesArray.php'); /* To get the currency name */ -$pdf->addText($FormDesign->Currency->x,$Page_Height - $FormDesign->Currency->y,$FormDesign->Currency->FontSize, _('All amounts stated in').' - ' . $POHeader['currcode'] . ' ' . $CurrenciesArray[$POHeader['currcode']]['Currency']); +include($PathPrefix . 'includes/CurrenciesArray.php'); // To get the currency name from the currency code. +$pdf->addText($FormDesign->Currency->x,$Page_Height - $FormDesign->Currency->y,$FormDesign->Currency->FontSize, _('All amounts stated in').' - ' . $POHeader['currcode'] . ' ' . $CurrencyName[$POHeader['currcode']]); /*draw a square grid for entering line headings */ $pdf->Rectangle($FormDesign->HeaderRectangle->x, $Page_Height - $FormDesign->HeaderRectangle->y, $FormDesign->HeaderRectangle->width,$FormDesign->HeaderRectangle->height); /*Set up headings */ |