@extends('layouts.admin') @section('title', $company->name.' · Wholesale') @section('content') @php $money = fn (int $cents) => 'AUD '.number_format($cents / 100, 2); $agingLabels = ['current' => 'Current', 'd1_30' => '1–30 days', 'd31_60' => '31–60 days', 'd61_plus' => '61+ days']; @endphp All accounts @if(config('admin_modules.crm')) CRM record @endif {{ $company->wholesale_status === 'approved' ? 'active' : 'suspended' }}
@if($pendingApprovals->isNotEmpty())

{{ $pendingApprovals->count() }} order {{ str('request')->plural($pendingApprovals->count()) }} waiting on the customer's internal approval

    @foreach($pendingApprovals as $cart)
  • {{ $cart->customer->name ?: $cart->customer->email }} · {{ $money((int) $cart->net_cents) }} · {{ $cart->submitted_at?->diffForHumans() }}
  • @endforeach
@endif

Recent trade orders

@forelse($orders as $order) @empty @endforelse
OrderPOFulfilmentPaymentTotal
{{ $order->number }}
{{ $order->created_at->format('d M Y') }}
{{ $order->po_number ?: '—' }} {{ str_replace('_', ' ', $order->fulfillment_status) }} @if($order->status === 'canceled') canceled @elseif($order->payment_status === 'paid') paid @else {{ $order->isOverdue() ? 'overdue' : 'due '.($order->payment_due_at?->format('d M') ?? 'now') }} @endif {{ $order->money('total_cents') }} @if($order->payment_status === 'pending' && $order->status !== 'canceled')
@csrf
@endif
No trade orders yet.

Account-only volume breaks

Extra quantity or order-value discounts that only this account receives.

All rules
    @forelse($accountRules as $rule)
  • {{ $rule->name }} @unless($rule->active)paused@endunless {{ $rule->thresholdLabel() }} · {{ $rule->product?->title ?? 'whole order' }}@if($rule->ends_at) · ends {{ $rule->ends_at->format('d M Y') }}@endif {{ $rule->discountLabel() }}
    @csrf @method('PUT')
    @csrf @method('DELETE')
  • @empty
  • No account-only breaks. Global and tier breaks still apply.
  • @endforelse
Add a break for {{ $company->name }}
@csrf

Activity

    @forelse($activities as $activity)
  1. {{ $activity->summary }}

    {{ $activity->customer?->name ?? $activity->customer?->email ?? 'TRA' }} · {{ $activity->created_at?->format('d M Y H:i') }}

  2. @empty
  3. No activity yet.
  4. @endforelse
@push('scripts') @endpush @endsection