@extends('layouts.admin') @section('title', 'Daftar Pesanan & Rental') @section('page_title', 'Daftar Seluruh Pesanan Rental') @section('content')
Semua Sumber {{ $sourceCounts['all'] ?? 0 }} Dari Web (Customer) {{ $sourceCounts['web'] ?? 0 }} Input Staff (POS & Fitting) {{ $sourceCounts['staff'] ?? 0 }} Import Excel {{ $sourceCounts['excel'] ?? 0 }}
@if(($waitingVerificationCount ?? 0) > 0) {{ $waitingVerificationCount }} Ada Bukti TF Perlu Verifikasi @endif @if(($hasProofCount ?? 0) > 0) {{ $hasProofCount }} Ada Foto Bukti TF @endif @if(($unpaidCount ?? 0) > 0) {{ $unpaidCount }} Belum Bayar @endif
Dari
Sampai
@if(request()->anyFilled(['search', 'order_status', 'payment_status', 'source', 'has_proof', 'start_date', 'end_date'])) @endif
Preset Cepat:
@php $hasActiveFilters = request()->anyFilled(['search', 'order_status', 'payment_status', 'source', 'has_proof', 'start_date', 'end_date']); @endphp @if($hasActiveFilters)
Filter Aktif: @if(request()->filled('source') && request('source') !== 'all') @php $srcLabel = match(request('source')) { 'web', 'online' => '🌐 Dari Web (Customer)', 'staff' => '🏬 Di-input Staff (POS & Fitting)', 'pos_walkin' => '🏬 Kasir Studio POS', 'fitting_deal' => '👗 Deal Fitting', 'excel_import' => '📁 Import Excel', default => ucfirst(request('source')) }; @endphp Sumber: {{ $srcLabel }} ✕ @endif @if(request()->filled('payment_status') && request('payment_status') !== 'all') Status Bayar: {{ request('payment_status') === 'waiting_verification' ? 'Menunggu Verifikasi TF' : (request('payment_status') === 'unpaid' ? 'Belum Bayar' : 'Lunas') }} ✕ @endif @if(request()->filled('has_proof')) {{ request('has_proof') === 'yes' ? '📷 Ada Foto Bukti TF' : 'Tanpa Bukti TF' }} ✕ @endif @if(request()->filled('order_status') && request('order_status') !== 'all') Status Order: {{ ucfirst(str_replace('_', ' ', request('order_status'))) }} ✕ @endif @if(request()->filled('search')) Cari: "{{ request('search') }}" ✕ @endif @if(request()->filled('start_date') || request()->filled('end_date')) 📅 {{ request('start_date') ?: 'Awal' }} s/d {{ request('end_date') ?: 'Sekarang' }} ({{ request('date_type') === 'created_at' ? 'Transaksi' : 'Jadwal' }}) ✕ @endif
Reset Semua Filter
@endif @if($financialSummary)
Sewa Murni (Pure) Omset
Rp {{ number_format($financialSummary['pure_rental'], 0, ',', '.') }}
Bersih sewa ({{ $financialSummary['paid_count'] }} order lunas) @if(!empty($financialSummary['additional_fee']) && $financialSummary['additional_fee'] > 0) • +Rp {{ number_format($financialSummary['additional_fee'], 0, ',', '.') }} tambahan @endif
Deposit Jaminan Titipan
Rp {{ number_format($financialSummary['deposit'], 0, ',', '.') }}
Titipan jaminan refundable
Ongkos Kirim Kurir
Rp {{ number_format($financialSummary['shipping'], 0, ',', '.') }}
Diteruskan ke Biteship / Kurir
Total Kas Masuk Gross
Rp {{ number_format($financialSummary['grand_total'], 0, ',', '.') }}
Total mutasi uang masuk
@endif
@forelse($orders as $ord) @empty @endforelse
No. Order & Sumber Customer Gaun yang Disewa Periode Sewa Pengiriman Rincian Biaya (Pure & Total) Pembayaran Status Rental Aksi
@php $srcBadge = $ord->source_badge; @endphp
{{ $srcBadge['label'] }}
{{ $ord->created_at->format('d/m/y H:i') }}
{{ $ord->customer_name }}
{{ $ord->customer_phone }}
@if($ord->remark)
{{ $ord->remark }}
@endif
@foreach($ord->items as $it)
• {{ $it->dress->name ?? '-' }} ({{ $it->dress->code ?? '' }})
@endforeach
{{ $ord->rental_start_date->format('d/m/y') }} - {{ $ord->rental_end_date->format('d/m/y') }}
{{ $ord->duration_days }} Hari
{{ $ord->delivery_type === 'studio_pickup' ? 'Ambil di Studio' : 'Kurir ' . strtoupper($ord->shipping_courier ?? '') }} @if($ord->shipping_tracking_number)
Resi: {{ $ord->shipping_tracking_number }}
@endif
{{ $ord->formatted_pure_rental }} Pure
Dep: {{ $ord->formatted_deposit }} @if($ord->shipping_cost > 0) | Ongkir: {{ $ord->formatted_shipping_cost }} @endif
Total: {{ $ord->formatted_grand_total }} @if($ord->unique_code > 0) +{{ $ord->unique_code }} @endif
@if($ord->payment_status === 'paid') Lunas @elseif($ord->payment_status === 'waiting_verification') Verifikasi Bukti @else @if($ord->isPaymentExpired()) Kadaluarsa
Lewat batas
@else Belum Bayar
Batas: {{ $ord->payment_deadline ? $ord->payment_deadline->format('H:i') : '-' }} WIB
@endif @endif
{{ $ord->payment_method ?? 'Transfer' }}
@if($ord->payment_sender_name)
a/n: {{ $ord->payment_sender_name }}
@endif @if($ord->payment_proof) @endif
{{ $ord->status_badge['label'] }}
@if(!in_array($ord->order_status, ['returned', 'completed', 'cancelled'])) @endif Kelola
Belum ada data pesanan rental.
@if($orders->hasPages())
{{ $orders->onEachSide(1)->links('pagination::bootstrap-5') }}
@endif
@endsection @push('scripts') @endpush