From: <ex...@us...> - 2013-11-07 11:16:26
|
Revision: 6397 http://sourceforge.net/p/web-erp/reponame/6397 Author: exsonqu Date: 2013-11-07 11:16:22 +0000 (Thu, 07 Nov 2013) Log Message: ----------- 7/11/2013 Exson: Add check box to allow user to decide weather raw material is sellable or not. Modified Paths: -------------- trunk/SelectOrderItems.php Modified: trunk/SelectOrderItems.php =================================================================== --- trunk/SelectOrderItems.php 2013-11-07 08:15:32 UTC (rev 6396) +++ trunk/SelectOrderItems.php 2013-11-07 11:16:22 UTC (rev 6397) @@ -623,8 +623,9 @@ <td>' . _('Part of the Branch Phone Number') . ':</td> <td><input tabindex="3" type="text" name="CustPhone" size="15" maxlength="18" title="' . _('Enter a part of a customer\'s phone number that you wish to search for then click the Search Now button to find matching customers') . '"/></td> </tr> + </table> - <br /> + <div class="centre"> <input tabindex="4" type="submit" name="SearchCust" value="' . _('Search Now') . '" /> <input tabindex="5" type="submit" name="reset" value="' . _('Reset') . '" /> @@ -749,6 +750,11 @@ } $msg =''; if (isset($_POST['Search']) OR isset($_POST['Next']) OR isset($_POST['Previous'])){ + if(!empty($_POST['RawMaterialFlag'])){ + $RawMaterialSellable = " OR stockcategory.stocktype='M'"; + }else{ + $RawMaterialSellable = ''; + } if ($_POST['Keywords']!='' AND $_POST['StockCode']=='') { $msg='<div class="page_help_text">' . _('Order Item description has been used in search') . '.</div>'; @@ -769,7 +775,7 @@ stockmaster.units FROM stockmaster INNER JOIN stockcategory ON stockmaster.categoryid=stockcategory.categoryid - WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D' OR stockcategory.stocktype='L') + WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D' OR stockcategory.stocktype='L'".$RawMaterialSellable.") AND stockmaster.mbflag <>'G' AND stockmaster.description " . LIKE . " '" . $SearchString . "' AND stockmaster.discontinued=0 @@ -781,7 +787,7 @@ stockmaster.units FROM stockmaster INNER JOIN stockcategory ON stockmaster.categoryid=stockcategory.categoryid - WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D' OR stockcategory.stocktype='L') + WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D' OR stockcategory.stocktype='L'".$RawMaterialSellable.") AND stockmaster.mbflag <>'G' AND stockmaster.discontinued=0 AND stockmaster.description " . LIKE . " '" . $SearchString . "' @@ -801,7 +807,7 @@ stockmaster.units FROM stockmaster INNER JOIN stockcategory ON stockmaster.categoryid=stockcategory.categoryid - WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D' OR stockcategory.stocktype='L') + WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D' OR stockcategory.stocktype='L'".$RawMaterialSellable.") AND stockmaster.stockid " . LIKE . " '" . $SearchString . "' AND stockmaster.mbflag <>'G' AND stockmaster.discontinued=0 @@ -813,7 +819,7 @@ stockmaster.units FROM stockmaster INNER JOIN stockcategory ON stockmaster.categoryid=stockcategory.categoryid - WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D' OR stockcategory.stocktype='L') + WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D' OR stockcategory.stocktype='L'".$RawMaterialSellable.") AND stockmaster.stockid " . LIKE . " '" . $SearchString . "' AND stockmaster.mbflag <>'G' AND stockmaster.discontinued=0 @@ -829,7 +835,7 @@ stockmaster.units FROM stockmaster INNER JOIN stockcategory ON stockmaster.categoryid=stockcategory.categoryid - WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D' OR stockcategory.stocktype='L') + WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D' OR stockcategory.stocktype='L'".$RawMaterialSellable.") AND stockmaster.mbflag <>'G' AND stockmaster.discontinued=0 ORDER BY stockmaster.stockid"; @@ -840,7 +846,7 @@ stockmaster.units FROM stockmaster INNER JOIN stockcategory ON stockmaster.categoryid=stockcategory.categoryid - WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D' OR stockcategory.stocktype='L') + WHERE (stockcategory.stocktype='F' OR stockcategory.stocktype='D' OR stockcategory.stocktype='L'".$RawMaterialSellable.") AND stockmaster.mbflag <>'G' AND stockmaster.discontinued=0 AND stockmaster.categoryid='" . $_POST['StockCat'] . "' @@ -1691,7 +1697,9 @@ if (isset($_POST['StockCode'])) { echo $_POST['StockCode']; } - echo '" /></td> + echo '" /></td> + + <td><input type="checkbox" name="RawMaterialFlag" value="M" />'._('Raw material flag').' <br/><span class="dpTbl">'._('If checked, Raw material will be show on search result').'</span> </td> </tr>'; echo '<tr> |