Laporan
{{$title}}
@php $tab = 1; $listtransaksi = $data->original; // if ($from === "null" && $to === "null") { // $tanggal = date('d/m/Y')." - ".date('d/m/Y'); // }else{ // $tanggal = date('d/m/Y',strtotime($from)). " - " .date('d/m/Y',strtotime($to)); // } @endphp

Periode : All Time
Jenis : Semua

@foreach($listtransaksi as $p) {{--

{{$tab++}}

--}} @php $tanggal = date('d/m/Y',strtotime($p->created_at)); $jenis = $p->is_paid; $total = $p->total; $discount = $p->discount; if ($discount > 100) { $totalall = $total - $discount; }else { $totalall = $total - ($total * $discount/100); } $hasil_rupiah =number_format($totalall,0,',','.'); if ($jenis) { $trans = "Cash"; }else { $trans = "Credit"; } @endphp @php $i=1 @endphp @foreach($p->transaction_details as $x) @php if ($p->discount === null) { $discitall = "-"; }else{ $discitall = $p->discount; } if ($x->discount === null) { $discit = "-"; }else { $discit = $x->discount; } !empty($x->item->price) ? $totalperbarang = $x->item->price * $x->qty : $totalperbarang = $x->custom_price; @endphp @endforeach
No Faktur : {{$p->code}} Sales : {{$p->salesman->name}}
Tanggal Penjualan : {{date('d/m/Y',strtotime($p->created_at))}} Pelanggan : {{$p->customer->name}}
Pembayaran : {{$trans}}
No Barcode Nama Barang Merk Jenis Harga Qty Total
{{ $i++ }} {{!empty($x->item) ? $x->item->code : '-'}} {{!empty($x->item) ? $x->item->name : $x->item_name}} {{!empty($x->item) ? $x->item->item_brand->name : $x->item_brand}} {{!empty($x->item) ? $x->item->item_type->name : '-'}} {{!empty($x->item) ? number_format($x->item->price,0,',','.') : number_format($x->custom_price,0,',','.')}} {{$x->qty}} {{number_format($totalperbarang,0,',','.')}}
Grand Total : {{$hasil_rupiah}}

@php $jsonencode = json_encode($x); @endphp {{--

{{$jsonencode}}

--}} @endforeach {{--

{{$tgl}}

--}}

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