|
From: <rc...@us...> - 2016-05-20 15:45:40
|
Revision: 7537
http://sourceforge.net/p/web-erp/reponame/7537
Author: rchacon
Date: 2016-05-20 15:45:38 +0000 (Fri, 20 May 2016)
Log Message:
-----------
Insert missing script as an utility.
Modified Paths:
--------------
trunk/doc/Change.log
trunk/doc/Manual/ManualSpecialUtilities.html
trunk/includes/MainMenuLinksArray.php
trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo
trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po
trunk/sql/mysql/upgrade4.12.3-4.13.sql
Added Paths:
-----------
trunk/Z_GLAccountUsersCopyAuthority.php
Removed Paths:
-------------
trunk/GLAccountUsersCopyAuthority.php
Deleted: trunk/GLAccountUsersCopyAuthority.php
===================================================================
--- trunk/GLAccountUsersCopyAuthority.php 2016-05-20 14:12:25 UTC (rev 7536)
+++ trunk/GLAccountUsersCopyAuthority.php 2016-05-20 15:45:38 UTC (rev 7537)
@@ -1,88 +0,0 @@
-<?php
-
-include ('includes/session.inc');
-$Title = _('GLAccount - Users Authority Copy Authority');// Screen identificator.
-include('includes/header.inc');
-echo '<p class="page_title_text"><img alt="" src="', $RootPath, '/css/', $Theme,
- '/images/maintenance.png" title="',// Icon image.
- _('Copy Authority of GL Accounts from one user to another'), '" /> ',// Icon title.
- _('Copy Authority of GL Accounts from one user to another'), '</p>';// Page title.
-
-include('includes/SQL_CommonFunctions.inc');
-
-if(isset($_POST['ProcessCopyAuthority'])) {
-
- $InputError =0;
-
- if($_POST['FromUserID']==$_POST['ToUserID']) {
- prnMsg(_('User FROM must be different from user TO'),'error');
- $InputError =1;
- }
-
- if($InputError ==0) {// no input errors
- $result = DB_Txn_Begin();
-
- echo '<br />' . _('Deleting the current authority to view / update the GL Accounts of user') . ' ' . $_POST['ToUserID'];
- $sql = "DELETE FROM glaccountusers WHERE userid = '" . $_POST['ToUserID'] . "'";
- $DbgMsg = _('The SQL statement that failed was');
- $ErrMsg =_('The SQL to delete the auhority in glaccountusers record failed');
- $result = DB_query($sql,$ErrMsg,$DbgMsg,true);
- echo ' ... ' . _('completed');
-
- echo '<br />' . _('Copying the authority to view / update the GL Accounts from user') . ' ' . $_POST['FromUserID'] . ' ' . _('to') . ' ' . $_POST['ToUserID'];
- $sql = "INSERT INTO glaccountusers (userid, accountcode, canview, canupd)
- SELECT '" . $_POST['ToUserID'] . "', accountcode, canview, canupd
- FROM glaccountusers
- WHERE userid = '" . $_POST['FromUserID'] . "'";
-
- $DbgMsg = _('The SQL statement that failed was');
- $ErrMsg =_('The SQL to insert the auhority in glaccountusers record failed');
- $result = DB_query($sql,$ErrMsg,$DbgMsg,true);
- echo ' ... ' . _('completed');
- echo '<br />';
- $result = DB_Txn_Commit();
-
- }//only do the stuff above if $InputError==0
-}
-
-echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">';
-echo '<div class="centre">';
-echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
-
-echo '<table>';
-echo ' <tr>
- <td>' . _('Select User to copy the Authority FROM') . ':</td>
- <td><select name="FromUserID">';
-$Result = DB_query("SELECT userid,
- realname
- FROM www_users
- ORDER BY userid");
-
-echo '<option selected value="">' . _('Not Yet Selected') . '</option>';
-while ($MyRow = DB_fetch_array($Result)) {
- echo '<option value="';
- echo $MyRow['userid'] . '">' . $MyRow['userid'] . ' - ' . $MyRow['realname'] . '</option>';
-} //end while loop
-echo '</select></td></tr>';
-
-echo ' <tr>
- <td>' . _('Select User to copy the Authority TO') . ':</td>
- <td><select name="ToUserID">';
-$Result = DB_query("SELECT userid,
- realname
- FROM www_users
- ORDER BY userid");
-
-echo '<option selected value="">' . _('Not Yet Selected') . '</option>';
-while ($MyRow = DB_fetch_array($Result)) {
- echo '<option value="';
- echo $MyRow['userid'] . '">' . $MyRow['userid'] . ' - ' . $MyRow['realname'] . '</option>';
-} //end while loop
-echo '</select></td></tr>';
-echo '</table>';
-echo '<input type="submit" name="ProcessCopyAuthority" value="' . _('Process Copy of Authority') . '" />
- </div>
- </form>';
-
-include('includes/footer.inc');
-?>
\ No newline at end of file
Added: trunk/Z_GLAccountUsersCopyAuthority.php
===================================================================
--- trunk/Z_GLAccountUsersCopyAuthority.php (rev 0)
+++ trunk/Z_GLAccountUsersCopyAuthority.php 2016-05-20 15:45:38 UTC (rev 7537)
@@ -0,0 +1,101 @@
+<?php
+/* $Id: Z_GLAccountUsersCopyAuthority.php 7392 2015-11-16 07:30:11Z tehonu $*/
+/* Utility to copy authority of GL accounts from one user to another */
+
+include('includes/session.inc');
+$Title = _('GLAccount - Users Authority Copy Authority');
+$ViewTopic = 'SpecialUtilities';
+$BookMark = 'Z_GLAccountUsersCopyAuthority';
+include('includes/header.inc');
+
+echo '<p class="page_title_text"><img alt="" src="', $RootPath, '/css/', $Theme,
+ '/images/maintenance.png" title="',// Icon image.
+ _('Copy Authority of GL Accounts from one user to another'), '" /> ',// Icon title.
+ _('Copy Authority of GL Accounts from one user to another'), '</p>';// Page title.
+
+include('includes/SQL_CommonFunctions.inc');
+
+if(isset($_POST['ProcessCopyAuthority'])) {
+
+ $InputError =0;
+
+ if($_POST['FromUserID']==$_POST['ToUserID']) {
+ prnMsg(_('User FROM must be different from user TO'),'error');
+ $InputError =1;
+ }
+
+ if($InputError ==0) {// no input errors
+ $result = DB_Txn_Begin();
+
+ echo '<br />' . _('Deleting the current authority to view / update the GL Accounts of user') . ' ' . $_POST['ToUserID'];
+ $sql = "DELETE FROM glaccountusers WHERE userid = '" . $_POST['ToUserID'] . "'";
+ $DbgMsg = _('The SQL statement that failed was');
+ $ErrMsg =_('The SQL to delete the auhority in glaccountusers record failed');
+ $result = DB_query($sql,$ErrMsg,$DbgMsg,true);
+ echo ' ... ' . _('completed');
+
+ echo '<br />' . _('Copying the authority to view / update the GL Accounts from user') . ' ' . $_POST['FromUserID'] . ' ' . _('to') . ' ' . $_POST['ToUserID'];
+ $sql = "INSERT INTO glaccountusers (userid, accountcode, canview, canupd)
+ SELECT '" . $_POST['ToUserID'] . "', accountcode, canview, canupd
+ FROM glaccountusers
+ WHERE userid = '" . $_POST['FromUserID'] . "'";
+
+ $DbgMsg = _('The SQL statement that failed was');
+ $ErrMsg =_('The SQL to insert the auhority in glaccountusers record failed');
+ $result = DB_query($sql,$ErrMsg,$DbgMsg,true);
+ echo ' ... ' . _('completed');
+ echo '<br />';
+ $result = DB_Txn_Commit();
+
+ }//only do the stuff above if $InputError==0
+}
+
+echo '<form action="' . htmlspecialchars($_SERVER['PHP_SELF'],ENT_QUOTES,'UTF-8') . '" method="post">';
+echo '<div class="centre noprint">';
+echo '<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
+
+echo '<table>';
+echo ' <tr>
+ <td>' . _('Select User to copy the Authority FROM') . ':</td>
+ <td><select name="FromUserID">';
+$Result = DB_query("SELECT userid,
+ realname
+ FROM www_users
+ ORDER BY userid");
+
+echo '<option selected value="">' . _('Not Yet Selected') . '</option>';
+while ($MyRow = DB_fetch_array($Result)) {
+ echo '<option value="';
+ echo $MyRow['userid'] . '">' . $MyRow['userid'] . ' - ' . $MyRow['realname'] . '</option>';
+} //end while loop
+echo '</select></td></tr>';
+
+echo ' <tr>
+ <td>' . _('Select User to copy the Authority TO') . ':</td>
+ <td><select name="ToUserID">';
+$Result = DB_query("SELECT userid,
+ realname
+ FROM www_users
+ ORDER BY userid");
+
+echo '<option selected value="">' . _('Not Yet Selected') . '</option>';
+while ($MyRow = DB_fetch_array($Result)) {
+ echo '<option value="';
+ echo $MyRow['userid'] . '">' . $MyRow['userid'] . ' - ' . $MyRow['realname'] . '</option>';
+} //end while loop
+echo '</select></td></tr>';
+echo '</table>';
+/*echo '<input type="submit" name="ProcessCopyAuthority" value="' . _('Process Copy of Authority') . '" />
+ </div>
+ </form>';*/
+
+// Form buttons:
+echo '<button name="ProcessCopyAuthority" type="submit" value="', _('Process Copy of Authority'), '"><img alt="" src="', $RootPath, '/css/', $Theme,
+ '/images/user.png" /> ', _('Process'), '</button>', // "Process Copy of Authority" button.
+ '<button formaction="index.php?Application=Utilities" type="submit"><img alt="" src="', $RootPath, '/css/', $Theme,
+ '/images/previous.png" /> ', _('Return'), '</button>', // "Return" button.
+ '</div>
+ </form>';
+
+include('includes/footer.inc');
+?>
\ No newline at end of file
Modified: trunk/doc/Change.log
===================================================================
--- trunk/doc/Change.log 2016-05-20 14:12:25 UTC (rev 7536)
+++ trunk/doc/Change.log 2016-05-20 15:45:38 UTC (rev 7537)
@@ -2,6 +2,7 @@
22/5/16 Release 4.13
+20/5/16 RChacon: Insert missing script as an utility.
20/5/16 RChacon: In Login.php, add a return link.
20/5/16 Paul Harness: CustomerAllocations.php consistent sort order adding by date and transno sorting for transactions on the same date
15/05/16 RChacon: In SelectCustomer.php, use a default map host if $map_host is empty.
Modified: trunk/doc/Manual/ManualSpecialUtilities.html
===================================================================
--- trunk/doc/Manual/ManualSpecialUtilities.html 2016-05-20 14:12:25 UTC (rev 7536)
+++ trunk/doc/Manual/ManualSpecialUtilities.html 2016-05-20 15:45:38 UTC (rev 7537)
@@ -66,6 +66,13 @@
<p>However, occasionally incorrect cost data that has made a monkey of the sales analysis and general ledger can only be rectified by running this utility.</p>
+<h2><a id="Z_GLAccountUsersCopyAuthority">Copy Authority of GL Accounts from one user to another</a></h2>
+
+<p>This utility allows you to copy access rights to general ledger accounts from one user to another.</p>
+
+<!-- "Inquiries and Reports" -->
+
+
<h2><a id="Z_CurrencyDebtorsBalances.php">Debtors Balances By Currency Totals</a></h2>
<p>This script is an utility to show debtors balances in total by currency.</p>
Modified: trunk/includes/MainMenuLinksArray.php
===================================================================
--- trunk/includes/MainMenuLinksArray.php 2016-05-20 14:12:25 UTC (rev 7536)
+++ trunk/includes/MainMenuLinksArray.php 2016-05-20 15:45:38 UTC (rev 7537)
@@ -402,7 +402,6 @@
_('GL Tags'),
_('GL Accounts Authorised Users Maintenance'),
_('User Authorised GL Accounts Maintenance'),
- _('Copy Authority GL Accounts from user A to B'),
_('Bank Accounts'),
_('Bank Account Authorized Users'),
_('User Authorized Bank Accounts'));
@@ -414,7 +413,6 @@
'/GLTags.php',
'/GLAccountUsers.php',
'/UserGLAccounts.php',
- '/GLAccountUsersCopyAuthority.php',
'/BankAccounts.php',
'/BankAccountUsers.php',
'/UserBankAccounts.php');
@@ -575,7 +573,8 @@
_('Re-apply costs to Sales Analysis'),
_('Delete sales transactions'),
_('Reverse all supplier payments on a specified date'),
- _('Update sales analysis with latest customer data'));
+ _('Update sales analysis with latest customer data'),
+ _('Copy Authority of GL Accounts from one user to another'));
$MenuItems['Utilities']['Transactions']['URL'] = array( '/Z_ChangeCustomerCode.php',
'/Z_ChangeBranchCode.php',
@@ -589,7 +588,8 @@
'/Z_ReApplyCostToSA.php',
'/Z_DeleteSalesTransActions.php',
'/Z_ReverseSuppPaymentRun.php',
- '/Z_UpdateSalesAnalysisWithLatestCustomerData.php');
+ '/Z_UpdateSalesAnalysisWithLatestCustomerData.php',
+ '/Z_GLAccountUsersCopyAuthority.php');
$MenuItems['Utilities']['Reports']['Caption'] = array( _('Debtors Balances By Currency Totals'),
_('Suppliers Balances By Currency Totals'),
Modified: trunk/locale/es_ES.utf8/LC_MESSAGES/messages.mo
===================================================================
(Binary files differ)
Modified: trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po
===================================================================
--- trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po 2016-05-20 14:12:25 UTC (rev 7536)
+++ trunk/locale/es_ES.utf8/LC_MESSAGES/messages.po 2016-05-20 15:45:38 UTC (rev 7537)
@@ -8,7 +8,7 @@
"Project-Id-Version: webERP 4.12.2\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-05-16 21:31+1200\n"
-"PO-Revision-Date: 2016-05-20 08:06-0600\n"
+"PO-Revision-Date: 2016-05-20 09:09-0600\n"
"Last-Translator: Rafael Chacon <raf...@gm...>\n"
"Language-Team: TecnoSoluciones.com <web...@te...>\n"
"Language: es_ES\n"
@@ -14930,7 +14930,7 @@
#: GLAccountUsersCopyAuthority.php:83
msgid "Process Copy of Authority"
-msgstr ""
+msgstr "Procesar copia de derechos de acceso"
#: GLAccountUsers.php:6 GLAccountUsers.php:43 GLAccountUsers.php:44
#: GLAccountUsers.php:85
Modified: trunk/sql/mysql/upgrade4.12.3-4.13.sql
===================================================================
--- trunk/sql/mysql/upgrade4.12.3-4.13.sql 2016-05-20 14:12:25 UTC (rev 7536)
+++ trunk/sql/mysql/upgrade4.12.3-4.13.sql 2016-05-20 15:45:38 UTC (rev 7537)
@@ -16,6 +16,8 @@
('SupplierGRNAndInvoiceInquiry.php',5,'Supplier\'s delivery note and grn relationship inquiry'),
('UserBankAccounts.php', '15', 'Maintains table bankaccountusers (Authorized users to work with a bank account in webERP)'),
('UserGLAccounts.php', '15', 'Maintenance of GL Accounts allowed for a user');
+INSERT INTO `scripts` (`script`, `pagesecurity`, `description`) VALUES
+ ('Z_GLAccountUsersCopyAuthority.php', '15', 'Utility to copy authority of GL accounts from one user to another');
CREATE TABLE IF NOT EXISTS `suppinvstogrn` (
`suppinv` int(11) NOT NULL,
|