@extends('layouts.app') @section('title', 'Contracts') @section('content')

Contracts Management

Purchase Contract Sale Contract
{{ $summary['total_contracts'] }}
Total Contracts
{{ $summary['active_contracts'] }}
Active Contracts
{{ number_format($summary['total_value'], 0) }}
Total Contract Value
{{ number_format($summary['pending_value'], 0) }}
Pending Value
Clear
@forelse($contracts as $contract) @empty @endforelse
Contract No Title Party Type Item Rate Agreed Qty Delivered Pending Status Actions
{{ $contract->contract_no }} {{ Str::limit($contract->title, 30) }} {{ $contract->party->name ?? '-' }} @if($contract->type == 'purchase') Purchase @else Sale @endif {{ $contract->item->name ?? 'General' }} {{ number_format($contract->agreed_rate, 2) }} {{ number_format($contract->agreed_quantity, 2) }} {{ $contract->quantity_unit }} {{ number_format($contract->delivered_quantity, 2) }} {{ number_format($contract->pending_quantity, 2) }} @php $statusColors = [ 'draft' => 'background: #fafafa; color: #666;', 'active' => 'background: #e8f5e9; color: #2e7d32;', 'completed' => 'background: #e3f2fd; color: #1565c0;', 'cancelled' => 'background: #ffebee; color: #c62828;', ]; @endphp {{ ucfirst($contract->status) }}
@if($contract->delivered_quantity == 0)
@csrf @method('DELETE')
@endif

No contracts found.

{{ $contracts->appends(request()->query())->links() }}
@endsection