From: <dai...@us...> - 2012-06-10 03:40:06
|
Revision: 5434 http://web-erp.svn.sourceforge.net/web-erp/?rev=5434&view=rev Author: daintree Date: 2012-06-10 03:40:00 +0000 (Sun, 10 Jun 2012) Log Message: ----------- reverse category change field changes Modified Paths: -------------- trunk/Stocks.php trunk/sql/mysql/upgrade4.07-4.08.sql Modified: trunk/Stocks.php =================================================================== --- trunk/Stocks.php 2012-06-10 01:08:21 UTC (rev 5433) +++ trunk/Stocks.php 2012-06-10 03:40:00 UTC (rev 5434) @@ -1,6 +1,6 @@ <?php -//* $Id$ */ +/* $Id$ */ include('includes/session.inc'); $title = _('Item Maintenance'); @@ -225,8 +225,7 @@ serialised, materialcost+labourcost+overheadcost AS itemcost, stockcategory.stockact, - stockcategory.wipact, - stockmaster.categoryid + stockcategory.wipact FROM stockmaster INNER JOIN stockcategory ON stockmaster.categoryid=stockcategory.categoryid @@ -239,7 +238,6 @@ $UnitCost = $myrow[3]; $OldStockAccount = $myrow[4]; $OldWIPAccount = $myrow[5]; - $OldCategoryId = $myrow[6]; $sql = "SELECT SUM(locstock.quantity) @@ -366,11 +364,8 @@ controlled='" . $_POST['Controlled'] . "', serialised='" . $_POST['Serialised']."', perishable='" . $_POST['Perishable']."', - categoryid='" . $_POST['CategoryID'] . "', "; - if ($OldCategoryId != $_POST['CategoryID']){ - $sql = $sql . "lastcategoryupdate='" . date('Y-m-d') . "', "; - } - $sql = $sql . "units='" . $_POST['Units'] . "', + categoryid='" . $_POST['CategoryID'] . "', + units='" . $_POST['Units'] . "', mbflag='" . $_POST['MBFlag'] . "', eoq='" . filter_number_format($_POST['EOQ']) . "', volume='" . filter_number_format($_POST['Volume']) . "', @@ -512,9 +507,8 @@ DB_Txn_Commit($db); prnMsg( _('Stock Item') . ' ' . $StockID . ' ' . _('has been updated'), 'success'); echo '<br />'; - } + } - } else { //it is a NEW part //but lets be really sure here $result = DB_query("SELECT stockid @@ -528,7 +522,6 @@ description, longdescription, categoryid, - lastcategoryupdate, units, mbflag, eoq, @@ -548,7 +541,6 @@ '" . $_POST['Description'] . "', '" . $_POST['LongDescription'] . "', '" . $_POST['CategoryID'] . "', - '" . date('Y-m-d') . "', '" . $_POST['Units'] . "', '" . $_POST['MBFlag'] . "', '" . filter_number_format($_POST['EOQ']) . "', Modified: trunk/sql/mysql/upgrade4.07-4.08.sql =================================================================== --- trunk/sql/mysql/upgrade4.07-4.08.sql 2012-06-10 01:08:21 UTC (rev 5433) +++ trunk/sql/mysql/upgrade4.07-4.08.sql 2012-06-10 03:40:00 UTC (rev 5434) @@ -122,7 +122,5 @@ INSERT INTO scripts (script, pagesecurity, description) VALUES ('NoSalesItems.php', '2', 'Shows the No Selling (worst) items'); -ALTER TABLE stockmaster ADD lastcategoryupdate DATE NOT NULL DEFAULT '0000-00-00' AFTER categoryid; - UPDATE config SET confvalue='4.08' WHERE confname='VersionNumber'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |