From: <ex...@us...> - 2014-02-17 03:44:55
|
Revision: 6581 http://sourceforge.net/p/web-erp/reponame/6581 Author: exsonqu Date: 2014-02-17 03:44:51 +0000 (Mon, 17 Feb 2014) Log Message: ----------- Exson: Tidy up variable overwrite to if else structure in WorkOrderReceive.php scripts according Tim's comments. Modified Paths: -------------- trunk/WorkOrderReceive.php trunk/doc/Change.log Modified: trunk/WorkOrderReceive.php =================================================================== --- trunk/WorkOrderReceive.php 2014-02-17 00:39:38 UTC (rev 6580) +++ trunk/WorkOrderReceive.php 2014-02-17 03:44:51 UTC (rev 6581) @@ -508,7 +508,8 @@ $QualityText =''; } - $SQL = "INSERT INTO stockserialitems (stockid, + if(empty($_POST['ExpiryDate'])){ + $SQL = "INSERT INTO stockserialitems (stockid, loccode, serialno, quantity, @@ -518,8 +519,7 @@ '" . $_POST['SerialNo' . $i] . "', 1, '" . $QualityText . "')"; - // Store expiry date for perishable product - if(!empty($_POST['ExpiryDate'])){ + }else{// Store expiry date for perishable product $SQL = "INSERT INTO stockserialitems(stockid, loccode, @@ -595,7 +595,8 @@ AND loccode = '" . $_POST['IntoLocation'] . "' AND serialno = '" . $_POST['BatchRef' .$i] . "'"; } else { - $SQL = "INSERT INTO stockserialitems (stockid, + if(empty($_POST['ExpiryDate'])){ + $SQL = "INSERT INTO stockserialitems (stockid, loccode, serialno, quantity, @@ -605,9 +606,9 @@ '" . $_POST['BatchRef' . $i] . "', '" . filter_number_format($_POST['Qty'.$i]) . "', '" . $_POST['QualityText'] . "')"; - //If it's a perishable product, add expiry date + - if(!empty($_POST['ExpiryDate'])){ + }else{ //If it's a perishable product, add expiry date $SQL = "INSERT INTO stockserialitems (stockid, loccode, Modified: trunk/doc/Change.log =================================================================== --- trunk/doc/Change.log 2014-02-17 00:39:38 UTC (rev 6580) +++ trunk/doc/Change.log 2014-02-17 03:44:51 UTC (rev 6581) @@ -1,5 +1,5 @@ webERP Change Log - +17/2/14 Exson: Tidy up variable overwrite to if else structure in WorkOrderReceive.php scripts according Tim's comments. 17/2/14 icedlava: CopyBOM.php - SQL fix for insert to bom and locstock tables - ensure column counts match values even when zero. 16/2/14 icedlava: StockCounts.php - Enter by Category only counts and enters 10 items maximum - fix to allow any number that are input. 15/2/14 Exson: Make perishable control available in WorkOrderReceive.php. |