From: <tim...@us...> - 2010-10-29 10:50:59
|
Revision: 4125 http://web-erp.svn.sourceforge.net/web-erp/?rev=4125&view=rev Author: tim_schofield Date: 2010-10-29 10:50:52 +0000 (Fri, 29 Oct 2010) Log Message: ----------- GLJournal.php. Force the user to select a GL account code instaed of defaulting to first on the list Modified Paths: -------------- trunk/GLJournal.php trunk/doc/Change.log.html Modified: trunk/GLJournal.php =================================================================== --- trunk/GLJournal.php 2010-10-28 20:19:08 UTC (rev 4124) +++ trunk/GLJournal.php 2010-10-29 10:50:52 UTC (rev 4125) @@ -147,7 +147,7 @@ } if ($_POST['GLManualCode'] != '' AND is_numeric($_POST['GLManualCode'])){ // If a manual code was entered need to check it exists and isnt a bank account - $AllowThisPosting = true; //by default + $AllowThisPosting = true; //by default if ($_SESSION['ProhibitJournalsToControlAccounts'] == 1){ if ($_SESSION['CompanyRecord']['gllink_debtors'] == '1' AND $_POST['GLManualCode'] == $_SESSION['CompanyRecord']['debtorsact']){ prnMsg(_('GL Journals involving the debtors control account cannot be entered. The general ledger debtors ledger (AR) integration is enabled so control accounts are automatically maintained by webERP. This setting can be disabled in System Configuration'),'warn'); @@ -189,6 +189,10 @@ $AllowThisPosting = false; } } + if ($_POST['GLCode'] == '' and $_POST['GLManualCode'] == '') { + prnMsg(_('You must select a GL account code'),'info'); + $AllowThisPosting = false; + } if (in_array($_POST['GLCode'], $_SESSION['JournalDetail']->BankAccounts)) { prnMsg(_('GL Journals involving a bank account cannot be entered') . '. ' . _('Bank account general ledger entries must be entered by either a bank account receipt or a bank account payment'),'warn'); @@ -312,6 +316,7 @@ $result=DB_query($sql, $db); echo '<td><select name="GLCode" onChange="return assignComboToInput(this,'.'GLManualCode'.')">'; + echo '<option value="">' . _('Select a general ledger account code') . '</option>'; while ($myrow=DB_fetch_array($result)){ if (isset($_POST['tag']) and $_POST['tag']==$myrow['accountcode']){ echo '<option selected value=' . $myrow['accountcode'] . '>' . $myrow['accountcode'].' - ' .$myrow['accountname']; Modified: trunk/doc/Change.log.html =================================================================== --- trunk/doc/Change.log.html 2010-10-28 20:19:08 UTC (rev 4124) +++ trunk/doc/Change.log.html 2010-10-29 10:50:52 UTC (rev 4125) @@ -1,5 +1,6 @@ <p><font SIZE=4 COLOR=BLUE><b>webERP Change Log</b></font></p> <p></p> +<p>28/10/10 Tim: GLJournal.php. Force the user to select a GL account code instaed of defaulting to first on the list</p> <p>28/10/10 Tim: Fix bug # 3017709. When bulk transfers are received for controlled items serial numbers are required</p> <p>28/10/10 Tim: PcExpensesTypeTab.php - SQL quoting corrections and layout changes and improvements</p> <p>28/10/10 Tim: PcTabs.php - SQL quoting corrections and layout changes and improvements</p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |