|
From: <ex...@us...> - 2016-11-26 11:36:16
|
Revision: 7685
http://sourceforge.net/p/web-erp/reponame/7685
Author: exsonqu
Date: 2016-11-26 11:36:14 +0000 (Sat, 26 Nov 2016)
Log Message:
-----------
26/11/2016 Exson: Add a constraint to Pc assignment transfer in PcAssignCashTabToTab.php
Modified Paths:
--------------
trunk/PcAssignCashTabToTab.php
trunk/doc/Change.log
Modified: trunk/PcAssignCashTabToTab.php
===================================================================
--- trunk/PcAssignCashTabToTab.php 2016-11-26 10:30:10 UTC (rev 7684)
+++ trunk/PcAssignCashTabToTab.php 2016-11-26 11:36:14 UTC (rev 7685)
@@ -38,6 +38,25 @@
unset($_POST['SelectedTabsTo']);
unset($_POST['Process']);
}
+ //to ensure currency is the same
+ $CurrSQL = "SELECT currency
+ FROM pctabs
+ WHERE tabcode IN ('" . $SelectedTabs . "','" . $_POST['SelectedTabsTo'] . "')";
+ $CurrResult = DB_query($CurrSQL);
+ if (DB_num_rows($CurrResult)>0) {
+ $Currency = '';
+ while ($CurrRow = DB_fetch_array($CurrResult)) {
+ if ($Currency === '') {
+ $Currency = $CurrRow['currency'];
+ } elseif ($Currency != $CurrRow['currency']) {
+ prnMsg (_('The currency transferred from shoud be the same with the transferred to'),'error');
+ unset($SelectedTabs);
+ unset($_POST['SelectedTabsTo']);
+ unset($_POST['Process']);
+ }
+ }
+ }
+
}
if (isset($_POST['Go'])) {
Modified: trunk/doc/Change.log
===================================================================
--- trunk/doc/Change.log 2016-11-26 10:30:10 UTC (rev 7684)
+++ trunk/doc/Change.log 2016-11-26 11:36:14 UTC (rev 7685)
@@ -1,5 +1,6 @@
webERP Change Log
+26/11/2016 Exson: Add a constraint to Pc assignment transfer in PcAssignCashTabToTab.php
26/11/16 Exson: Fixed the bugs in InternalStockRequestInquiry.php. Thanks for Tim's report.
23/11/16 RChacon: On AccountGroups.php, add navigation aids (return button).
08/11/16 RChacon: On WWW_Users.php, fix hardcoded label (difficult to translate for languages with a different structure to English), do sortable the users list, replace printf() with plain list echo, and add format class.
|