@php $statusMeta = [ 'draft' => ['label' => __('Draft'), 'color' => 'slate'], 'awaiting_payment' => ['label' => __('Awaiting Payment'), 'color' => 'amber'], 'partial' => ['label' => __('Partially Paid'), 'color' => 'sky'], 'paid' => ['label' => __('Paid'), 'color' => 'emerald'], 'cancelled' => ['label' => __('Cancelled'), 'color' => 'slate'], ]; $tonePill = [ 'up' => 'bg-emerald-50 text-emerald-700', 'down' => 'bg-rose-50 text-rose-700', 'muted' => 'bg-slate-100 text-slate-500', ]; $currencySymbol = $currencies->firstWhere('code', $currency_code)->symbol ?? $currency_code; @endphp
{{ $kpi['label'] }}
{{ $kpi['value'] }}
{{ $kpi['sub']['text'] }}| {{ __('Bill') }} | {{ __('Supplier') }} | {{ __('Bill Date') }} | {{ __('Due') }} | {{ __('Total') }} | {{ __('Balance') }} | {{ __('Status') }} | {{ __('Stock') }} | {{ __('Actions') }} |
|---|---|---|---|---|---|---|---|---|
|
{{ $bill->bill_number ?: __('Bill #:id', ['id' => $bill->id]) }} @if ($bill->reference){{ $bill->reference }} @endif |
{{ $bill->supplier?->name ?? '—' }} | {{ optional($bill->bill_date)->format('j M Y') ?? '—' }} | @if ($bill->due_date) {{ $bill->due_date->format('j M Y') }} @if ($bill->is_overdue) {{ __('Overdue') }} @endif @else — @endif | {{ $bill->currency_code }} {{ number_format((float) $bill->total, 2) }} | {{ $bill->balance_due > 0 && $isOpen ? $bill->currency_code . ' ' . number_format((float) $bill->balance_due, 2) : '—' }} |
|
@if ($stockLines->isEmpty())
—
@elseif ($receivable === 0)
|
@if ($canManage && $receivable > 0 && $bill->status !== 'cancelled')
@endif
@if ($canManage && $isOpen && $bill->balance_due > 0)
@endif
|
|
|
||||||||
| {{ __('Name') }} | {{ __('Type') }} | {{ __('Supplies') }} | {{ __('Email') }} | {{ __('Phone') }} | {{ __('Actions') }} |
|---|---|---|---|---|---|
|
{{ \Illuminate\Support\Str::of($supplier->name)->substr(0, 1)->upper() }}
{{ $supplier->name }} @if ($supplier->category){{ $supplier->category }} @endif |
|
@php $supplies = (int) ($supplyCounts[$supplier->id] ?? 0); @endphp | {{ $supplier->email ?: '—' }} | {{ $supplier->phone ?: '—' }} |
|
|
|
|||||
{{ $isStock ? number_format($qtyBase, 4) : '—' }}
{{ number_format($lineTotal, 2) }}
{{ $message }}
@enderror @error('lines.' . $i . '.qty'){{ $message }}
@enderror @error('lines.' . $i . '.unit_cost'){{ $message }}
@enderror{{ __('Bank/EcoCash fee to send this payment. Booked as a bank charge. Leave blank if none.') }}
{{ __('Used to date bills, price currencies and advise on reorder lead time.') }}
{{ __('Typical days from order to delivery.') }}
{{ __('Defaults a bill’s due date.') }}
{{ __('Where you pay this supplier. Optional.') }}
{{ __('Link the materials you buy from this supplier. Buying from them on a bill adds the link automatically, this is for setting it up ahead of time, or recording their SKU, price and minimum order.') }}
{{-- Existing catalogue --}}| {{ __('Material') }} | {{ __('Their SKU') }} | {{ __('Last price') }} | {{ __('MOQ') }} | {{ __('Lead time') }} | {{ __('Actions') }} |
|---|---|---|---|---|---|
|
{{ $row->material?->name }}
@if ($row->variant)
@if ($row->purchase_count > 0)
{{ trans_choice('{1} bought once|[2,*] bought :count times', $row->purchase_count, ['count' => $row->purchase_count]) }} @if ($row->last_purchased_at) · {{ $row->last_purchased_at->format('d M Y') }} @endif @endif |
{{ $row->supplier_sku ?: '—' }} | {{ $row->last_unit_cost !== null ? ($row->currency_code ?: $baseCode) . ' ' . number_format((float) $row->last_unit_cost, 2) : '—' }} | {{ $row->moq !== null ? rtrim(rtrim(number_format((float) $row->moq, 2), '0'), '.') : '—' }} | {{ $row->effectiveLeadTimeDays() !== null ? __(':days d', ['days' => $row->effectiveLeadTimeDays()]) : '—' }} |
@if (! $row->is_preferred)
@endif
|
| {{ __('Nothing linked yet. Add the first material below.') }} | |||||
{{ __('Per stock unit (m, sheet, each), not per roll or box.') }}