<!-- page menampilkan form historey invoice/ invoice posted -->



<head>
  
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
	<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
	<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
   
  	<script type="text/javascript" src="/sbo/public/adminLTE/dist/css/sweetalert.min.js"></script>


</head>


<?php $__env->startSection('title'); ?>
 <table>

    <tr><td width="100"><b>Supplier</b></td><td><b><?php echo e($supplier->sup_id.' - '.$supplier->sup_nama); ?></b></td></tr>
	<tr><td width="100"><b>Tgl. Invoice</b></td><td><b><?php echo e(tanggal_indonesia($m_inv->inv_tgl, false)); ?></b></td></tr>
	<tr><td width="100"><b>No. Invoice</b></td><td><b><?php echo e($m_inv->inv_no); ?></b></td></tr>

</table>
 
<?php $__env->stopSection(); ?>

<?php $__env->startSection('breadcrumb'); ?>
   ##parent-placeholder-6e5ce570b4af9c70279294e1a958333ab1037c86##
   <li>invoice</li>
   <li>history</li>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>     

<div class="row">
  <div class="col-xs-12">
    <div class="box">
   
<div class="box-body">

<form class="form form-horizontal form-invoice" method="GET" id="form-invoice" action="/sbo/invoice/<?php echo e($idinv); ?>/reprint">
<?php echo e(csrf_field()); ?>

  
  <input type="hidden" name="idinv" value="<?php echo e($idinv); ?>">
  
	    <button id="submit" type="submit" class="btn btn-success pull-right simpan"><i class="fa fa-floppy-o"></i>Print Invoice </button>
		<button type="button" class="btn btn-warning pull-right" onclick="window.history.back()"><i class="fa fa-times-circle"></i> Close </button> 
</form>
<br>

<form class="form-detail">
<?php echo e(csrf_field()); ?> <?php echo e(method_field('PATCH')); ?>


<div class="row">
    
<table class="table table-fixed table-striped table-bordered tabel-invdetail" id="invdetail">

<thead>
              
   <tr class="danger">
      <th width="20">No</th>
      <th>Deskripsi</th>
      <th>Hg.Satuan</th>
	  <th>Colly</th>
	  <th>Volume</th>
	  <th>Stn Vol</th>
	  <th>Jumlah</th>
   </tr>
</thead>


<tbody></tbody>
</table>

</div>

</form>

<div class="box-footer">
    <div class="col-md-8" align="right">
    	<label>Total QTY &nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;</label><br>
    	<label>Total Rp &nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;</label><br>
    </div>
    <div class="col-md-3">
    	<div id="total-qty"	style="background: DarkSlateGray; color: #fff; font-size: 20px; text-align: right; height: 26px"></div>
    	<div id="total-rp" style="background: DarkCyan; color: #fff; font-size: 20px; text-align: right; height: 26px"></div>
    </div>      
	<div class="col-md-3">
		<form class="form form-horizontal form-rekapinv" method="GET" action="/wawan/invoice/<?php echo e($idinv); ?>/update">
			<?php echo e(csrf_field()); ?>

			<input type="hidden" name="idinv" value="<?php echo e($idinv); ?>">
			<input type="hidden" name="totalinv" id="totalinv">
		</form>
	</div>          

</div>


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


<?php echo $__env->make('invoice_detail.form', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

<?php $__env->stopSection(); ?>

<?php $__env->startSection('script'); ?>

<script type="text/javascript">
var table, table1, save_method;

$(function(){
  $('.tabel-produk').DataTable();
  table = $('.tabel-invdetail').DataTable({
      
     "scrollY": '40vh',
     "scrollCollapse": true,
     "paging": false,
     "processing" : true,
	 "dom" : 'bt',
     "ajax" : {
     "url" : "<?php echo e(route('invoicedetail.data2')); ?>",
     "type" : "GET"
	}


 }).on('draw.dt', function(){
   loadSummary();
 });

});



/* mreferesh perubahan total inv */
function loadSummary(){
	
  $.ajax({
	   url : "/wawan/invoicedetail/loadsummary",
       type : "GET",
       dataType : 'JSON',
       success : function(data){
			$('#total-qty').text(data.totalqty);
			$('#total-rp').text(data.totalrp);
       },
       error : function(){
		 return false;
       }
  });
}

</script>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.myform', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/myprojeq/public_html/wawan/resources/views/invoice_detail/index_history.blade.php ENDPATH**/ ?>