@extends('layout')


@section('content')

<div class="page-header page-header-default">
	<div class="breadcrumb-line">
		<ul class="breadcrumb">
			<li><a href="index.html"><i class="icon-home2 position-left"></i> Pembelian</a></li>
			<li class="active">Hutang Awal Pembelian</li>
		</ul>
	</div>
</div>

<div class="content">
	<div class="panel panel-flat">
		<div class="panel-heading">
			<h5 class="panel-title">Hutang Awal Pembelian</h5>
			<div class="heading-elements">
				<ul class="icons-list">
		      		<li><a data-action="collapse"></a></li>
		      	</ul>
	       	</div>
	    </div>
	    <div class="panel-body">
	    	
	    </div>

	    <table class="table table_beli table-stripped">
	    	<thead>
				<tr>
					<th>No</th>
					<th>Tanggal</th>
					<th>No. Faktur</th>
					<th>Supplier</th>
                    <th>Netto</th> 
                    <th>Pembayaran</th> 
                    <th>Status</th>
					<th class="text-center"></th>
				</tr>
			</thead>
			<tbody>
			
			</tbody>
	    </table>
	</div>
</div>

<script type="text/javascript">
	var tb;

	$(document).ready(function(){
		tb = $(".table_beli").DataTable({
			processing: true,
	        serverSide: true,
	        ajax: '{{ url('pembelian/hutangawal_beli/get_data') }}',
	        columns: [
	            {data: 'id_pembelian', name: 'id_pembelian', orderable: false, searchable: false, render : function(data, type, row, meta){
			  		return meta.row+1;
			  	}},
	            {data: 'tanggal', name: 'tanggal'},
	            {data: 'no_faktur', name: 'no_faktur'},
	            {data: 'nama_penyedia', name: 'nama_penyedia'},
	            {data: 'netto', name: 'netto'},
	            {data: 'total_bayar', name: 'netto'},
	            {data: 'status', name: 'status', orderable: false, searchable: false},
	            {data: 'aksi', name: 'aksi', orderable: false, searchable: false}
	        ],
		});
		
	})

</script>
@endsection