<?php 
$submit_url = $file_name."?page=view_production"; 
$show_all_page = "page=view_production";
?>
<!-- search form -->
<form class="form-horizontal" action="<?php echo $submit_url;?>" method="post" name="search_form" id="search_form">
	<div class="card-body">
		<div class="row">
			<div class="col-lg-3 col-12 ">
				<label for="Invoice Number" class="control-label ">Customer</label>
				<?php echo $gsi->getCustomerListNew("customer",$customer,"100%",false,"form-control select2","",""); ?>
			</div>
			<div class="col-lg-3 col-12 hide">
				<label for="Invoice Number" class="control-label">Customer Reff.</label>
				<input type="text" class="form-control" id="" name="" value="" placeholder="Customer Reffrence" autocomplete="off">
			</div>
			<div class="col-lg-3 col-12">
				<label for="Name" class="control-label">Item No.</label>
				<input type="text" class="form-control" id="item_name" name="item_name" value="<?php echo $item_no;?>" placeholder="Item No." autocomplete="off">
			</div>
			<div style="clear:both;"></div>
			<div class="col-lg-4 col-12">
				<label for="Postcode" class="control-label">&nbsp;</label><br>
				<button type="submit" class="btn btn-success">Search
					<i class="fas fa-sync-alt fa-spin" style="display:none;" id="page_load_div"></i>
				</button>
				<button type="button" value="Show All" onclick="javascript:window.location='?<?php echo $show_all_page ?>'" class="btn btn-info">Clear</button>
			</div>
		</div>
	</div>
</form>
<?php if($can_view){ ?>
				<div style="margin-bottom: 10px; text-align: right;">
					<button id="bulkCreateOrders" class="btn btn-primary">
						<span class="btn-text">Bulk Create Work Orders</span>
						<span class="spinner-border spinner-border-sm" style="display: none;"></span>
					</button>
					<span id="bulkProgress" style="margin-left: 10px; display: none;"></span>
				</div>
				<?php } ?>
<!-- /.search form -->
<script type="text/javascript">
$(document).ready(function(){
	$('#search_form').submit(function(){
		$("#submit").attr("disabled", true);
		$('#page_load_div').show();
	});
});
</script>