@php $faktur = $data; @endphp @php if ($from !== 'null') { $tanggal = date('d/m/Y',strtotime($from)).' s/d '.date('d/m/Y',strtotime($to)); }else { $tanggal = 'Semua'; } @endphp
Laporan
{{$title}}

Mixer : {{$datamixer ? $datamixer->name : $faktur[0]->salesman->name}}

Tanggal : {{$tanggal}}

@if (count($faktur) > 0) @foreach($data as $p) @php $tanggal = date('d/m/Y',strtotime($p->created_at)); @endphp @foreach($p->transaction_details as $details) @php $i = 1; $item = $details->item; $jsonencode = json_encode($details); $hargabarang = $details->custom_price; $qty = $details->qty; $discountitem = $details->discount; if ($discountitem > 100) { $discountitemshow =number_format($discountitem,0,',','.'); $hargatotal = ($hargabarang * $qty) - $discountitem; }else { $discountitemshow = $discountitem . " % "; $hargatotal = ($hargabarang * $qty) - ($hargabarang * $discountitem/100); } $hasil_rupiahshow =number_format($hargatotal,0,',','.'); @endphp @endforeach @php $totalsub = $p->total; $discall = $p->discount; if ($discall > 100) { $grandtotal = $totalsub - $discall; }else{ $grandtotal = $totalsub - ($totalsub * $discall/100); } @endphp
No Faktur : {{$p->code}} Pelanggan : {{$p->customer->name}}
Tanggal Penjualan : {{$tanggal}}
Tipe Pembayaran : {{$p->is_paid ? "Cash" : "Credit"}}
No Barcode Nama Barang Harga Barang Qty Total
{{$i++}} {{!empty($item) ? $item->code : '-'}} {{!empty($item) ? $item->name : $details->item_name}} {{!empty($item) ? number_format($item->price,0,',','.') : number_format($details->custom_price,0,',','.')}} {{$details->qty}} {{$hasil_rupiahshow}}
Grand Total : {{number_format($grandtotal,0,',','.')}}
{{--

{{$jsonencode}}

--}} @endforeach @else

Tidak Ada Data

@endif

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