@extends('layouts.app')
@section('title', $assignment->number())
@section('content')
@php
$a = $assignment;
$total = $a->total(); $paid = $a->paid(); $due = $a->due();
$pct = $total > 0 ? min(100, round($paid / $total * 100)) : 0;
@endphp
| Product | Agreed | Paid | Balance |
|---|---|---|---|
| {{ $it->label() }} | {{ money($it->amount) }} | {{ money($it->paid()) }} | {{ money($it->due()) }} |
| Date | Description | Amount | |
|---|---|---|---|
| {{ $x->bill_date->format('d M Y') }} | {{ $x->description }} | {{ money($x->amount) }} |
@can('vendor_assignments.edit')
|
| Date | For | Method | Reference | Amount |
|---|---|---|---|---|
| {{ $p->paid_on->format('d M Y') }} | {{ $p->vendorAssignmentItem ? $p->vendorAssignmentItem->label() : 'Whole assignment' }} | {{ \App\Models\Payment::METHODS[$p->method] ?? $p->method }} | {{ $p->reference ?: '—' }} | −{{ money($p->amount) }} |