@extends('admin.layouts.contentLayoutMaster') @section('title','銷售報表') @section('vendor-styles') @endsection @section('page-styles') @endsection @section('content')
{{ $now }}

活動名稱
{{ $commission->activity->name }}
團媽
{{ $commission->administrator->name }}

@foreach ($orderSummary as $type => $order) @php $typeName = [ 'paid' => '已付', 'unpaid' => '未付', 'all' => '總計', ][$type]; @endphp @endforeach
訂單數 營收
{{ $typeName }} {{ $order['count'] }} $ {{ number_format($order['total']) }}
平均客單 $ {{ number_format($perCustomerTransaction) }}

@foreach ($products['all'] as $product) @php $paidProduct = $products['paid'][$product['productId']] ?? ''; $unPaidProduct = $products['unpaid'][$product['productId']] ?? ''; @endphp @endforeach {{-- 運費 --}} {{-- 折扣 --}} {{-- 總計 --}}
類別 品項 團購價 已付款組數 未付款組數 總銷售組數 小計 訂單占比 銷售額占比
{{ $product['productPropertyName'] }} {{ $product['productName'] }} $ {{ number_format($product['price']) }} {{ $paidProduct['quantity'] ?? 0 }} {{ $unPaidProduct['quantity'] ?? 0 }} {{ $product['quantity'] ?? 0 }} $ {{ number_format($product['total']) }} {{ $product['quantityPercent'] }} % {{ $product['totalPercent'] }} %
運費 $ {{ number_format($freightFee) }}
(折扣) - $ {{ number_format($discountFee) }}
銷售量總計 {{ $productsSum['paid'] }} {{ $productsSum['unpaid'] }} {{ $productsSum['all'] }} $ {{ number_format($productsSum['total']) }}
@endsection @section('vendor-scripts') @endsection @section('page-scripts') @endsection