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

Contract Report

Back to Contracts
Clear
{{ $summary['total_contracts'] }}
Total Contracts
{{ $summary['purchase_contracts'] }}
Purchase
{{ $summary['sale_contracts'] }}
Sale
{{ number_format($summary['total_value'], 0) }}
Total Value
{{ number_format($summary['delivered_value'], 0) }}
Delivered
{{ number_format($summary['pending_value'], 0) }}
Pending
@forelse($contracts as $contract) @empty @endforelse @if($contracts->count() > 0) @endif
Contract No Party Type Item Period Contract Value Delivered Pending % Status
{{ $contract->contract_no }} {{ $contract->party->name ?? '-' }} @if($contract->type == 'purchase') Purchase @else Sale @endif {{ $contract->item->name ?? 'General' }} {{ $contract->start_date->format('d/m/Y') }}
to {{ $contract->end_date ? $contract->end_date->format('d/m/Y') : 'Open' }}
{{ number_format($contract->contract_value, 0) }} {{ number_format($contract->delivered_value, 0) }} {{ number_format($contract->pending_value, 0) }}
{{ $contract->completion_percentage }}%
@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) }}
No contracts found matching the criteria.
Totals: {{ number_format($summary['total_value'], 0) }} {{ number_format($summary['delivered_value'], 0) }} {{ number_format($summary['pending_value'], 0) }}
@endsection