<?php
if(!isset($_SESSION)) 
{ 
session_start(); 
} 
if(!isset($_SESSION['is_login']) ){
header("location: login.php");
?>
<script>
window.location="login.php";
</script>
<?php
}

// $permission  = explode(',',$_SESSION['permission_id']);
// if(!in_array(19,$permission) && !in_array(1,$permission)  ){

// $op['is_success'] = false;
// $op['data'] 	  = "عذرا انت غير مخول للوصل الى هذه الصفحة";
// echo json_encode($op);
// exit;

// }

date_default_timezone_set($_SESSION['SYSTimezone']);
?>
<script type="text/javascript" src="assets/js/plugins/pickers/pickadate/picker.js"></script>
<script type="text/javascript" src="assets/js/plugins/pickers/pickadate/picker.date.js"></script>
<script type="text/javascript" src="assets/js/plugins/pickers/pickadate/picker.time.js"></script>
<script type="text/javascript" src="assets/js/plugins/pickers/pickadate/legacy.js"></script>
<style >
	.daterangepicker {
	    z-index: 1100 !important;
	}
</style>

<div id="account_statment_modal" class="modal fade" >
		<div class="modal-dialog modal-lg">
		<form class="form-horizontal"  name="account_statement_form" method="post" id="account_statement_form" enctype="multipart/form-data">
			<input type="hidden" id="access_token" name="access_token"  value="">
			<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"> <i class="icon-bag"></i><span class="multi_lang">كشوفات الحسابات</span>  </h4>
				</div>

				<div class="modal-body">
					<?php
						$permission  = explode(',',$_SESSION['permission_id']);
						if(!in_array(23,$permission) && !in_array(1,$permission) ){
					?>
					<h1 class="text-center"> <i style="font-size:30" class="icon-warning22 text-warning"></i> <span class="multi_lang">عذرا انت غير مخول لرؤية كشوفات الحساب</span>  </h1>
					<?php

						}else{
					?>
					

						<div class="row">
							<div class=" has-feedback has-feedback-left col-sm-4">
								<label class="control-label multi_lang">اسم الزبون</label>
								
								<select class="form-control multi_lang" data-live-search="true"  name="a_s_customer_name" id="a_s_customer_name" data-width="100%" placeholder="اسم الزبون">
									<option class="multi_lang" value="">جميع الزبائن</option>
								</select>
								<div class="form-control-feedback">
									<i class="icon-user-tie text-muted"></i>
								</div>
							</div>
							<div class=" has-feedback has-feedback-left col-sm-3">
								<label class="control-label multi_lang">رقم الوصل</label>
								
								<select class="form-control multi_lang" data-live-search="true"  name="a_s_inv_no" id="a_s_inv_no" data-width="100%" placeholder="رقم الوصل">
									<option class="multi_lang" value="">جميع الوصولات</option>
								</select>
								<div class="form-control-feedback">
									<i class="icon-hash text-muted"></i>
								</div>
							</div>
							<div class=" has-feedback has-feedback-left col-sm-2">
								<label class="control-label multi_lang">عمليات التاريخ</label>
								
								<select class="form-control multi_lang"  name="a_s_date_operation" id="a_s_date_operation" data-width="100%" placeholder="عمليات التاريخ">
									<option class="multi_lang" value="">الكل</option>
									<option class="multi_lang" value="E">يساوي</option>
									<option class="multi_lang" value="L">اصغر من</option>
									<option class="multi_lang" value="G">اكبر من</option>
									<option class="multi_lang" value="B">بين تاريخين</option>
									<option class="multi_lang" value="Y">سنوي</option>
									<option class="multi_lang" value="M">شهري</option>
									<option class="multi_lang" value="W">اسبوعي</option>
								</select>
								<div class="form-control-feedback">
									<i class="icon-cog4 text-muted"></i>
								</div>
							</div>

							<div class=" has-feedback has-feedback-left col-sm-3">
								<label class="control-label multi_lang">التاريخ</label>
								
								<input type="text" placeholder="التاريخ" class="form-control multi_lang pickadate-selectors" name="a_s_date" id="a_s_date" >
								<div class="form-control-feedback">
									<i class="icon-calendar52 text-muted"></i>
								</div>
							</div>

							
						</div>

						<div class="row">
							
							

							<div class=" has-feedback has-feedback-left col-sm-3">
								<label class="control-label multi_lang">التاريخ الثاني</label>
								
								<input type="text" placeholder="التاريخ الثاني" class="form-control multi_lang pickadate-selectors" name="a_s_date2" id="a_s_date2" >
								<div class="form-control-feedback">
									<i class="icon-calendar52 text-muted"></i>
								</div>
							</div>

							<div class=" pull-right col-sm-3">
								<button type="button" id="a_s_filter_btn_modal" class="btn bg-teal-400 btn-labeled legitRipple" style="margin-top: 25px; width: 100%;"><b><i class="icon-filter3"></i></b><span class="multi_lang">فلترة</span>  </button>
							</div>

							
						</div>
						
						<br>

						<div id="account_statment_modal_div">
							
							
							
						</div>
					<?php

						}
					?>

				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-warning" data-dismiss="modal"> <span class="multi_lang">اغلاق</span>
					</button>
				</div>
			</div>
		</form>
	</div>
</div>

