
<style >
	
	.filter_btn {
        padding: 5px;
        margin: 10px;
	}

	
	.top-scrollerx {
		position: fixed;
	    bottom: 100px;
	    font-size: 1em;
	    display: none;
	    z-index: 999;
	    text-align: center;
	    cursor: pointer;
	    height: 50px;
	    width: 50px;
	    border-radius: 50%;
	    background: rgb(37 171 219);
	    color: #fff;
	    line-height: 40px;

	}

	html[dir="rtl"] .top-scrollerx{
	    left: 10px;
	}

	html[dir="ltr"] .top-scrollerx{
	    right: 10px;
	}

 	.top-scrollerx:hover {
    	background: rgb(219 37 157);
	}
</style>



<div id="add_form_cont" class="modal fade" style="display: none;">
	<div class="modal-dialog modal-full">
		<form class="form-horizontal"  name="add_form" method="post" id="add_form" enctype="multipart/form-data">
			

			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"><i class="icon-cross"></i></button>
					<h4 class="modal-title multi_lang">Cart</h4>
				</div>

				<div class="modal-body">

					<div class="col-sm-12">

						<div class="form-group">

							<div class="form-group has-feedback has-feedback-left col-sm-12">
								<label class="control-label  multi_lang">اسم الزبون</label>
								
								<select class="form-control multi_lang stop_enter" data-live-search="true" name="customer_id_fk" id="customer_id_fk" data-width="100%" required="required" tabindex="">

								</select>
								
							</div>

							


							<input type="hidden" name="invoice_type" id="invoice_type" value="4">
							<input type="hidden" name="invoice_transaction" id="invoice_transaction" value="Invoice">
							
							

							

							

							
						</div>

						<div class="form-group">
							<div class="table-responsive1">
								<table  class="table col-sm-12 table-bordered .table-sm">
									<thead>
										<tr class="alpha-success ">
											<th>#</th>
											<th class="multi_lang">المادة</th>
											<th class="multi_lang">الكمية</th>
											<th class="multi_lang">سعر الوحدة</th>
											<th class="multi_lang">تخفيضات</th>
											<th class="multi_lang">الكلفة الاجمالية</th>
											<th class="multi_lang">ملاحظة</th>
											<th></th>
										</tr>
									</thead>
									<tbody id="add_table" >
										
										
									</tbody>
									<tfoot>
										
										

										<tr class="alpha-primary">
											<th colspan="2" class="multi_lang">GRAND TOTAL</th>
											
											<th></th>
											<th></th>
											<th></th>
											<th >
												<input id="grand_total" name="grand_total" type="text" value="0" class="form-control text-center text-black text-size-large " readonly="readonly" style="height: 25px;">
											</th>
											<th></th>
											
											<th><i  class="icon-cash "></i></th>
										</tr>

										
									</tfoot>
								</table>
							</div>

						</div>

						

					</div>
				</div>
				<div class="modal-footer">
					<button type="submit" id="submit_add_btn" class="btn btn-labeled btn-labeled-left heading-btn btn-primary"> <span class="multi_lang">Save</span> <b><i class="icon-floppy-disk"></i></b>
					</button>
					<button type="button" class="btn btn-warning" data-dismiss="modal"> <span class="multi_lang">Cancel</span>
					</button>
				</div>
			</div>
		</form>
	</div>
</div>

<div id="add_damage_form_cont" class="modal fade" style="display: none;">
	<div class="modal-dialog modal-lg">
		<form class="form-horizontal"  name="add_damage_form" method="post" id="add_damage_form" enctype="multipart/form-data">
			

			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"><i class="icon-cross"></i></button>
					<h4 class="modal-title multi_lang">  اضافة الكمية التالفة </h4>
					<h4 class="modal-title text-success"><span class="multi_lang">الكمية المتوفرة</span>  : <span class="on_hand_qty text-black text-danger"></span> </h4>
				</div>

				<div class="modal-body">
						<input type="hidden" name="id_damage" id="id_damage" value="">
						<input type="hidden" name="on_hand_qty_damage" id="on_hand_qty_damage" value="">

						<div>


							<div class="col-sm-12">
								<div class="form-group">
									
									<div class="col-sm-4">
										<div class="input-group">
											<label class="input-group-addon multi_lang">  المخزن </label>
											<select name="stock_id_damage" id="stock_id_damage" class="form-control stock_class multi_lang" required="required">
													
											</select>
										</div>
									</div>

									<div class="col-sm-4">
										<div class="input-group">
											<label class="input-group-addon multi_lang"> الكمية التالفة </label>
											<input type="number" name="damage_qty" id="damage_qty" class="form-control multi_lang" required="required" placeholder=" الكمية التالفة" >

										</div>
									</div>

									<div class="col-sm-4">
										<div class="input-group">
											<label class="input-group-addon multi_lang"> السبب </label>
											<input type="text" name="damage_resons" id="damage_resons" class="form-control multi_lang"  placeholder=" السبب" >

										</div>
									</div>

								</div>

								

							</div>
						</div>
				</div>
				<div class="modal-footer">
					<button type="submit" id="btn_damage" class="btn btn-labeled btn-labeled-left heading-btn btn-primary"> <span class="multi_lang">حفظ</span> <b><i class="icon-floppy-disk"></i></b>
					</button>
					<button type="button" class="btn btn-warning" data-dismiss="modal"> <span class="multi_lang">الغاء</span>
					</button>
				</div>
			</div>
		</form>
	</div>
</div>


<div id="add_expire_form_cont" class="modal fade" style="display: none;">
	<div class="modal-dialog modal-lg">
		<form class="form-horizontal"  name="add_expire_form" method="post" id="add_expire_form" enctype="multipart/form-data">
			

			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"><i class="icon-cross"></i></button>
					<h4 class="modal-title multi_lang">  اضافة كمية منتهية الصلاحية </h4>
					<h4 class="modal-title text-success"><span class="multi_lang">الكمية المتوفرة</span>  : <span class="on_hand_qty text-black text-danger"></span> </h4>
				</div>

				<div class="modal-body">
						<input type="hidden" name="id_expire" id="id_expire" value="">
						<input type="hidden" name="on_hand_qty_expire" id="on_hand_qty_expire" value="">

						<div>


							<div class="col-sm-12">
								<div class="form-group">
									
									<div class="col-sm-4">
										<div class="input-group">
											<label class="input-group-addon multi_lang">  المخزن </label>
											<select name="stock_id_expire" id="stock_id_expire" class="form-control stock_class multi_lang" required="required">
													
											</select>
										</div>
									</div>

									<div class="col-sm-4">
										<div class="input-group">
											<label class="input-group-addon multi_lang"> الكمية المنتهية الصلاحية </label>
											<input type="number" name="expire_qty" id="expire_qty" class="form-control multi_lang" required="required" placeholder=" الكمية المنتهية الصلاحية" >

										</div>
									</div>

									<div class="col-sm-4">
										<div class="input-group">
											<label class="input-group-addon multi_lang"> السبب </label>
											<input type="text" name="expire_resons" id="expire_resons" class="form-control multi_lang"  placeholder=" السبب" >

										</div>
									</div>

								</div>

								

							</div>
						</div>
				</div>
				<div class="modal-footer">
					<button type="submit" id="btn_expire" class="btn btn-labeled btn-labeled-left heading-btn btn-primary"> <span class="multi_lang">حفظ</span> <b><i class="icon-floppy-disk"></i></b>
					</button>
					<button type="button" class="btn btn-warning" data-dismiss="modal"> <span class="multi_lang">الغاء</span>
					</button>
				</div>
			</div>
		</form>
	</div>
</div>

<div id="production_form_cont" class="modal fade" style="display: none;">
	<div class="modal-dialog modal-lg">
		<form class="form-horizontal"  name="production_form" method="post" id="production_form" enctype="multipart/form-data">
			

			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"><i class="icon-cross"></i></button>
					<h4 class="modal-title multi_lang">  اضافة الكمية او الطول المستخدم في الانتاج </h4>
					<h4 class="modal-title text-success"><span class="multi_lang">الكمية المتوفرة</span>  : <span class="on_hand_qty text-black text-danger"></span> </h4>
				</div>

				<div class="modal-body">
						<input type="hidden" name="id_production" id="id_production" value="">
						<input type="hidden" name="on_hand_qty_used" id="on_hand_qty_used" value="">

						<div>


							<div class="col-sm-12">
								<div class="form-group">
									
									<div class="col-sm-6">
										<div class="input-group">
											<label class="input-group-addon multi_lang">  المخزن </label>
											<select name="stock_id_used" id="stock_id_used" class="form-control stock_class multi_lang" required="required">
													
											</select>
										</div>
									</div>

									<div class="col-sm-6">
										<div class="input-group">
											<label class="input-group-addon multi_lang"> الكمية المستخدمة (الطول) </label>
											<input type="text" name="used_length" id="used_length" class="form-control multi_lang" required="required" placeholder=" الكمية المستخدمة" >

										</div>
									</div>

									<!-- <div class="col-sm-4">
										<div class="input-group">
											<label class="input-group-addon multi_lang"> السبب </label>
											<input type="text" name="used_resons" id="used_resons" class="form-control multi_lang"  placeholder=" السبب" >

										</div>
									</div> -->

								</div>

								

							</div>
						</div>
				</div>
				<div class="modal-footer">
					<button type="submit" id="btn_used" class="btn btn-labeled btn-labeled-left heading-btn btn-primary"> <span class="multi_lang">حفظ</span> <b><i class="icon-floppy-disk"></i></b>
					</button>
					<button type="button" class="btn btn-warning" data-dismiss="modal"> <span class="multi_lang">الغاء</span>
					</button>
				</div>
			</div>
		</form>
	</div>
</div>



		
		<!-- Individual column searching (text inputs) -->
		<div class="panel panel-flat">

				<div class="form-group col-sm-12">

					<div class="form-group has-feedback has-feedback-left col-sm-6">
						
						<select class="form-control multi_lang stop_enter" data-live-search="true" name="main_customer_id_fk" id="main_customer_id_fk" data-width="100%" required="required" tabindex="">

						</select>
						
					</div>

					<div class="form-group has-feedback has-feedback-left col-sm-6">
						
						<select class="form-control multi_lang stop_enter" data-live-search="true" name="product_id" id="product_id" data-width="100%" required="required" tabindex="">

						</select>
						
					</div>

					<div class="form-group   col-sm-6">
							
							<span class=" text-black text-size-large pull-right" id="totals"></span>
						
					</div>
				
					<!-- <button class="btn btn-labeled btn-labeled-left heading-btn btn-primary pull-right" onclick="show_cart();">
						<span class="multi_lang">Show Cart</span><b><i class="icon-cart-add"></i></b>
					</button> -->
				</div>

						


				<div class="col-sm-12" id="branch_filter1">
					
				</div>	

				<div class="col-sm-12" id="stock_filter">
					
				</div>	

				<div class="col-sm-12" id="supplier_filter">
					
				</div>

				

			
			
		</div>
		<!-- /individual column searching (text inputs) -->

		<div id="products_card" class="row">
			<ul id="product_list" class="media-list">


			</ul>	
		</div>
		
<!-- for Scrolling -->
<div class="top-scrollerx js-top-scrollerx svg-icons">
   <span class="badge badge-danger cart-count pull-right">0</span>

   <i class="icon-cart-add icon-2x" style="top: -8px;"></i>
</div>

<script>
	
	$('.js-top-scrollerx').fadeIn();

	$(window).scroll(function(){

	  if ($(this).scrollTop() > 10) {
	    
	    // $('.js-top-scrollerx').fadeIn();
	  } else {
	    // $('.js-top-scrollerx').fadeOut();
	  }
	});
	//Click event to scroll to top
	$('.js-top-scrollerx').click(function(){
	  $('html, body').animate({scrollTop : 0},1000);
	  show_cart();
	  return false;
	});

</script>
				


<script type="text/javascript" src="controllers/order.js?random=<?php echo uniqid(); ?>"></script>