<div class="modal" id="modal-form_do" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static" >
   <div class="modal-dialog modal-md">
      <div class="modal-content">
          <div class="modal-content" style="border-left: #6495ED 6px solid;">
     
   <form class="form-horizontal" data-toggle="validator" method="post">
   <?php echo e(csrf_field()); ?> <?php echo e(method_field('POST')); ?>

   
   <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true"> &times; </span> </button>
      <h4 class="modal-title">Print DO Keluar</h4>
   </div>
   <br>
<!-- <div class="modal-body"> -->
   
   <div class="form-group">
      <label for="tgldo" class="col-sm-3 control-label">Tgl. Transaksi</label>
      <div class="col-sm-4">
         <input id="tgldo" type="date" value="<?php echo e(date('Y-m-d')); ?>" class="form-control" name="tgldo" autofocus  required>
      </div>
   </div>    

	<div class="form-group">
		<input id="rutedo" type="hidden" class="form-control" name="rutedo" readonly="true" autofocus required>	
		
		<label for="rutedo" class="col-md-3 control-label">Rute</label>
		<div class="col-md-7">
			<div class="input-group">
				<input type="text" class="form-control" id="nmrutedo" name="nmrutedo" autofocus required readonly="true">
				<span class="input-group-btn">
					<button onclick="showRuteDO()" type="button" class="btn btn-info">...</button>
				</span>
			</div>
		</div>
   </div>
   
<!-- </div> -->		<!-- body -->
   
   <div class="modal-footer">

     <a onclick="print_do()" class="btn btn-primary btn-save"><i class="fa fa-print"></i>Print DO</a>
      <button type="button" class="btn btn-warning btn-close" data-dismiss="modal"><i class="fa fa-times-circle"></i> Cancel </button>
  </div>

   </form>

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

<!----------------------------------------------------------------->

   
<script type="text/javascript">

function showRuteDO(){
	var tgl=$('#tgldo').val();
    $('#modal-rute').modal('show');
	
    tblrute.ajax.url("rute/"+tgl+"/2/listrute");
	tblrute.ajax.reload();
}

function selectRuteDO(rute2){
	$('#rutedo').val(rute2);
	$('#modal-rute').modal('hide');
    $('.modal-title').text('Print DO');

	var idrute2 = $('#rutedo').val();
	
	$.ajax({
        url : "rute/"+idrute2+"/tampil",
        type : "GET",
        dataType : "JSON",
        success : function(data){
			$('#nmrutedo').val(data.route_name.concat(' - ',data.no_pol.concat(' - ',data.driver)));
        },
        error : function(){
          alert("Tidak dapat menampilkan data!");
        }   
     });  
}

    function print_do(){
        var rute_do = $('#rutedo').val();
        window.location="/wawan/penjualan/"+rute_do+"/printdo";
        $('modal-form_do').hide();
    };
   
</script>
 
<?php /**PATH /home/myprojeq/public_html/sriayu/resources/views/sales/penjualan_do.blade.php ENDPATH**/ ?>