From: <dai...@us...> - 2012-01-19 07:01:06
|
Revision: 4804 http://web-erp.svn.sourceforge.net/web-erp/?rev=4804&view=rev Author: daintree Date: 2012-01-19 07:01:00 +0000 (Thu, 19 Jan 2012) Log Message: ----------- various Modified Paths: -------------- trunk/Locations.php trunk/Prices.php trunk/SelectOrderItems.php trunk/StockCheck.php trunk/doc/Change.log Modified: trunk/Locations.php =================================================================== --- trunk/Locations.php 2012-01-18 23:03:49 UTC (rev 4803) +++ trunk/Locations.php 2012-01-19 07:01:00 UTC (rev 4804) @@ -290,7 +290,7 @@ $CancelDelete = 1; 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 { + } else { $sql= "SELECT COUNT(*) FROM custbranch WHERE custbranch.defaultlocation='" . $SelectedLocation . "'"; $result = DB_query($sql,$db); @@ -299,6 +299,15 @@ $CancelDelete = 1; 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 . '"; + $result = DB_query($sql,$db); + $myrow = DB_fetch_row($result); + if ($myrow[0]>0) { + $CancelDelete = 1; + prnMsg(_('Cannot delete this location because it is used by some purchase order records as the location to receive stock into'),'warn'); + echo '<br /> ' . _('There are') . ' ' . $myrow[0] . ' ' . _('purchase orders set up to use this location as the receiving location'); + } } } } Modified: trunk/Prices.php =================================================================== --- trunk/Prices.php 2012-01-18 23:03:49 UTC (rev 4803) +++ trunk/Prices.php 2012-01-19 07:01:00 UTC (rev 4804) @@ -346,7 +346,7 @@ if(isset($_POST['Price'])) { echo $_POST['Price']; } - ?>"> + ?>" /> </td></tr> Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2012-01-18 23:03:49 UTC (rev 4803) +++ trunk/SelectOrderItems.php 2012-01-19 07:01:00 UTC (rev 4804) @@ -1593,6 +1593,7 @@ if ($j==1) { $jsCall = '<script type="text/javascript">if (document.SelectParts) {defaultControl(document.SelectParts.itm'.$myrow['stockid'].');}</script>'; } + $i++; $j++; #end of page full new headings if } Modified: trunk/StockCheck.php =================================================================== --- trunk/StockCheck.php 2012-01-18 23:03:49 UTC (rev 4803) +++ trunk/StockCheck.php 2012-01-19 07:01:00 UTC (rev 4804) @@ -31,8 +31,7 @@ '" . Date('Y-m-d') . "' FROM locstock, stockmaster - WHERE locstock.stockid=stockmaster.stockid and - locstock.loccode='" . $_POST['Location'] . "' AND + WHERE locstock.stockid=stockmaster.stockid AND locstock.loccode='" . $_POST['Location'] . "' AND stockmaster.categoryid>='" . $_POST['FromCriteria'] . "' AND stockmaster.categoryid<='" . $_POST['ToCriteria'] . "' AND stockmaster.mbflag!='A' AND @@ -212,8 +211,8 @@ INNER JOIN stockmaster ON stockmaster.stockid=bom.parent WHERE salesorders.fromstkloc='" . $_POST['Location'] . "' - AND salesorderdetails.quantity-salesorderdetails.qtyinvoiced > 0 AND - bom.component='" . $InventoryCheckRow['stockid'] . "' AND + AND salesorderdetails.quantity-salesorderdetails.qtyinvoiced > 0 + AND bom.component='" . $InventoryCheckRow['stockid'] . "' AND stockmaster.mbflag='A'"; $DemandResult = DB_query($sql,$db,'','',false,false); Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2012-01-18 23:03:49 UTC (rev 4803) +++ trunk/doc/Change.log 2012-01-19 07:01:00 UTC (rev 4804) @@ -1,5 +1,8 @@ webERP Change Log +19/1/12 Phil: Check on deletion of a location to see if any purchase orders exist prior to deletion +19/1/12 Phil:StockCheck.php fixed error in SQL two ANDs in calculating quantity demand reported by Ricard +19/1/12 Paul Harness: SelectOrderItems.php $i++ - in code for frequently ordered items. 17/1/12 Vitaly: Removed unused .table2 declaration from default.css. Fixed border settings in .table1. 16/1/12 Phil: Made StockReorderLevel.php just update changed fields rather than update all locations even though they may not have changed. 8/1/12 Phil: Added new api functions to get tax group taxes, list tax authorities, get tax authority details and get tax authority tax rates, also to list and get payment methods This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |