<?php require_once('../auth/auth.php');?>
<?php 
  $acid = $_GET['acid'];
 ?>
<section class="content">
 <div class="container-fluid">
  <div class="row">
  	<div class="col-md-1"></div>
    <div class="col-md-10">
      <div class="card card-primary card-outline direct-chat direct-chat-primary shadow-none" style="border-left:1px solid #969c9d;border-right:1px solid #969c9d;border-bottom:1px solid #969c9d;">
        <div class="card-header" style="padding: 3px 8px;text-align: center;">
        <h3 class="card-title"  >   <?php echo  language(212) .' '. language(68); ?></h3>
          <div class="card-tools">
            <button type="button" class="btn btn-tool" data-card-widget="remove">
              <i class="fas fa-times"></i>
            </button>
          </div>
        </div>


        <form id="search_form" action="#" method="post" autocomplete="off">
        	<input type="hidden" name="acid" value="<?php echo $acid;?>">
        	<div class="card-body">
        		<div class="col-md-12">
        			<div class="row">

                <div class="col-md-1"> </div>
        				<div class="col-md-4">
        					<div class="form-group">
        					 <center>   <label> <?php echo language(257);?></label></center>
        						<input type="text" name="fdate" class="form-control form-control-sm" onmouseover="lcdate(this)" style="text-align:center;" readonly="true" required="true"value="<?php echo $date;?>">
        					</div>
        				</div>
        				<div class="col-md-4">
        					<div class="form-group">
        					 <center> <label><?php echo language(258);?></label>  </center> 
        						<input type="text" name="edate" class="form-control form-control-sm" onmouseover="lcdate(this)" style="text-align:center;" readonly="true" required="true" value="<?php echo $date;?>">
        					</div>
        				</div>

                <div class="col-md-3" style="margin-top:19px;">
                    <div class="form-group">
                       <button type="submit" id="save" class="btn btn-success btn-xs"><?php echo language(68); ?></button>
                  </div>
                </div>

        			</div>
        		</div>
        	</div>
        </form>



       </div> 
     </div>
     <div class="col-md-1"></div>
   </div>
 </div>
</section>


<script>
$(document).ready(function() {
$('#search_form').on('submit', function(e){
$('#save').prop('disabled', true);
$('#save').html('<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span> '+'Loading...');
e.preventDefault();
     $(".preloader").css('display','flex');  
     $('#pview<?php echo $acid?>').load("../accounts/ledger_view.php",$(this).serialize(),function() {
     $('#save').prop('disabled', false);
     $('.preloader').hide();
   });
  });
});  
</script>