From: <tim...@us...> - 2012-03-12 00:44:34
|
Revision: 5069 http://web-erp.svn.sourceforge.net/web-erp/?rev=5069&view=rev Author: tim_schofield Date: 2012-03-12 00:44:28 +0000 (Mon, 12 Mar 2012) Log Message: ----------- Change incorrect table name Modified Paths: -------------- trunk/Departments.php Modified: trunk/Departments.php =================================================================== --- trunk/Departments.php 2012-03-12 00:39:45 UTC (rev 5068) +++ trunk/Departments.php 2012-03-12 00:44:28 UTC (rev 5069) @@ -34,8 +34,8 @@ prnMsg( _('The Name of the Department should not be empty'), 'error'); } - if (isset($_POST['SelectedDepartmentID']) - AND $_POST['SelectedDepartmentID']!='' + if (isset($_POST['SelectedDepartmentID']) + AND $_POST['SelectedDepartmentID']!='' AND $InputError !=1) { @@ -51,8 +51,8 @@ prnMsg( _('This department name already exists.'),'error'); } else { // Get the old name and check that the record still exist neet to be very careful here - - $sql = "SELECT description + + $sql = "SELECT description FROM departments WHERE departmentid = '" . $SelectedDepartmentID . "'"; $result = DB_query($sql,$db); @@ -120,8 +120,8 @@ } elseif (isset($_GET['delete'])) { //the link to delete a selected record was clicked instead of the submit button - - $sql = "SELECT description + + $sql = "SELECT description FROM departments WHERE departmentid = '" . $SelectedDepartmentID . "'"; $result = DB_query($sql,$db); @@ -130,9 +130,9 @@ } else { $myrow = DB_fetch_row($result); $OldDepartmentName = $myrow[0]; - $sql= "SELECT COUNT(*) - FROM dispatch INNER JOIN departments - ON dispatch.departmentid=departments.departmentid + $sql= "SELECT COUNT(*) + FROM stockrequest INNER JOIN departments + ON stockrequest.departmentid=departments.departmentid WHERE description " . LIKE . " '" . $OldDepartmentName . "'"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-03-12 00:44:34
|
Revision: 5069 http://web-erp.svn.sourceforge.net/web-erp/?rev=5069&view=rev Author: tim_schofield Date: 2012-03-12 00:44:28 +0000 (Mon, 12 Mar 2012) Log Message: ----------- Change incorrect table name Modified Paths: -------------- trunk/Departments.php Modified: trunk/Departments.php =================================================================== --- trunk/Departments.php 2012-03-12 00:39:45 UTC (rev 5068) +++ trunk/Departments.php 2012-03-12 00:44:28 UTC (rev 5069) @@ -34,8 +34,8 @@ prnMsg( _('The Name of the Department should not be empty'), 'error'); } - if (isset($_POST['SelectedDepartmentID']) - AND $_POST['SelectedDepartmentID']!='' + if (isset($_POST['SelectedDepartmentID']) + AND $_POST['SelectedDepartmentID']!='' AND $InputError !=1) { @@ -51,8 +51,8 @@ prnMsg( _('This department name already exists.'),'error'); } else { // Get the old name and check that the record still exist neet to be very careful here - - $sql = "SELECT description + + $sql = "SELECT description FROM departments WHERE departmentid = '" . $SelectedDepartmentID . "'"; $result = DB_query($sql,$db); @@ -120,8 +120,8 @@ } elseif (isset($_GET['delete'])) { //the link to delete a selected record was clicked instead of the submit button - - $sql = "SELECT description + + $sql = "SELECT description FROM departments WHERE departmentid = '" . $SelectedDepartmentID . "'"; $result = DB_query($sql,$db); @@ -130,9 +130,9 @@ } else { $myrow = DB_fetch_row($result); $OldDepartmentName = $myrow[0]; - $sql= "SELECT COUNT(*) - FROM dispatch INNER JOIN departments - ON dispatch.departmentid=departments.departmentid + $sql= "SELECT COUNT(*) + FROM stockrequest INNER JOIN departments + ON stockrequest.departmentid=departments.departmentid WHERE description " . LIKE . " '" . $OldDepartmentName . "'"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <te...@us...> - 2012-07-27 07:11:18
|
Revision: 5561 http://web-erp.svn.sourceforge.net/web-erp/?rev=5561&view=rev Author: tehonu Date: 2012-07-27 07:11:09 +0000 (Fri, 27 Jul 2012) Log Message: ----------- Ricard: Set Order By department name Modified Paths: -------------- trunk/Departments.php Modified: trunk/Departments.php =================================================================== --- trunk/Departments.php 2012-07-26 10:12:33 UTC (rev 5560) +++ trunk/Departments.php 2012-07-27 07:11:09 UTC (rev 5561) @@ -159,7 +159,7 @@ description, authoriser FROM departments - ORDER BY departmentid"; + ORDER BY description"; $ErrMsg = _('There are no departments created'); $result = DB_query($sql,$db,$ErrMsg); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <te...@us...> - 2012-07-27 07:11:18
|
Revision: 5561 http://web-erp.svn.sourceforge.net/web-erp/?rev=5561&view=rev Author: tehonu Date: 2012-07-27 07:11:09 +0000 (Fri, 27 Jul 2012) Log Message: ----------- Ricard: Set Order By department name Modified Paths: -------------- trunk/Departments.php Modified: trunk/Departments.php =================================================================== --- trunk/Departments.php 2012-07-26 10:12:33 UTC (rev 5560) +++ trunk/Departments.php 2012-07-27 07:11:09 UTC (rev 5561) @@ -159,7 +159,7 @@ description, authoriser FROM departments - ORDER BY departmentid"; + ORDER BY description"; $ErrMsg = _('There are no departments created'); $result = DB_query($sql,$db,$ErrMsg); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sam...@us...> - 2012-10-20 07:28:38
|
Revision: 5722 http://sourceforge.net/p/web-erp/reponame/5722 Author: samudaya Date: 2012-10-20 07:28:36 +0000 (Sat, 20 Oct 2012) Log Message: ----------- Fixed the problem of Authoriser drop down selection when try to edit a Internal Departments. Modified Paths: -------------- trunk/Departments.php Modified: trunk/Departments.php =================================================================== --- trunk/Departments.php 2012-10-20 06:23:32 UTC (rev 5721) +++ trunk/Departments.php 2012-10-20 07:28:36 UTC (rev 5722) @@ -7,7 +7,7 @@ include('includes/header.inc'); echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . - _('Search') . '" alt="" />' . ' ' . $title . '</p>'; + _('Top Sales Order Search') . '" alt="" />' . ' ' . $title . '</p>'; if ( isset($_GET['SelectedDepartmentID']) ) $SelectedDepartmentID = $_GET['SelectedDepartmentID']; @@ -159,7 +159,7 @@ description, authoriser FROM departments - ORDER BY description"; + ORDER BY departmentid"; $ErrMsg = _('There are no departments created'); $result = DB_query($sql,$db,$ErrMsg); @@ -208,7 +208,8 @@ //editing an existing section $sql = "SELECT departmentid, - description + description, + authoriser FROM departments WHERE departmentid='" . $SelectedDepartmentID . "'"; @@ -221,6 +222,7 @@ $_POST['DepartmentID'] = $myrow['departmentid']; $_POST['DepartmentName'] = $myrow['description']; + $AuthoriserID = $myrow['authoriser']; echo '<input type="hidden" name="SelectedDepartmentID" value="' . $_POST['DepartmentID'] . '" />'; echo '<table class="selection">'; @@ -240,7 +242,7 @@ $usersql="SELECT userid FROM www_users"; $userresult=DB_query($usersql,$db); while ($myrow=DB_fetch_array($userresult)) { - if ($myrow['userid']==$UserID) { + if ($myrow['userid']==$AuthoriserID) { echo '<option selected="True" value="'.$myrow['userid'].'">'.$myrow['userid'].'</option>'; } else { echo '<option value="'.$myrow['userid'].'">'.$myrow['userid'].'</option>'; |
From: <dai...@us...> - 2012-10-20 10:20:42
|
Revision: 5724 http://sourceforge.net/p/web-erp/reponame/5724 Author: daintree Date: 2012-10-20 10:20:40 +0000 (Sat, 20 Oct 2012) Log Message: ----------- Modified Paths: -------------- trunk/Departments.php Modified: trunk/Departments.php =================================================================== --- trunk/Departments.php 2012-10-20 07:29:09 UTC (rev 5723) +++ trunk/Departments.php 2012-10-20 10:20:40 UTC (rev 5724) @@ -1,5 +1,5 @@ <?php -/* $Id: UnitsOfMeasure.php 4567 2011-05-15 04:34:49Z daintree $*/ +/* $Id: Departments.php 4567 2011-05-15 04:34:49Z daintree $*/ include('includes/session.inc'); @@ -7,7 +7,7 @@ include('includes/header.inc'); echo '<p class="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/magnifier.png" title="' . - _('Top Sales Order Search') . '" alt="" />' . ' ' . $title . '</p>'; + _('Departments') . '" alt="" />' . ' ' . $title . '</p>'; if ( isset($_GET['SelectedDepartmentID']) ) $SelectedDepartmentID = $_GET['SelectedDepartmentID']; @@ -43,7 +43,7 @@ // Check the name does not clash $sql = "SELECT count(*) FROM departments WHERE departmentid <> '" . $SelectedDepartmentID ."' - AND description ".LIKE." '" . $_POST['DepartmentName'] . "'"; + AND description " . LIKE . " '" . $_POST['DepartmentName'] . "'"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); if ( $myrow[0] > 0 ) { @@ -64,10 +64,10 @@ $sql[] = "UPDATE departments SET description='" . $_POST['DepartmentName'] . "', authoriser='" . $_POST['Authoriser'] . "' - WHERE description ". LIKE . " '" . $OldDepartmentName . "'"; + WHERE description " . LIKE . " '" . $OldDepartmentName . "'"; } else { $InputError = 1; - prnMsg( _('The Department does not exist.'),'error'); + prnMsg( _('The department does not exist.'),'error'); } } $msg = _('The department has been modified'); @@ -79,7 +79,7 @@ $myrow = DB_fetch_row($result); if ( $myrow[0] > 0 ) { $InputError = 1; - prnMsg( _('There is already a Department with the specified name.'),'error'); + prnMsg( _('There is already a department with the specified name.'),'error'); } else { $sql = "INSERT INTO departments (description, authoriser ) @@ -95,8 +95,8 @@ $result = DB_Txn_Begin($db); $ErrMsg = _('The department could not be inserted'); $DbgMsg = _('The sql that failed was') . ':'; - foreach ($sql as $stmt ) { - $result = DB_query($stmt,$db, $ErrMsg,$DbgMsg,true); + foreach ($sql as $SQLStatement ) { + $result = DB_query($SQLStatement,$db, $ErrMsg,$DbgMsg,true); if(!$result) { $InputError = 1; break; @@ -184,7 +184,7 @@ echo '<td>' . $myrow['description'] . '</td> <td>' . $myrow['authoriser'] . '</td> <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedDepartmentID=' . $myrow['departmentid'] . '">' . _('Edit') . '</a></td> - <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedDepartmentID=' . $myrow['departmentid'] . '&delete=1">' . _('Delete') .'</a></td> + <td><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '?SelectedDepartmentID=' . $myrow['departmentid'] . '&delete=1" onclick="return confirm(\'' . _('Are you sure you wish to delete this department?') . '\');">' . _('Delete') .'</a></td> </tr>'; } //END WHILE LIST LOOP @@ -193,7 +193,9 @@ if (isset($SelectedDepartmentID)) { - echo '<div class="centre"><a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('View all Departments') . '</a></div>'; + echo '<div class="centre"> + <a href="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">' . _('View all Departments') . '</a> + </div>'; } echo '<br />'; @@ -235,9 +237,9 @@ echo '<tr> <td>' . _('Department Name') . ':' . '</td> <td><input type="text" name="DepartmentName" size="50" maxlength="100" value="' . $_POST['DepartmentName'] . '" /></td> - </tr>'; - echo '<tr> - <td>'._('Authoriser').'</td> + </tr> + <tr> + <td>' . _('Authoriser') . '</td> <td><select name="Authoriser">'; $usersql="SELECT userid FROM www_users"; $userresult=DB_query($usersql,$db); @@ -251,9 +253,8 @@ echo '</select></td> </tr> </table> - <br />'; - - echo '<div class="centre"> + <br /> + <div class="centre"> <input type="submit" name="Submit" value="' . _('Enter Information') . '" /> </div> </div> |
From: <te...@us...> - 2016-05-06 09:08:17
|
Revision: 7510 http://sourceforge.net/p/web-erp/reponame/7510 Author: tehonu Date: 2016-05-06 09:08:15 +0000 (Fri, 06 May 2016) Log Message: ----------- Use name as order by field, as id is not visible to user Modified Paths: -------------- trunk/Departments.php Modified: trunk/Departments.php =================================================================== --- trunk/Departments.php 2016-05-06 03:29:59 UTC (rev 7509) +++ trunk/Departments.php 2016-05-06 09:08:15 UTC (rev 7510) @@ -159,7 +159,7 @@ description, authoriser FROM departments - ORDER BY departmentid"; + ORDER BY description"; $ErrMsg = _('There are no departments created'); $result = DB_query($sql,$ErrMsg); |