From: <tim...@us...> - 2010-10-31 19:01:45
|
Revision: 4131 http://web-erp.svn.sourceforge.net/web-erp/?rev=4131&view=rev Author: tim_schofield Date: 2010-10-31 19:01:39 +0000 (Sun, 31 Oct 2010) Log Message: ----------- Force the user to select a GL account code instaed of defaulting to first on the list Modified Paths: -------------- trunk/SuppTransGLAnalysis.php trunk/doc/Change.log.html Modified: trunk/SuppTransGLAnalysis.php =================================================================== --- trunk/SuppTransGLAnalysis.php 2010-10-31 18:31:16 UTC (rev 4130) +++ trunk/SuppTransGLAnalysis.php 2010-10-31 19:01:39 UTC (rev 4131) @@ -32,15 +32,20 @@ $_POST['GLCode'] = $_POST['AcctSelection']; } + if ($_POST['GLCode'] == ''){ + prnMsg( _('You must select a general ledger code from the list below') ,'warn'); + $InputError = True; + } + $sql = "SELECT accountcode, accountname FROM chartmaster WHERE accountcode='" . $_POST['GLCode'] . "'"; $result = DB_query($sql, $db); - if (DB_num_rows($result) == 0){ + if (DB_num_rows($result) == 0 and $_POST['GLCode'] != ''){ prnMsg(_('The account code entered is not a valid code') . '. ' . _('This line cannot be added to the transaction') . '.<br>' . _('You can use the selection box to select the account you want'),'error'); $InputError = True; - } else { + } else if ($_POST['GLCode'] != '') { $myrow = DB_fetch_row($result); $GLActName = $myrow[1]; if (!is_numeric($_POST['Amount'])){ @@ -146,7 +151,7 @@ $sql = 'SELECT accountcode, accountname FROM chartmaster ORDER BY accountcode'; $result = DB_query($sql, $db); - +echo '<option value=""></option>'; while ($myrow = DB_fetch_array($result)) { if ($myrow['accountcode'] == $_POST['AcctSelection']) { echo '<option selected VALUE='; Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-10-31 18:31:16 UTC (rev 4130) +++ trunk/doc/Change.log.html 2010-10-31 19:01:39 UTC (rev 4131) @@ -1,6 +1,7 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> -<p>29/10/10 Tim: CustomerReceipt.php. Force the user to select a GL account code and a Bank Account instaed of defaulting to first on the list</p> +<p>31/10/10 Tim: SuppTransGLAnalysis.php. Force the user to select a GL account code instaed of defaulting to first on the list</p> +<p>31/10/10 Tim: CustomerReceipt.php. Force the user to select a GL account code and a Bank Account instaed of defaulting to first on the list</p> <p>29/10/10 Tim: index.php. If CustomerReceipt selected from the GL menu then go to GL receipts else customer receipts</p> <p>29/10/10 Tim: Payments.php. Force the user to select a GL account code and a Bank Account instaed of defaulting to first on the list</p> <p>29/10/10 Tim: GLJournal.php. Force the user to select a GL account code instaed of defaulting to first on the list</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |