{{ strtoupper($title) }}

No Pembelian : {{$purchase->code}} No Bon : {{$purchase->bon_number}}
Tanggal Pembelian : {{date('Y-m-d',strtotime($purchase->created_at))}} Supplier : {{$purchase->supplier->name}}
Jenis Transaksi : @if ($purchase->is_paid === 1) CASH @else KREDIT @endif @php $no = 1; $sub_total = 0; $diskon = 0; $diskon_total = 0; $grand_total = 0; @endphp @foreach ($purchase->purchase_details as $item) @php if($item->discount > 100){ $diskon = $item->discount; }else if($item->discount < 100){ $diskon = ($item->discount/100) * ($item->custom_price * $item->qty); }else{ $diskon = 0; } $sub_total += $item->custom_price * $item->qty; $diskon_total += $diskon; $grand_total += ($item->custom_price * $item->qty) - $diskon; @endphp @endforeach @php if($purchase->discount > 100){ $diskon = $purchase->discount; }else if($purchase->discount < 100){ $diskon = ($purchase->discount/100) * ($grand_total); }else{ $diskon = 0; } $diskon_total += $diskon; $grand_total = $grand_total - $diskon; @endphp
NO KODE NAMA BARANG MERK JENIS QTY HARGA TOTAL
{{$no++}} {{$item->item->code}} {{$item->item->name}} {{$item->item->item_brand->name}} {{$item->item->item_type->name}} {{$item->qty}} {{number_format($item->custom_price,0,',','.')}} {{number_format($item->custom_price * $item->qty,0,',','.')}}
SUB TOTAL : {{number_format($sub_total,0,',','.')}}
DISCOUNT : {{number_format($diskon_total,0,',','.')}}
GRAND TOTAL : {{number_format($grand_total,0,',','.')}}

Dicetak Oleh : {{Auth::user()->name}}
Pada Tanggal : {{date('d/m/Y')}}