|
From: <ex...@us...> - 2016-07-08 08:17:13
|
Revision: 7567
http://sourceforge.net/p/web-erp/reponame/7567
Author: exsonqu
Date: 2016-07-08 08:17:10 +0000 (Fri, 08 Jul 2016)
Log Message:
-----------
08/07/16 Exson: Fixed the bug that when bank account or currency changes the functional rate or exrate unchanged with suggested rate in Payments.php.
Modified Paths:
--------------
trunk/Payments.php
trunk/doc/Change.log
Modified: trunk/Payments.php
===================================================================
--- trunk/Payments.php 2016-07-07 11:12:58 UTC (rev 7566)
+++ trunk/Payments.php 2016-07-08 08:17:10 UTC (rev 7567)
@@ -899,10 +899,8 @@
$_POST['FunctionalExRate']=1;
}
if($_SESSION['PaymentDetail'.$identifier]->AccountCurrency != $_SESSION['PaymentDetail'.$identifier]->Currency AND isset($_SESSION['PaymentDetail'.$identifier]->AccountCurrency)) {
- if($_POST['ExRate']==1 AND isset($SuggestedExRate)) {
+ if (isset($SuggestedExRate) AND ($_POST['ExRate'] == 1 OR $_POST['Currency'] != $_POST['PreviousCurrency'] OR $_POST['PreviousBankAccount'] != $_SESSION['PaymentDetail' . $identifier]->Account)) {
$_POST['ExRate'] = locale_number_format($SuggestedExRate,8);
- } elseif($_POST['Currency'] != $_POST['PreviousCurrency'] AND isset($SuggestedExRate)) {
- $_POST['ExRate'] = locale_number_format($SuggestedExRate,8);
}
if(isset($SuggestedExRate)) {
@@ -917,9 +915,9 @@
}
if($_SESSION['PaymentDetail'.$identifier]->AccountCurrency != $_SESSION['CompanyRecord']['currencydefault'] AND isset($_SESSION['PaymentDetail'.$identifier]->AccountCurrency)) {
- if($_POST['FunctionalExRate']==1 AND isset($SuggestedFunctionalExRate)) {
+ if (isset($SuggestedFunctionalExRate) AND ($_POST['FunctionalExRate']==1 OR $_POST['Currency'] != $_POST['PreviousCurrency'] OR $_POST['PreviousBankAccount'] != $_SESSION['PaymentDetail' . $identifier]->Account)) {
$_POST['FunctionalExRate'] = locale_number_format($SuggestedFunctionalExRate,'Variable');
- }
+ }
if(isset($SuggestedFunctionalExRate)) {
$SuggestedFunctionalExRateText = '<b>' . _('Suggested rate:') . ' 1 ' . $_SESSION['CompanyRecord']['currencydefault'] . ' = ' . locale_number_format($SuggestedFunctionalExRate,8) . ' ' . $_SESSION['PaymentDetail'.$identifier]->AccountCurrency . '</b>';
@@ -979,6 +977,7 @@
echo '<tr>
<td colspan="2"><div class="centre">
<input name="PreviousCurrency" type="hidden" value="', $_POST['Currency'], '" />
+ <input type="hidden" name="PreviousBankAccount" value="' . $_SESSION['PaymentDetail' . $identifier]->Account . '" />
<input name="UpdateHeader" type="submit" value="', _('Update'), '" />
</div></td>
</tr>
Modified: trunk/doc/Change.log
===================================================================
--- trunk/doc/Change.log 2016-07-07 11:12:58 UTC (rev 7566)
+++ trunk/doc/Change.log 2016-07-08 08:17:10 UTC (rev 7567)
@@ -1,5 +1,6 @@
webERP Change Log
+08/07/16 Exson: Fixed the bug that when bank account or currency changes the functional rate or exrate unchanged with suggested rate in Payments.php.
07/07/16: Exson: Fixed the bug of wrong original amount of payments to another bank accounts in GLAccountInquiry.php and wrong transaction link in DailyBankTransactions.php and add payment transaction no in bank transaction ref to make it traceable.
29/06/16 Exson: add identifier to avoid SESSION overwritten in CustomerReceipt.php.
29/06/16 Exson: Fixed the wrong balance of amount in bank account currency in DailyBankTransactions.php.
|