@extends('app-new') @push('head-script') @endpush @push('content-header') @endpush @section('content')
{{-- Employee & Declaration Info --}}

Employee Details

Name {{ $declaration->employee->name ?? 'N/A' }}
Employee Code {{ $declaration->employee->employee_code ?? '-' }}
Financial Year {{ $declaration->financialYear->label ?? '-' }}
Regime {{ ucfirst($declaration->regime) }} Regime

Declaration Summary

Status @php $statusColors = [ 'draft' => 'secondary', 'submitted' => 'info', 'under_review' => 'warning', 'approved' => 'success', 'rejected' => 'danger', ]; @endphp {{ ucwords(str_replace('_', ' ', $declaration->status)) }}
Total Declared ₹ {{ number_format($declaration->total_declared_amount, 2) }}
Total Approved ₹ {{ number_format($declaration->total_approved_amount, 2) }}
Sections Declared {{ $declaration->details->count() }}
{{-- Approval Form --}} @if(in_array($declaration->status, ['submitted', 'under_review']))
@csrf @method('PUT') {{-- House Properties Section --}} @if($declaration->houseProperties && $declaration->houseProperties->count() > 0)

House Properties

@foreach($declaration->houseProperties as $property) @endforeach
Property Name Address Type Annual Rent Municipal Tax Interest on Loan Net Income
{{ $property->property_name ?? '-' }} {{ $property->property_address ?? '-' }} {{ ucwords(str_replace('_', ' ', $property->property_type ?? '-')) }} ₹ {{ number_format($property->annual_rent_received ?? 0, 2) }} ₹ {{ number_format($property->municipal_tax_paid ?? 0, 2) }} ₹ {{ number_format($property->interest_on_loan ?? 0, 2) }} ₹ {{ number_format($property->net_income ?? 0, 2) }}
@endif {{-- Other Incomes Section --}} @if($declaration->otherIncomes && $declaration->otherIncomes->count() > 0)

Other Incomes

@foreach($declaration->otherIncomes as $income) @endforeach
Income Source Amount Remarks
{{ $income->income_source ?? '-' }} ₹ {{ number_format($income->amount ?? 0, 2) }} {{ $income->remarks ?? '-' }}
@endif {{-- Section-wise Review --}}

Section-wise Review

@foreach($declaration->details as $detail)
{{ $detail->taxSection->section_code ?? '-' }}

{{ $detail->taxSection->name ?? '' }}

{{ $detail->description }}

₹ {{ number_format($detail->declared_amount, 2) }}

@if($detail->proof_file && file_exists(public_path($detail->proof_file))) @else No Proof @endif
@endforeach
{{-- Comments & Actions --}}
Cancel
{{-- Hidden Reject Form --}} @else {{-- Read-only view for non-actionable declarations --}} {{-- House Properties Section --}} @if($declaration->houseProperties && $declaration->houseProperties->count() > 0)

House Properties

@foreach($declaration->houseProperties as $property) @endforeach
Property Name Address Type Annual Rent Municipal Tax Interest on Loan Net Income
{{ $property->property_name ?? '-' }} {{ $property->property_address ?? '-' }} {{ ucwords(str_replace('_', ' ', $property->property_type ?? '-')) }} ₹ {{ number_format($property->annual_rent_received ?? 0, 2) }} ₹ {{ number_format($property->municipal_tax_paid ?? 0, 2) }} ₹ {{ number_format($property->interest_on_loan ?? 0, 2) }} ₹ {{ number_format($property->net_income ?? 0, 2) }}
@endif {{-- Other Incomes Section --}} @if($declaration->otherIncomes && $declaration->otherIncomes->count() > 0)

Other Incomes

@foreach($declaration->otherIncomes as $income) @endforeach
Income Source Amount Remarks
{{ $income->income_source ?? '-' }} ₹ {{ number_format($income->amount ?? 0, 2) }} {{ $income->remarks ?? '-' }}
@endif

Declaration Details

@foreach($declaration->details as $detail) @endforeach
Section Description Declared Approved Proof Status Remarks
{{ $detail->taxSection->section_code ?? '-' }}
{{ $detail->taxSection->name ?? '' }}
{{ $detail->description ?? '-' }} ₹ {{ number_format($detail->declared_amount, 2) }} ₹ {{ number_format($detail->approved_amount, 2) }} @php $pColors = ['pending' => 'warning', 'verified' => 'success', 'rejected' => 'danger']; @endphp {{ ucfirst($detail->proof_status) }} {{ $detail->proof_remarks ?? '-' }}
Back @endif {{-- Approval Log --}} @if($declaration->approvalLogs && $declaration->approvalLogs->count() > 0)

Approval History

@foreach($declaration->approvalLogs->sortByDesc('created_at') as $log)
{{ $log->actionUser->name ?? 'System' }} {{ ucfirst($log->action) }} {{ $log->created_at->format('d M Y, h:i A') }}
@if($log->comments)

{{ $log->comments }}

@endif
@endforeach
@endif
@endsection @push('footer-script') @endpush