@extends('layouts.app') @section('content')

Data {{ $title }}

@if (isset($_GET['user_id']) && $_GET['user_id'] !== '')

Nama Karyawan : {{$user->name}}

@php $ttl = 0; $laba = 0; @endphp @foreach ($user->penjualan->whereBetween('tgl_penjualan', [$_GET['from'], $_GET['to']]) as $p) @endforeach
No Penjualan Barang Keterangan Tanggal penjualan Harga Seluruh Barang
{{ $loop->iteration }} {{$p->no_penjualan}} @foreach ($p->detail as $dd) @php $hargaDiskon = $dd->harga_barang->harga_jual - $dd->diskon; $ttl += $dd->jumlah * $dd->harga_barang->harga_jual; $laba += $ttl-($dd->harga_barang->harga_beli * $dd->jumlah); @endphp {{$dd->hasHargaBarang->barang->nm_barang}} {{ count($p->detail) == $loop->iteration ? '' : ',' }} @endforeach {{$p->keterangan}} {{$p->tgl_penjualan}} @php $total_seluruh = 0; @endphp @foreach ($p->detail as $dd) @php $disc = $dd->harga_barang->harga_jual - $dd->diskon; $total_seluruh += $dd->jumlah * $dd->harga_barang->harga_jual; @endphp @endforeach {{ 'Rp. ' . number_format($total_seluruh)}}
Total Harga + Diskon {{ 'Rp ' . number_format($ttl) }}
@else
@foreach($datas as $data) @foreach($data->penjualan as $p) @foreach($p->detail as $dd)
Warning: Undefined variable $dd in /home/aplikasiposinfo/public_html/ayam-canton.aplikasipos.info/resources/views/laporan/penjualan/penjualan_barang_user.blade.php on line 193

Warning: Attempt to read property "harga_barang" on null in /home/aplikasiposinfo/public_html/ayam-canton.aplikasipos.info/resources/views/laporan/penjualan/penjualan_barang_user.blade.php on line 193

Warning: Attempt to read property "harga_jual" on null in /home/aplikasiposinfo/public_html/ayam-canton.aplikasipos.info/resources/views/laporan/penjualan/penjualan_barang_user.blade.php on line 193

Warning: Undefined variable $dd in /home/aplikasiposinfo/public_html/ayam-canton.aplikasipos.info/resources/views/laporan/penjualan/penjualan_barang_user.blade.php on line 193

Warning: Attempt to read property "diskon" on null in /home/aplikasiposinfo/public_html/ayam-canton.aplikasipos.info/resources/views/laporan/penjualan/penjualan_barang_user.blade.php on line 193

Warning: Undefined variable $dd in /home/aplikasiposinfo/public_html/ayam-canton.aplikasipos.info/resources/views/laporan/penjualan/penjualan_barang_user.blade.php on line 195

Warning: Attempt to read property "jumlah" on null in /home/aplikasiposinfo/public_html/ayam-canton.aplikasipos.info/resources/views/laporan/penjualan/penjualan_barang_user.blade.php on line 195

Warning: Undefined variable $dd in /home/aplikasiposinfo/public_html/ayam-canton.aplikasipos.info/resources/views/laporan/penjualan/penjualan_barang_user.blade.php on line 195

Warning: Attempt to read property "harga_barang" on null in /home/aplikasiposinfo/public_html/ayam-canton.aplikasipos.info/resources/views/laporan/penjualan/penjualan_barang_user.blade.php on line 195

Warning: Attempt to read property "harga_jual" on null in /home/aplikasiposinfo/public_html/ayam-canton.aplikasipos.info/resources/views/laporan/penjualan/penjualan_barang_user.blade.php on line 195

Warning: Undefined variable $dd in /home/aplikasiposinfo/public_html/ayam-canton.aplikasipos.info/resources/views/laporan/penjualan/penjualan_barang_user.blade.php on line 196

Warning: Attempt to read property "harga_barang" on null in /home/aplikasiposinfo/public_html/ayam-canton.aplikasipos.info/resources/views/laporan/penjualan/penjualan_barang_user.blade.php on line 196

Warning: Attempt to read property "harga_beli" on null in /home/aplikasiposinfo/public_html/ayam-canton.aplikasipos.info/resources/views/laporan/penjualan/penjualan_barang_user.blade.php on line 196

Warning: Undefined variable $dd in /home/aplikasiposinfo/public_html/ayam-canton.aplikasipos.info/resources/views/laporan/penjualan/penjualan_barang_user.blade.php on line 196

Warning: Attempt to read property "jumlah" on null in /home/aplikasiposinfo/public_html/ayam-canton.aplikasipos.info/resources/views/laporan/penjualan/penjualan_barang_user.blade.php on line 196
@endforeach @endforeach @endforeach
No Nama Waktu Dibuat Pendapatan
{{ $no++ }} {{ $data->name }} {{ date('Y-m-d',strtotime($data->created_at)) }} Rp.{{ number_format($ttl) }}
@endif
@endsection