@extends('layouts.app')
@section('title', 'Vendor assignments')
@section('content')
@php
$pills = filter_pills([
'status' => ['Status', ['unpaid' => 'Unpaid', 'partial' => 'Partly paid', 'paid' => 'Paid']],
'vendor_id' => ['Vendor', fn ($id) => optional($vendors->firstWhere('id', $id))->name ?? $id],
'from' => ['From', fn ($d) => pretty_date($d)],
'to' => ['To', fn ($d) => pretty_date($d)],
]);
$filtered = count($pills) > 0 || request()->filled('q');
$chips = [[null, 'All', 'all'], ['unpaid', 'Unpaid', 'unpaid'], ['partial', 'Partly paid', 'partial'], ['paid', 'Paid', 'paid']];
@endphp
| Progress | Extra | Actions | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| {{ $a->number() }} @if ($a->description){{ $a->description }}@endif | {{ $a->vendor->name }} | {{ $a->order->order_no }}{{ $a->order->client->name }} | {{ $a->assigned_on->format('d M Y') }} | {{ money($a->assigned_amount) }} |
{{ $a->isCompleted() ? 'Completed' : $a->progress.'%' }}@if ($a->manager) · {{ $a->manager->name }}@endif @if ($a->isStale())· no recent update@endif
|
{{ $a->extra() > 0.004 ? money($a->extra()) : '—' }} | {{ money($a->total()) }} | {{ money($a->due()) }} |
|
|
|
| ||||||||||
| All {{ $assignments->total() }} matching {{ \Illuminate\Support\Str::plural('assignment', $assignments->total()) }} | {{ money($sums['assigned']) }} | {{ money($sums['extra']) }} | {{ money($sums['total']) }} | {{ money($sums['paid']) }} paid | {{ money($sums['due']) }} | |||||