|
From: <rc...@us...> - 2015-07-27 16:52:56
|
Revision: 7328
http://sourceforge.net/p/web-erp/reponame/7328
Author: rchacon
Date: 2015-07-27 16:52:54 +0000 (Mon, 27 Jul 2015)
Log Message:
-----------
In Payments.php, move currency tags near currency rates.
Modified Paths:
--------------
trunk/Payments.php
trunk/doc/Change.log
Modified: trunk/Payments.php
===================================================================
--- trunk/Payments.php 2015-07-26 00:38:24 UTC (rev 7327)
+++ trunk/Payments.php 2015-07-27 16:52:54 UTC (rev 7328)
@@ -1,6 +1,6 @@
<?php
-
/* $Id$*/
+/* Entry of bank account payments either against an AP account or a general ledger payment - if the AP-GL link in company preferences is set */
include('includes/DefinePaymentClass.php');
include('includes/session.inc');
@@ -488,7 +488,7 @@
$DbgMsg = _('Cannot update the supplier record for the date of the last payment made using the SQL');
$result = DB_query($SQL,$ErrMsg,$DbgMsg,true);
- $_SESSION['PaymentDetail' . $identifier]->Narrative = $_SESSION['PaymentDetail' . $identifier]->SupplierID . '-' . $_SESSION['PaymentDetail' . $identifier]->Narrative;
+ $_SESSION['PaymentDetail' . $identifier]->Narrative = $_SESSION['PaymentDetail' . $identifier]->SupplierID . ' - ' . $_SESSION['PaymentDetail' . $identifier]->Narrative;
if ($_SESSION['CompanyRecord']['gllink_creditors']==1){ /* then do the supplier control GLTrans */
/* Now debit creditors account with payment + discount */
@@ -860,39 +860,39 @@
if (!isset($_POST['FunctionalExRate'])){
$_POST['FunctionalExRate']=1;
}
-if ($_SESSION['PaymentDetail' . $identifier]->AccountCurrency!=$_SESSION['PaymentDetail' . $identifier]->Currency AND isset($_SESSION['PaymentDetail' . $identifier]->AccountCurrency)){
- if (isset($SuggestedExRate)){
- $SuggestedExRateText = '<b>' . _('Suggested rate:') . ' ' . locale_number_format($SuggestedExRate,8) . '</b>';
- } else {
- $SuggestedExRateText ='';
- }
- if ($_POST['ExRate']==1 AND isset($SuggestedExRate)){
+if($_SESSION['PaymentDetail' . $identifier]->AccountCurrency != $_SESSION['PaymentDetail' . $identifier]->Currency AND isset($_SESSION['PaymentDetail' . $identifier]->AccountCurrency)) {
+ if($_POST['ExRate']==1 AND isset($SuggestedExRate)) {
$_POST['ExRate'] = locale_number_format($SuggestedExRate,8);
- }elseif($_POST['Currency'] != $_POST['PreviousCurrency'] and isset($SuggestedExRate)){
+ } elseif($_POST['Currency'] != $_POST['PreviousCurrency'] AND isset($SuggestedExRate)) {
$_POST['ExRate'] = locale_number_format($SuggestedExRate,8);
+ }
+ if(isset($SuggestedExRate)) {
+ $SuggestedExRateText = '<b>' . _('Suggested rate:') . ' 1 ' . $_SESSION['PaymentDetail' . $identifier]->AccountCurrency . ' = ' . locale_number_format($SuggestedExRate,8) . ' ' . $_SESSION['PaymentDetail' . $identifier]->Currency . '</b>';
+ } else {
+ $SuggestedExRateText = '1 ' . $_SESSION['PaymentDetail' . $identifier]->AccountCurrency . ' = ? ' . $_SESSION['PaymentDetail' . $identifier]->Currency;
}
echo '<tr>
- <td>' . _('Payment Exchange Rate') . ':</td>
- <td><input class="number" maxlength="12" name="ExRate" size="14" title="' . _('The exchange rate between the currency of the bank account currency and the currency of the payment') . '" type="text" value="' . $_POST['ExRate'] . '" /></td>
- <td>' . $SuggestedExRateText . ' <i>' . _('The exchange rate between the currency of the bank account currency and the currency of the payment') . '. 1 ' . $_SESSION['PaymentDetail' . $identifier]->AccountCurrency . ' = ? ' . $_SESSION['PaymentDetail' . $identifier]->Currency . '</i></td>
+ <td>', _('Payment Exchange Rate'), ':</td>
+ <td><input class="number" maxlength="12" name="ExRate" size="14" title="', _('The exchange rate between the currency of the bank account currency and the currency of the payment'), '" type="text" value="', $_POST['ExRate'], '" /></td>
+ <td>', $SuggestedExRateText, '. <i>', _('The exchange rate between the currency of the bank account currency and the currency of the payment'), '.</i></td>
</tr>';
}
-if ($_SESSION['PaymentDetail' . $identifier]->AccountCurrency!=$_SESSION['CompanyRecord']['currencydefault']
- AND isset($_SESSION['PaymentDetail' . $identifier]->AccountCurrency)){
- if (isset($SuggestedFunctionalExRate)){
- $SuggestedFunctionalExRateText = '<b>' . _('Suggested rate:') . ' ' . locale_number_format($SuggestedFunctionalExRate,8) . '</b>';
+if($_SESSION['PaymentDetail' . $identifier]->AccountCurrency != $_SESSION['CompanyRecord']['currencydefault'] AND isset($_SESSION['PaymentDetail' . $identifier]->AccountCurrency)) {
+ if($_POST['FunctionalExRate']==1 AND isset($SuggestedFunctionalExRate)) {
+ $_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>';
} else {
- $SuggestedFunctionalExRateText ='';
+ $SuggestedFunctionalExRateText = '1 ' . $_SESSION['CompanyRecord']['currencydefault'] . ' = ? ' . $_SESSION['PaymentDetail' . $identifier]->AccountCurrency;
}
- if ($_POST['FunctionalExRate']==1 AND isset($SuggestedFunctionalExRate)){
- $_POST['FunctionalExRate'] = locale_number_format($SuggestedFunctionalExRate,'Variable');
- }
echo '<tr>
- <td>' . _('Functional Exchange Rate') . ':</td>
- <td><input class="number" maxlength="12" name="FunctionalExRate" size="14" title="' . _('The exchange rate between the currency of the business (the functional currency) and the currency of the bank account') . '" type="text" value="' . $_POST['FunctionalExRate'] . '" /></td>
- <td>' . ' ' . $SuggestedFunctionalExRateText . ' <i>' . _('The exchange rate between the currency of the business (the functional currency) and the currency of the bank account') . '. 1 ' . $_SESSION['CompanyRecord']['currencydefault'] . ' = ? ' . $_SESSION['PaymentDetail' . $identifier]->AccountCurrency . '</i></td>
+ <td>', _('Functional Exchange Rate'), ':</td>
+ <td><input class="number" maxlength="12" name="FunctionalExRate" size="14" title="', _('The exchange rate between the currency of the business (the functional currency) and the currency of the bank account'), '" type="text" value="', $_POST['FunctionalExRate'], '" /></td>
+ <td>', $SuggestedFunctionalExRateText, '. <i>', _('The exchange rate between the currency of the business (the functional currency) and the currency of the bank account'), '.</i></td>
</tr>';
}
echo '<tr>
Modified: trunk/doc/Change.log
===================================================================
--- trunk/doc/Change.log 2015-07-26 00:38:24 UTC (rev 7327)
+++ trunk/doc/Change.log 2015-07-27 16:52:54 UTC (rev 7328)
@@ -1,5 +1,6 @@
webERP Change Log
+27/07/15 RChacon: In Payments.php, move currency tags near currency rates.
20/06/15 RChacon: In header.inc, add meta tag to keep relationship between CSS pixels and device pixels.
19/06/15 : Kif (from webERP Chinese Community QQ group) fixed the menu cannot show completely on mobile phone in xenos/default.css.
04/06/15 TurboPT: Currencies.php: Add closing select, td and tr tags to complete last table row.
|