From: <rc...@us...> - 2017-10-11 18:16:43
|
Revision: 7850 http://sourceforge.net/p/web-erp/reponame/7850 Author: rchacon Date: 2017-10-11 18:16:40 +0000 (Wed, 11 Oct 2017) Log Message: ----------- Set decimals variable for exchange rate in Currencies.php Modified Paths: -------------- trunk/Currencies.php trunk/doc/Change.log Modified: trunk/Currencies.php =================================================================== --- trunk/Currencies.php 2017-10-11 17:05:10 UTC (rev 7849) +++ trunk/Currencies.php 2017-10-11 18:16:40 UTC (rev 7850) @@ -28,10 +28,10 @@ $Errors = array(); -echo '<p class="page_title_text"><img alt="" src="'.$RootPath.'/css/'.$Theme. - '/images/currency.png" title="' .// Icon image. - _('Currencies') . '" /> ' .// Icon title. - _('Currencies Maintenance') . '</p>';// Page title. +echo '<p class="page_title_text"><img alt="" src="', $RootPath, '/css/', $Theme, + '/images/currency.png" title="', // Icon image. + _('Currencies'), '" /> ', // Icon title. + _('Currencies Maintenance'), '</p>';// Page title. if (isset($_POST['submit'])) { @@ -196,7 +196,7 @@ '" . FormatDateForSQL($PostingDate) . "', '" . $PeriodNo . "', '" . $_SESSION['CompanyRecord']['exchangediffact'] . "', - '" . $myrowBankAccount['bankaccountname'] . ' ' . _('currency rate adjustment to') . ' ' . locale_number_format($NewRate,8) . ' ' . $SelectedCurrency . '/' . $_SESSION['CompanyRecord']['currencydefault']. "', + '" . $myrowBankAccount['bankaccountname'] . ' ' . _('currency rate adjustment to') . ' ' . locale_number_format($NewRate, 'Variable') . ' ' . $SelectedCurrency . '/' . $_SESSION['CompanyRecord']['currencydefault']. "', '" . (-$DifferenceToAdjust) . "')"; $ErrMsg = _('Cannot insert a GL entry for the exchange difference because'); @@ -214,11 +214,11 @@ '" . FormatDateForSQL($PostingDate) . "', '" . $PeriodNo . "', '" . $myrowBankAccount['accountcode'] . "', - '" . $myrowBankAccount['bankaccountname'] . ' ' . _('currency rate adjustment to') . ' ' . locale_number_format($NewRate,8) . ' ' . $SelectedCurrency . '/' . $_SESSION['CompanyRecord']['currencydefault']. "', + '" . $myrowBankAccount['bankaccountname'] . ' ' . _('currency rate adjustment to') . ' ' . locale_number_format($NewRate, 'Variable') . ' ' . $SelectedCurrency . '/' . $_SESSION['CompanyRecord']['currencydefault']. "', '" . ($DifferenceToAdjust) . "')"; $result = DB_query($SQL,$ErrMsg,$DbgMsg,true); - prnMsg(_('Bank Account') . ' ' . $myrowBankAccount['bankaccountname'] . ' ' . _('Currency Rate difference of') . ' ' . locale_number_format($DifferenceToAdjust,$_SESSION['CompanyRecord']['decimalplaces']) . ' ' . _('has been posted'),'success'); + prnMsg(_('Bank Account') . ' ' . $myrowBankAccount['bankaccountname'] . ' ' . _('Currency Rate difference of') . ' ' . locale_number_format($DifferenceToAdjust, $_SESSION['CompanyRecord']['decimalplaces']) . ' ' . _('has been posted'),'success'); } } } @@ -364,11 +364,11 @@ $CurrencyName[$myrow['currabrev']], $myrow['country'], $myrow['hundredsname'], - locale_number_format($myrow['decimalplaces'],0), + locale_number_format($myrow['decimalplaces'], 0), $ShowInWebText, - locale_number_format($myrow['rate'],8), - locale_number_format(1/$myrow['rate'],2), - locale_number_format(GetCurrencyRate($myrow['currabrev'],$CurrencyRatesArray),8), + locale_number_format($myrow['rate'], 'Variable'), + locale_number_format(1/$myrow['rate'], 2), + locale_number_format(GetCurrencyRate($myrow['currabrev'],$CurrencyRatesArray), 8), htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '?', $myrow['currabrev'], _('Edit'), @@ -442,8 +442,8 @@ $_POST['Abbreviation'] = $myrow['currabrev']; $_POST['Country'] = $myrow['country']; $_POST['HundredsName'] = $myrow['hundredsname']; - $_POST['ExchangeRate'] = locale_number_format($myrow['rate'],8); - $_POST['DecimalPlaces'] = locale_number_format($myrow['decimalplaces'],0); + $_POST['ExchangeRate'] = locale_number_format($myrow['rate'], 'Variable'); + $_POST['DecimalPlaces'] = locale_number_format($myrow['decimalplaces'], 0); $_POST['webcart'] = $myrow['webcart']; echo '<input type="hidden" name="SelectedCurrency" value="' . $SelectedCurrency . '" />'; @@ -502,10 +502,10 @@ $_POST['ExchangeRate'] = 1; } if ($_POST['Abbreviation'] != $FunctionalCurrency) { - echo '<td><input type="text" class="number" name="ExchangeRate" size="10" required="required" minlength="1" maxlength="10" value="' . $_POST['ExchangeRate'] . '" /></td>'; + echo '<td><input class="number" maxlength="16" minlength="1" name="ExchangeRate" required="required" size="16" type="text" value="', $_POST['ExchangeRate'], '" /></td>'; } else { - echo '<td>' . $_POST['ExchangeRate'] . '</td>'; - echo '<input type="hidden" class="number" name="ExchangeRate" value="' . $_POST['ExchangeRate'] . '" />'; + echo '<td>', $_POST['ExchangeRate'], '</td>', + '<input class="number" name="ExchangeRate" type="hidden" value="', $_POST['ExchangeRate'], '" />'; } echo '</tr>'; if (!isset($_POST['webcart'])) { Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2017-10-11 17:05:10 UTC (rev 7849) +++ trunk/doc/Change.log 2017-10-11 18:16:40 UTC (rev 7850) @@ -1,6 +1,7 @@ webERP Change Log -17/10/11 RChacon: Improve currency showing and set decimals variable for exchange rate. +17/10/11 RChacon: Set decimals variable for exchange rate in Currencies.php. +17/10/11 RChacon: Improve currency showing and set decimals variable for exchange rate in Payments.php. 17/10/11 Exson: Fix the indian_number_format bug in MiscFunctions.php. 17/10/09 Exson: Fixed the non-balance bug in CustomerReceipt.php. And fixed the non rollback problem when there is a non-balance existed. Fixed error noises. 17/10/03 Exson: Add html view to SuppPriceList.php. |