@php $jsonencode = json_encode($purchasedetails); $tanggal = date('d/m/Y',strtotime($data->created_at)); @endphp @php $jenis = $data->is_paid; $total = $data->total; $discount = $data->discount; if ($discount > 100) { $discountshow =number_format($discount,0,',','.'); $totalall = $total - $discount; }else { $discountshow = $discount . " %"; $totalall = $total - ($total * $discount/100); } $hasil_rupiah =number_format($totalall,0,',','.'); if ($jenis) { $trans = "Cash"; }else { $trans = "Credit"; } $hargabarang = $datadetail->custom_price; $qty = $datadetail->qty; $discountitem = $datadetail->discount; if ($discountitem > 100) { $discountitemshow =number_format($discountitem,0,',','.'); $hargatotal = ($hargabarang * $qty) - $discountitem; }else { $discountitemshow = $discountitem . " % "; $hargatotal = ($hargabarang * $qty) - ($hargabarang * $discountitem/100); } $hargabarangshow =number_format($datadetail->custom_price,0,',','.'); $hasil_rupiahshow =number_format($hargatotal,0,',','.'); $totalshow =number_format($total,0,',','.'); @endphp
{{$title}}

Periode : {{$tanggal}}

No Pembelian : {{$data->code}} No Bon : {{$data->bon_number}}
Tanggal Pembelian : {{$tanggal}} Nama Supplier : {{$datasupp->name}}
@php for ($i=0; $i < count($details); $i++) { $number = $i+1; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; if ($purchasedetails[$i]->discount > 100) { echo ""; echo ""; }else{ echo ""; echo ""; } echo ""; } @endphp
Tipe Pembayaran : {{$trans}}
No Nama Barang Kode Barang Harga Barang Qty Discount Barang Total
".$number."".$details[$i]->name."".$details[$i]->code."".number_format($details[$i]->price,0,',','.')."".$purchasedetails[$i]->qty."".number_format($purchasedetails[$i]->discount,0,',','.')."".number_format((($purchasedetails[$i]->custom_price * $purchasedetails[$i]->qty)-$purchasedetails[$i]->discount),0,',','.')."".$purchasedetails[$i]->discount." % ".number_format((($purchasedetails[$i]->custom_price * $purchasedetails[$i]->qty)-($purchasedetails[$i]->custom_price*$purchasedetails[$i]->discount/100)),0,',','.')."
Total All: {{$totalshow}}
Discount All: {{$discountshow}}
Total : {{$hasil_rupiah}}
{{--

{{$jsonencode}}

--}}

Dicetak Pada : {{date('d/m/Y')}}