@extends('app-new') @push('head-script') {{-- --}} @endpush @push('styles') @endpush @push('content-header') @endpush @section('content')

Declaration Preview

@if(($declaration->status ?? '') === 'calculated') Calculated @elseif(($declaration->status ?? '') === 'active') Active @else {{ ucfirst($declaration->status ?? 'Draft') }} @endif
Declaration Details
@if($profile) @endif
Employee: {{ $declaration->employee->name ?? 'N/A' }}
Employee Code: {{ $declaration->employee->employee_code ?? 'N/A' }}
Financial Year: {{ $declaration->financialYear?->label ?? $fy ?? 'N/A' }}
Regime: {{ strtoupper($declaration->regime ?? 'OLD') }}
Annual CTC: ₹ {{ number_format($profile->annual_ctc ?? 0, 2) }}
Basic Salary (Annual): ₹ {{ number_format($profile->basic_salary ?? 0, 2) }}
HRA Received (Annual): ₹ {{ number_format($profile->hra_received ?? 0, 2) }}
Rent Paid (Annual): ₹ {{ number_format($profile->rent_paid ?? 0, 2) }}
Metro City: {{ ($profile->is_metro_city ?? false) ? 'Yes' : 'No' }}
Submission Details
Declaration Version: v{{ $calculation->version ?? 1 }}
Status: @if(($declaration->status ?? '') === 'calculated') Calculated @elseif(($declaration->status ?? '') === 'active') Active @else {{ ucfirst($declaration->status ?? 'Draft') }} @endif
Created: {{ $declaration->created_at?->format('d-M-Y H:i') ?? 'N/A' }}
@if($calculation)
Calculation Breakdown
Item Amount (₹)
Gross Income {{ number_format($calculation->gross_income ?? 0, 2) }}
HRA Exemption -{{ number_format($calculation->hra_exemption ?? 0, 2) }}
Standard Deduction -{{ number_format($calculation->standard_deduction ?? 0, 2) }}
House Property Income {{ number_format($calculation->house_property_income ?? 0, 2) }}
Other Income {{ number_format($calculation->other_income ?? 0, 2) }}
Total Deductions -{{ number_format($calculation->total_deductions ?? 0, 2) }}
Taxable Income {{ number_format($calculation->taxable_income ?? 0, 2) }}
Tax Amount {{ number_format($calculation->tax_amount ?? 0, 2) }}
Surcharge {{ number_format($calculation->surcharge ?? 0, 2) }}
Rebate (87A) -{{ number_format($calculation->rebate ?? 0, 2) }}
Education Cess {{ number_format($calculation->education_cess ?? 0, 2) }}
Total Tax Liability {{ number_format($calculation->total_tax ?? 0, 2) }}
Tax Already Deducted {{ number_format($calculation->tax_already_deducted ?? 0, 2) }}
Remaining Tax Due / Refund {{ number_format($calculation->remaining_tax ?? 0, 2) }}
Remaining Months {{ $calculation->remaining_months ?? 0 }}
Monthly TDS {{ number_format($calculation->monthly_tds ?? 0, 2) }}
@endif @if($deductions && count($deductions) > 0)
Section-wise Deductions
@forelse($deductions as $deduction) @empty @endforelse
Section Declared (₹) Approved (₹)
{{ $deduction->taxSection->section_code ?? 'N/A' }} - {{ $deduction->taxSection->description ?? '' }} {{ number_format($deduction->declared_amount ?? 0, 2) }} {{ number_format($deduction->approved_amount ?? 0, 2) }}
No deductions recorded
@endif @if($declaration->houseProperties && count($declaration->houseProperties) > 0)
House Property Details
@foreach($declaration->houseProperties as $hp) @endforeach
Property Type Annual Rent (₹) Municipal Tax (₹) Interest on Loan (₹) Net Income (₹)
{{ $hp->property_name ?? 'N/A' }} {{ $hp->property_type === 'self_occupied' ? 'Self Occupied' : 'Let Out' }} {{ number_format($hp->annual_rent_received ?? 0, 2) }} {{ number_format($hp->municipal_tax_paid ?? 0, 2) }} {{ number_format($hp->interest_on_loan ?? 0, 2) }} {{ number_format($hp->net_income ?? 0, 2) }}
@endif @if($declaration->otherIncomes && count($declaration->otherIncomes) > 0)
Other Income Details
@foreach($declaration->otherIncomes as $oi) @endforeach
Source Description Amount (₹)
{{ $oi->source_name ?? 'N/A' }} {{ $oi->description ?? '-' }} {{ number_format($oi->amount ?? 0, 2) }}
Total Other Income {{ number_format($declaration->otherIncomes->sum('amount'), 2) }}
@endif @if($monthly_tds && count($monthly_tds) > 0)
Monthly TDS Breakdown
@forelse($monthly_tds as $tds) @empty @endforelse
Month & Year Gross Salary (₹) TDS Amount (₹) Cumulative TDS (₹) Status
{{ DateTime::createFromFormat('!m', $tds->month ?? 1)->format('F') }} {{ $tds->year ?? date('Y') }} {{ number_format($tds->gross_salary ?? 0, 2) }} {{ number_format($tds->tds_amount ?? 0, 2) }} {{ number_format($tds->cumulative_tds ?? 0, 2) }} @if(($tds->status ?? '') === 'active') Active @elseif(($tds->status ?? '') === 'superseded') Superseded @else {{ $tds->status ?? 'Pending' }} @endif
No monthly TDS records
@endif @if($versionChain && count($versionChain) > 0)
Version History
@forelse($versionChain as $version) id === ($calculation->id ?? null)) class="table-active" @endif> @empty @endforelse
Version Status Created Gross Income (₹) Taxable Income (₹) Total Tax (₹)
v{{ $version->version ?? 1 }} @if($version->id === ($calculation->id ?? null)) CURRENT @endif @if(($version->status ?? '') === 'superseded') Superseded @elseif(($version->status ?? '') === 'active') Active @else {{ $version->status ?? 'N/A' }} @endif {{ $version->created_at->format('d-M-Y H:i') ?? 'N/A' }} {{ number_format($version->gross_income ?? 0, 2) }} {{ number_format($version->taxable_income ?? 0, 2) }} {{ number_format($version->total_tax ?? 0, 2) }}
No version history
@endif @if($declaration->approvalLogs && count($declaration->approvalLogs) > 0)
Approval Workflow History
@forelse($declaration->approvalLogs->sortByDesc('created_at') as $log) @empty @endforelse
Date & Time Action By Comments
{{ $log->created_at->format('d-M-Y H:i') ?? 'N/A' }} @if(($log->action ?? '') === 'calculated') Calculated @elseif(($log->action ?? '') === 'approved') Approved @elseif(($log->action ?? '') === 'rejected') Rejected @elseif(($log->action ?? '') === 'superseded') Superseded @else {{ $log->action ?? 'N/A' }} @endif {{ $log->actionUser->name ?? 'System' }} {{ $log->comments ?? '-' }}
No approval logs
@endif
Actions
@if(in_array($declaration->status ?? '', ['calculated', 'draft']))
@else
@if(($declaration->status ?? '') === 'active') ✓ Active @elseif(($declaration->status ?? '') === 'superseded') ⚠ Superseded by newer version @else {{ ucfirst($declaration->status ?? 'N/A') }} @endif
@endif
@endsection @push('footer-script') @endpush