<?php require_once('../auth/auth.php');?>
<section class="content">
 <div class="container-fluid">
  <div class="row">
  	<div class="col-md-3"></div>
    <div class="col-md-6">
      <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;">
          <h3 class="card-title">Trail Balance Search</h3>
          <div class="card-tools">
            <!-- <span title="3 New Messages" class="badge bg-primary">3</span> -->
            <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="bid" value="<?php echo $bid;?>">
          <input type="hidden" name="brid" value="<?php echo $brid;?>">
        	<div class="card-body">
        		<div class="col-md-12">
        			<div class="row">
        				<div class="col-md-6">
        					<div class="form-group">
        					  <label>From Date..?</label>
        						<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-6">
        					<div class="form-group">
        					  <label>End Date..?</label>
        						<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>
        		</div>
        	</div>

        	<center>
        		<div class="card-footer" style="padding: 8px 5px;">
        			<button type="submit" id="save" class="btn btn-primary btn-xs">View Report</button>
        		</div>
        	</center>
        </form>



       </div> 
     </div>
     <div class="col-md-3"></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');
     $('#rptview').load("../display_report/trail_balance_view.php",$(this).serialize(),function() {
     $('#save').prop('disabled', false);
     $('#save').html('View Report');
     $('.preloader').hide();	
   });
  });
});  
</script>