Skip to content

Instantly share code, notes, and snippets.

@ErMandeep
Created November 10, 2020 10:19
Show Gist options
  • Save ErMandeep/6928198cfd3755fa0df9f86c894b8768 to your computer and use it in GitHub Desktop.
Save ErMandeep/6928198cfd3755fa0df9f86c894b8768 to your computer and use it in GitHub Desktop.
invLevelSearchForAll.php
<div class="portlet">
<div class="portlet-body">
<div class="">
<!--<div class="span12s m-l-10 m-r-10">-->
<form id="lowStockForm" action="<?php echo make_admin_url('inventory_updated', 'inventory_levels', 'inventory_levels'); ?>" >
<!-- <input type="hidden" name="Page" value="inventory_updated"/>
<input type="hidden" name="action" value="inventory_levels"/>
<input type="hidden" name="section" value="inventory_levels"/>
<input type="hidden" name="stype" value="<?= $stype ?>"/>
-->
<div class="form-group">
<h4 class="col-md-2 no-left-padding control-label herb" for="name">Search </h4>
<div class="col-md-6 no-left-padding">
<input style="border: 1px solid black;" id="inventory_levels_serach" class="form-control" value="" name="searchlevels" >
</div>
<div class="col-md-2 no-left-padding">
<span class="span6 btn btn-sm green sub_btn_up" onclick="serachClick();" ><i class="icon-search"></i> <a href="<?php echo make_admin_url('inventory_updated', 'inventory_levels', 'inventory_levels'); ?>" style="color: #fff;"> Search </a></span>
<!--button name="" class="span6 btn btn-sm green sub_btn_up"><i class="icon-search"></i> Search</button-->
<a class="span6 btn btn-sm red sub_btn_up" onclick="resetData();" href="<?php echo make_admin_url('inventory_updated', 'inventory_levels', 'inventory_levels'); ?>">Reset</a>
<!-- <span class="col-md-5 no-left-padding btn btn-sm green sub_btn_up " style=""><i class="icon-search"></i> Search</span>
<span class="col-md-2 no-left-padding">&nbsp;</span>
<span class="col-md-5 no-left-padding btn btn-sm red sub_btn_up"> <a style="color:#fff;" href="<?php //echo make_admin_url('inventory_updated', 'inventory_levels', 'inventory_levels'); ?>" >Reset</a></span> -->
</div>
</div><br>
<div class='report_filter_div'>
<div class="col-md-2 no-left-padding">
<!-- <label class="control-label" for="herb_type">Select Products </label> -->
<div class="input-group blockDisplay">
<select name="product[]" id="herb_cat1" onchange="filterChanges();" class="form-control chosen-select" data-placeholder="Item Type" multiple="">
<option></option>
<option value='product'>Product</option>
<option value='premix'>Premix Formulas</option>
<option value='granules'>Granules</option>
<option value='tinctures'>Tinctures</option>
<option value='raw'>Raw</option>
<option value='concentrates'>Concentrates</option>
</select>
</div>
</div>
<div class="col-md-2 no-left-padding">
<!-- <label class="control-label" for="herb_type">Select Product Category</label> -->
<div class="input-group blockDisplay">
<select name="pro_cat[]" id="pro_cat1"
class="form-control chosen-select" onchange="filterChanges();" data-placeholder="Product Category" multiple="">
<option ></option>
<?php
foreach ($products as $kk => $cat):
$QueryObj = new category();
$categories = $QueryObj->listRecursiveCategorySelectBoxOptionsWithMultipleSelect($cat->id, 1, $_REQUEST['products']);
endforeach;
?>
</select>
</div>
</div>
<div class="col-md-2 no-left-padding">
<!-- <label class="control-label" for="herb_type">Select Herb Category</label> -->
<div class="input-group blockDisplay">
<select name="herb_cat[]" id="herb_cat123" onchange="filterChanges();" class="form-control chosen-select" data-placeholder="Herb Category" multiple="">
<option ></option>
<?php
foreach ($herbs as $kk => $cat):
$QueryObj = new category();
$categories = $QueryObj->listRecursiveCategorySelectBoxOptionsWithMultipleSelect($cat->id, 1, $_REQUEST['herbs']);
endforeach;
// foreach ($herbs as $k => $h):?>
<!-- // <option value='<?= $h->id ?>' <?= ($_REQUEST['herbs']== $h->id)?'selected':'' ?>><?= ucfirst($h->name) ?></option> -->
<?php //endforeach;
?>
</select>
</div>
</div>
<div class="col-md-2 no-left-padding">
<select style="border: 1px solid black !important; " name="lowstock" id="lowstock" onchange="filterChanges();" class="form-control " >
<option value=''>Inventory Level</option>
<option value='no_inv'>No Inventory</option>
<option value='haveInv'>Have Inventory</option>
<option value='lowInv'>Low Stock</option>
<option value='highInv'>High Stock</option>
</select>
</div>
</div>
<div class="col-md-2 no-left-padding">
<!-- <label class="control-label" for="category">Select Suppliers</label> -->
<div class="input-group blockDisplay">
<select name="supplier[]" id="supplier" onchange="filterChanges();" class="form-control chosen-select" data-placeholder="Suppliers" multiple="">
<option></option>
<?php
if (!empty($suppliers)):
foreach ($suppliers as $kk => $sup):
?>
<option value='<?= $sup['id'] ?>' <?= in_array($kk,$_REQUEST['supplier']) ? "selected":'' ?> > <?= ucfirst($sup['name']) ?> </option >
<!-- <option value='<?= $sup['id'] ?>'><?= ucfirst($sup['name']) ?></option> -->
<?php
endforeach;
endif;
?>
</select>
</div>
</div>
<!-- <div class="span2 m-l-15"> -->
<!-- <label class="control-label" for="category">Select Suppliers</label> -->
<!-- <div class="input-group blockDisplay">
<select name="expire_date[]" id="expire_date" onchange="inventoryUpdatedlevels();" class="form-control chosen-select" data-placeholder="Expiry Date" multiple=""> -->
<!-- <option value=''>Select Expire date</option>
<option value='expire_date'>Expire date</option>
</select>
</div>
</div> -->
<input type="hidden" value=" " name="lengthMenuofSearchREcords" class="lenghtMenuofSearchREcords">
<input type="hidden" value=" " name="paginationherb" class="paginationherb">
<input type="hidden" value=" " name="order" class="order">
<input type="hidden" value=" " name="orderby" class="orderby">
<div class="col-md-2 no-left-padding">
<span class="sub_btn_down"></span>
</div>
<div class='clear'></div>
</div>
</form>
<div class="clearfix"></div>
<br/>
<!-- <div class="table-container"> -->
<!-- <span class="btn yellow dwnd_btn" onclick="downloadLevelData()" id="download_csv" ><i class='icon-download'></i> Download CSV</span> -->
<!-- <div id="ajax_data">
<div class="lengthrow">
Show
<select onchange="changeLengthMenu(this.value)" name="aajx_length" aria-controls="" class="33" id="aajx_length">
<option value='10' <?php if(isset($_REQUEST['aajx_length']) && $_REQUEST['aajx_length'] == '10'){ echo 'selected'; }else { echo "";} ?>>10</option>
<option value='50' <?php if(isset($_REQUEST['aajx_length']) && $_REQUEST['aajx_length'] == '50'){ echo 'selected'; }else { echo "";} ?>>50</option>
<option value='100' <?php if(isset($_REQUEST['aajx_length']) && $_REQUEST['aajx_length'] == '100'){ echo 'selected'; }else { echo "";} ?>>100</option>
<option value='200' <?php if(isset($_REQUEST['aajx_length']) && $_REQUEST['aajx_length'] == '200'){ echo 'selected'; }else { echo "";} ?>>200</option>
<option value='300' <?php if(isset($_REQUEST['aajx_length']) && $_REQUEST['aajx_length'] == '300'){ echo 'selected'; }else { echo "";} ?>>300</option>
<option value='500' <?php if(isset($_REQUEST['aajx_length']) && $_REQUEST['aajx_length'] == '500'){ echo 'selected'; }else { echo "";} ?>>500</option>
<option value='1000' <?php if(isset($_REQUEST['aajx_length']) && $_REQUEST['aajx_length'] == '1000'){ echo 'selected'; }else { echo "";} ?>>1000</option>
</select> records
</div>
<br>
<div class='text-center'>
<img src="assets/img/loading_new.gif"/><br/>
<h3>Loading...!</h3>
</div>
</div>
--> <!-- </div> -->
<div class="modal fade" id="inventoryLot" tabindex="-1" role="dialog" aria-labelledby="myinventoryLot" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class='ajaxLotResponse'>
<div class='text-center'>
<img src="assets/img/loading_new.gif"/><br/>
<h3>Loading...!</h3>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-sm" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment