From: <tim...@us...> - 2012-01-19 10:17:29
|
Revision: 4808 http://web-erp.svn.sourceforge.net/web-erp/?rev=4808&view=rev Author: tim_schofield Date: 2012-01-19 10:17:22 +0000 (Thu, 19 Jan 2012) Log Message: ----------- Fix typing error in sql to check the existance of purchase orders before deletion Modified Paths: -------------- trunk/Locations.php Modified: trunk/Locations.php =================================================================== --- trunk/Locations.php 2012-01-19 10:15:26 UTC (rev 4807) +++ trunk/Locations.php 2012-01-19 10:17:22 UTC (rev 4808) @@ -36,7 +36,7 @@ $sql = "SELECT * FROM custbranch WHERE debtorno='" . $_POST['CashSaleCustomer'] . "' AND branchcode='" . $_POST['CashSaleBranch'] . "'"; - + $result = DB_query($sql,$db); if (DB_num_rows($result)==0){ $InputError = 1; @@ -71,7 +71,7 @@ cashsalebranch ='" . $_POST['CashSaleBranch'] . "', managed = '" . $_POST['Managed'] . "' WHERE loccode = '" . $SelectedLocation . "'"; - + $ErrMsg = _('An error occurred updating the') . ' ' . $SelectedLocation . ' ' . _('location record because'); $DbgMsg = _('The SQL used to update the location record was'); @@ -245,8 +245,8 @@ echo '<br />' . _('There are') . ' ' . $myrow[0] . ' ' . _('stock movements with this Location code'); } else { - $sql= "SELECT COUNT(*) FROM locstock - WHERE locstock.loccode='". $SelectedLocation . "' + $sql= "SELECT COUNT(*) FROM locstock + WHERE locstock.loccode='". $SelectedLocation . "' AND locstock.quantity !=0"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); @@ -255,7 +255,7 @@ prnMsg(_('Cannot delete this location because location stock records exist that use this location and have a quantity on hand not equal to 0'),'warn'); echo '<br /> ' . _('There are') . ' ' . $myrow[0] . ' ' . _('stock items with stock on hand at this location code'); } else { - $sql= "SELECT COUNT(*) FROM www_users + $sql= "SELECT COUNT(*) FROM www_users WHERE www_users.defaultlocation='" . $SelectedLocation . "'"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); @@ -264,7 +264,7 @@ prnMsg(_('Cannot delete this location because it is the default location for a user') . '. ' . _('The user record must be modified first'),'warn'); echo '<br /> ' . _('There are') . ' ' . $myrow[0] . ' ' . _('users using this location as their default location'); } else { - $sql= "SELECT COUNT(*) FROM bom + $sql= "SELECT COUNT(*) FROM bom WHERE bom.loccode='" . $SelectedLocation . "'"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); @@ -273,7 +273,7 @@ prnMsg(_('Cannot delete this location because it is the default location for a bill of material') . '. ' . _('The bill of materials must be modified first'),'warn'); echo '<br /> ' . _('There are') . ' ' . $myrow[0] . ' ' . _('bom components using this location'); } else { - $sql= "SELECT COUNT(*) FROM workcentres + $sql= "SELECT COUNT(*) FROM workcentres WHERE workcentres.location='" . $SelectedLocation . "'"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); @@ -282,7 +282,7 @@ prnMsg( _('Cannot delete this location because it is used by some work centre records'),'warn'); echo '<br />' . _('There are') . ' ' . $myrow[0] . ' ' . _('works centres using this location'); } else { - $sql= "SELECT COUNT(*) FROM workorders + $sql= "SELECT COUNT(*) FROM workorders WHERE workorders.loccode='" . $SelectedLocation . "'"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); @@ -291,7 +291,7 @@ prnMsg( _('Cannot delete this location because it is used by some work order records'),'warn'); echo '<br />' . _('There are') . ' ' . $myrow[0] . ' ' . _('work orders using this location'); } else { - $sql= "SELECT COUNT(*) FROM custbranch + $sql= "SELECT COUNT(*) FROM custbranch WHERE custbranch.defaultlocation='" . $SelectedLocation . "'"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); @@ -300,7 +300,7 @@ prnMsg(_('Cannot delete this location because it is used by some branch records as the default location to deliver from'),'warn'); echo '<br /> ' . _('There are') . ' ' . $myrow[0] . ' ' . _('branches set up to use this location by default'); } else { - $sql= "SELECT COUNT(*) FROM purchorders WHERE intostocklocation='" . $SelectedLocation . '"; + $sql= "SELECT COUNT(*) FROM purchorders WHERE intostocklocation='" . $SelectedLocation . "'"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); if ($myrow[0]>0) { @@ -319,15 +319,15 @@ if (! $CancelDelete) { /* need to figure out if this location is the only one in the same tax province */ - $result = DB_query("SELECT taxprovinceid FROM locations + $result = DB_query("SELECT taxprovinceid FROM locations WHERE loccode='" . $SelectedLocation . "'",$db); $TaxProvinceRow = DB_fetch_row($result); - $result = DB_query("SELECT COUNT(taxprovinceid) FROM locations + $result = DB_query("SELECT COUNT(taxprovinceid) FROM locations WHERE taxprovinceid='" .$TaxProvinceRow[0] . "'",$db); $TaxProvinceCount = DB_fetch_row($result); if ($TaxProvinceCount[0]==1){ /* if its the only location in this tax authority then delete the appropriate records in TaxAuthLevels */ - $result = DB_query("DELETE FROM taxauthrates + $result = DB_query("DELETE FROM taxauthrates WHERE dispatchtaxprovince='" . $TaxProvinceRow[0] . "'",$db); } @@ -352,7 +352,7 @@ locationname, taxprovinces.taxprovincename as description, managed - FROM locations INNER JOIN taxprovinces + FROM locations INNER JOIN taxprovinces ON locations.taxprovinceid=taxprovinces.taxprovinceid"; $result = DB_query($sql,$db); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tim...@us...> - 2012-01-19 10:17:32
|
Revision: 4808 http://web-erp.svn.sourceforge.net/web-erp/?rev=4808&view=rev Author: tim_schofield Date: 2012-01-19 10:17:22 +0000 (Thu, 19 Jan 2012) Log Message: ----------- Fix typing error in sql to check the existance of purchase orders before deletion Modified Paths: -------------- trunk/Locations.php Modified: trunk/Locations.php =================================================================== --- trunk/Locations.php 2012-01-19 10:15:26 UTC (rev 4807) +++ trunk/Locations.php 2012-01-19 10:17:22 UTC (rev 4808) @@ -36,7 +36,7 @@ $sql = "SELECT * FROM custbranch WHERE debtorno='" . $_POST['CashSaleCustomer'] . "' AND branchcode='" . $_POST['CashSaleBranch'] . "'"; - + $result = DB_query($sql,$db); if (DB_num_rows($result)==0){ $InputError = 1; @@ -71,7 +71,7 @@ cashsalebranch ='" . $_POST['CashSaleBranch'] . "', managed = '" . $_POST['Managed'] . "' WHERE loccode = '" . $SelectedLocation . "'"; - + $ErrMsg = _('An error occurred updating the') . ' ' . $SelectedLocation . ' ' . _('location record because'); $DbgMsg = _('The SQL used to update the location record was'); @@ -245,8 +245,8 @@ echo '<br />' . _('There are') . ' ' . $myrow[0] . ' ' . _('stock movements with this Location code'); } else { - $sql= "SELECT COUNT(*) FROM locstock - WHERE locstock.loccode='". $SelectedLocation . "' + $sql= "SELECT COUNT(*) FROM locstock + WHERE locstock.loccode='". $SelectedLocation . "' AND locstock.quantity !=0"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); @@ -255,7 +255,7 @@ prnMsg(_('Cannot delete this location because location stock records exist that use this location and have a quantity on hand not equal to 0'),'warn'); echo '<br /> ' . _('There are') . ' ' . $myrow[0] . ' ' . _('stock items with stock on hand at this location code'); } else { - $sql= "SELECT COUNT(*) FROM www_users + $sql= "SELECT COUNT(*) FROM www_users WHERE www_users.defaultlocation='" . $SelectedLocation . "'"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); @@ -264,7 +264,7 @@ prnMsg(_('Cannot delete this location because it is the default location for a user') . '. ' . _('The user record must be modified first'),'warn'); echo '<br /> ' . _('There are') . ' ' . $myrow[0] . ' ' . _('users using this location as their default location'); } else { - $sql= "SELECT COUNT(*) FROM bom + $sql= "SELECT COUNT(*) FROM bom WHERE bom.loccode='" . $SelectedLocation . "'"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); @@ -273,7 +273,7 @@ prnMsg(_('Cannot delete this location because it is the default location for a bill of material') . '. ' . _('The bill of materials must be modified first'),'warn'); echo '<br /> ' . _('There are') . ' ' . $myrow[0] . ' ' . _('bom components using this location'); } else { - $sql= "SELECT COUNT(*) FROM workcentres + $sql= "SELECT COUNT(*) FROM workcentres WHERE workcentres.location='" . $SelectedLocation . "'"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); @@ -282,7 +282,7 @@ prnMsg( _('Cannot delete this location because it is used by some work centre records'),'warn'); echo '<br />' . _('There are') . ' ' . $myrow[0] . ' ' . _('works centres using this location'); } else { - $sql= "SELECT COUNT(*) FROM workorders + $sql= "SELECT COUNT(*) FROM workorders WHERE workorders.loccode='" . $SelectedLocation . "'"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); @@ -291,7 +291,7 @@ prnMsg( _('Cannot delete this location because it is used by some work order records'),'warn'); echo '<br />' . _('There are') . ' ' . $myrow[0] . ' ' . _('work orders using this location'); } else { - $sql= "SELECT COUNT(*) FROM custbranch + $sql= "SELECT COUNT(*) FROM custbranch WHERE custbranch.defaultlocation='" . $SelectedLocation . "'"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); @@ -300,7 +300,7 @@ prnMsg(_('Cannot delete this location because it is used by some branch records as the default location to deliver from'),'warn'); echo '<br /> ' . _('There are') . ' ' . $myrow[0] . ' ' . _('branches set up to use this location by default'); } else { - $sql= "SELECT COUNT(*) FROM purchorders WHERE intostocklocation='" . $SelectedLocation . '"; + $sql= "SELECT COUNT(*) FROM purchorders WHERE intostocklocation='" . $SelectedLocation . "'"; $result = DB_query($sql,$db); $myrow = DB_fetch_row($result); if ($myrow[0]>0) { @@ -319,15 +319,15 @@ if (! $CancelDelete) { /* need to figure out if this location is the only one in the same tax province */ - $result = DB_query("SELECT taxprovinceid FROM locations + $result = DB_query("SELECT taxprovinceid FROM locations WHERE loccode='" . $SelectedLocation . "'",$db); $TaxProvinceRow = DB_fetch_row($result); - $result = DB_query("SELECT COUNT(taxprovinceid) FROM locations + $result = DB_query("SELECT COUNT(taxprovinceid) FROM locations WHERE taxprovinceid='" .$TaxProvinceRow[0] . "'",$db); $TaxProvinceCount = DB_fetch_row($result); if ($TaxProvinceCount[0]==1){ /* if its the only location in this tax authority then delete the appropriate records in TaxAuthLevels */ - $result = DB_query("DELETE FROM taxauthrates + $result = DB_query("DELETE FROM taxauthrates WHERE dispatchtaxprovince='" . $TaxProvinceRow[0] . "'",$db); } @@ -352,7 +352,7 @@ locationname, taxprovinces.taxprovincename as description, managed - FROM locations INNER JOIN taxprovinces + FROM locations INNER JOIN taxprovinces ON locations.taxprovinceid=taxprovinces.taxprovinceid"; $result = DB_query($sql,$db); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ice...@us...> - 2013-08-15 13:48:53
|
Revision: 6234 http://sourceforge.net/p/web-erp/reponame/6234 Author: icedlava Date: 2013-08-15 13:48:50 +0000 (Thu, 15 Aug 2013) Log Message: ----------- Correct typo in pattern for phone and fax input fields. Modified Paths: -------------- trunk/Locations.php Modified: trunk/Locations.php =================================================================== --- trunk/Locations.php 2013-08-15 09:31:29 UTC (rev 6233) +++ trunk/Locations.php 2013-08-15 13:48:50 UTC (rev 6234) @@ -577,11 +577,11 @@ </tr> <tr> <td>' . _('Telephone No') . ':' . '</td> - <td><input type="tel" name="Tel" pattern="[0-9\+\s]*]" value="' . $_POST['Tel'] . '" size="31" maxlength="30" /></td> + <td><input type="tel" name="Tel" pattern="[0-9\+\s]*" value="' . $_POST['Tel'] . '" size="31" maxlength="30" title="' . _('The phone number should consist of numbers, spaces or the + character') . '" /></td> </tr> <tr> <td>' . _('Facsimile No') . ':' . '</td> - <td><input type="tel" name="Fax" pattern="[0-9\+\s]*]" value="' . $_POST['Fax'] . '" size="31" maxlength="30" /></td> + <td><input type="tel" name="Fax" pattern="[0-9\+\s]*" value="' . $_POST['Fax'] . '" size="31" maxlength="30" title="' . _('The fax number should consist of numbers, spaces or the + character') . '"/></td> </tr> <tr> <td>' . _('Email') . ':' . '</td> |
From: <ice...@us...> - 2013-08-21 15:41:12
|
Revision: 6285 http://sourceforge.net/p/web-erp/reponame/6285 Author: icedlava Date: 2013-08-21 15:41:07 +0000 (Wed, 21 Aug 2013) Log Message: ----------- Allow parentheses in phone numbers eg (08) 1234 1234 Modified Paths: -------------- trunk/Locations.php Modified: trunk/Locations.php =================================================================== --- trunk/Locations.php 2013-08-21 15:17:25 UTC (rev 6284) +++ trunk/Locations.php 2013-08-21 15:41:07 UTC (rev 6285) @@ -577,11 +577,11 @@ </tr> <tr> <td>' . _('Telephone No') . ':' . '</td> - <td><input type="tel" name="Tel" pattern="[0-9\+\s]*" value="' . $_POST['Tel'] . '" size="31" maxlength="30" title="' . _('The phone number should consist of numbers, spaces or the + character') . '" /></td> + <td><input type="tel" name="Tel" pattern="[0-9\+\s\(\)]*" value="' . $_POST['Tel'] . '" size="31" maxlength="30" title="' . _('The phone number should consist of numbers, spaces, parentheses, or the + character') . '" /></td> </tr> <tr> <td>' . _('Facsimile No') . ':' . '</td> - <td><input type="tel" name="Fax" pattern="[0-9\+\s]*" value="' . $_POST['Fax'] . '" size="31" maxlength="30" title="' . _('The fax number should consist of numbers, spaces or the + character') . '"/></td> + <td><input type="tel" name="Fax" pattern="[0-9\+\s\(\)]*" value="' . $_POST['Fax'] . '" size="31" maxlength="30" title="' . _('The fax number should consist of numbers, parentheses, spaces or the + character') . '"/></td> </tr> <tr> <td>' . _('Email') . ':' . '</td> |
From: <te...@us...> - 2014-11-15 01:11:37
|
Revision: 6982 http://sourceforge.net/p/web-erp/reponame/6982 Author: tehonu Date: 2014-11-15 01:11:29 +0000 (Sat, 15 Nov 2014) Log Message: ----------- Location table sortable Modified Paths: -------------- trunk/Locations.php Modified: trunk/Locations.php =================================================================== --- trunk/Locations.php 2014-11-14 11:37:21 UTC (rev 6981) +++ trunk/Locations.php 2014-11-15 01:11:29 UTC (rev 6982) @@ -393,9 +393,9 @@ echo '<table class="selection">'; echo '<tr> - <th>' . _('Location Code') . '</th> - <th>' . _('Location Name') . '</th> - <th>' . _('Tax Province') . '</th> + <th class="ascending">' . _('Location Code') . '</th> + <th class="ascending">' . _('Location Name') . '</th> + <th class="ascending">' . _('Tax Province') . '</th> </tr>'; $k=0; //row colour counter |