@extends('layouts.print')

@section('title')
  Print Invoice &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  	<a onclick="window.location='{{ route('home') }}'" class="btn btn-primary"><i class="fa fa-home"></i> Home </a>
	<a onclick="window.history.go(-2)" class="btn btn-warning"><i class="fa fa-undo"></i> Back </a> 
@endsection

@section('breadcrumb')
   @parent
   <li>invoice</li>
   <li>print</li>
@endsection

@section('content')
<style type="text/css">
   .duabelas {
   font-size: 12px;
   }
   .duapuluh {
   font-size: 20px;
   }
   .empatbelas {
   font-size: 14px;
   }
</style>

<h4>SBO</h4>
<center>
<h4>Invoice Pembelian</h4>
</center>

<table style="width:90%">

<p>
	<tr><td width="65">Supplier: </td><td width="650">{{ $supplier->sup_id.' - '.$supplier->sup_nama }}</td><td><strong>NO. Invoice:</strong></td><td><strong>{{ $minv->inv_no }}</strong></td></tr>
	<tr><td>Alamat:</td><td>{{ $supplier->sup_alamat }}</td><td>Tgl. Inv:</td><td>{{ tanggal_indonesia($minv->inv_tgl, false) }}</td></tr>
	<tr><td></td><td></td><td width="80">Discount:</td><td>{{ $minv->inv_disc }}</td></tr>
	<tr><td></td><td></td><td>P P N:</td><td>{{ $minv->inv_ppn }}  </td></tr>	
</table>
<br>

<!-- <table class="table table-striped" style="width:90%"> -->
<table cellspacing="5" cellpadding="5" border="1" style="width:90%">

<tr>

	<th width="30" class="text-center">NO.</th>
	<th width="70">KODE</th>
	<th width="250">DESKRIPSI</th>
	<th width="80">NO.Seri</th>
	<th width="80" class="text-center">Hg.Gross</th>
	<th width="60" class="text-center">Disc.1</th>
	<th width="60" class="text-center">Qty</th>
	<th width="80" class="text-center">Jumlah</th>
</tr>

@foreach ($dinv as $list)
	
	<tr>
	    <td align="center" height="15">{{ $no++ }}</td>
    	<td>{{ $list->kode_brg }}</td>
    	<td>{{ $list->nama_brg }}</td>
    	<td>{{ $list->no_seri }}</td>
    	<td align="right">{{ format_uang($list->inv_gross) }}</td>
    	<td align="center">{{ $list->inv_disc1 }}</td>
    	<td align="center">{{ $list->inv_qty }}</td>
    	<td align="right">{{ format_uang(jumlahINV($list->inv_gross, $list->inv_disc1, $list->inv_qty)) }}</td> 
    </tr>
	
@endforeach

<tr><td></td><td></td><td></td><td></td><td><b>TOTAL Invoice</b></td><td></td><td></td><td align="right"><b>{{ format_uang($minv->inv_total) }}</b></tr>
</table>
<br>
<table style="width:85%">
    <tr><td width="150"></td><td>Admin</td><td width="150"></td><td>Mengetahui</td></tr>
    
</table>

<p></p>
@endsection