@extends('member-new') @push('head-script') @endpush @push('content-header') @endpush @section('content') @php $statusColors = ['draft' => 'secondary', 'calculated' => 'warning', 'active' => 'success', 'rejected' => 'danger']; $regime = $declaration->regime ?? 'old'; @endphp
{{-- Summary --}}
Declaration Summary
{{ ucfirst($declaration->declaration_type ?? 'Provisional') }} {{ ($declaration->status ?? '') === 'active' ? 'Active' : ucfirst($declaration->status ?? 'Draft') }}
Tax Regime
{{ strtoupper($regime) }} REGIME
Financial Year
{{ $declaration->financialYear->label ?? 'N/A' }}
PAN Number
{{ $profile->pan_number ?? 'N/A' }}
Last Updated
{{ $declaration->updated_at?->format('d M Y') ?? '-' }}
@if($profile)
Salary Components
Annual CTC
₹ {{ number_format($profile->annual_ctc ?? 0, 0) }}
Basic (Annual)
₹ {{ number_format($profile->basic_salary ?? 0, 0) }}
HRA Received (Annual)
₹ {{ number_format($profile->hra_received ?? 0, 0) }}
Rent Paid (Annual)
₹ {{ number_format($profile->rent_paid ?? 0, 0) }}
@endif
{{-- Rent Details (HRA) --}} @if($regime === 'old' && ($declaration->rentDetails ?? collect())->count() > 0)
Rent Details (HRA)
@foreach($declaration->rentDetails as $i => $rent)
Period
{{ optional($rent->from_date)->format('d M Y') ?? '-' }} – {{ optional($rent->to_date)->format('d M Y') ?? '-' }}
Rent / Month
₹ {{ number_format($rent->rent_per_month ?? 0, 0) }}
Metro
{{ $rent->is_metro ? 'Yes' : 'No' }}
Relationship
{{ $rent->landlord_relationship ?: '-' }}
Address
{{ $rent->address ?: '-' }}
Landlord
{{ $rent->landlord_name ?: '-' }} @if($rent->landlord_pan) · PAN {{ $rent->landlord_pan }}@endif @if($rent->landlord_aadhaar) · Aadhaar {{ $rent->landlord_aadhaar }}@endif
@if($rent->landlord_address)
{{ $rent->landlord_address }}
@endif
@endforeach
@endif {{-- Investment Declarations --}} @if($regime === 'old' && $deductions && count($deductions) > 0)
Investment Declarations @if(($declaration->declaration_type ?? 'provisional') === 'final') Final @endif
@foreach($deductions as $deduction) @endforeach
Section / Head Declared (₹) Actual (₹) Proof
{{ $deduction->taxSection->name ?? 'N/A' }} @if($deduction->taxSectionHead) ↳ {{ $deduction->taxSectionHead->name ?? '' }} @endif @if($deduction->description) {{ $deduction->description }} @endif {{ number_format($deduction->declared_amount ?? 0, 0) }} {{ number_format($deduction->approved_amount ?? 0, 0) }} @if($deduction->proof_file) @else — @endif
Total ₹ {{ number_format($deductions->sum('declared_amount'), 0) }} ₹ {{ number_format($deductions->sum('approved_amount'), 0) }}
@endif {{-- TDS Calculation Sheet --}} @if($calculation) @php $grossIncome = (float)($calculation->gross_income ?? 0); $actualSalary = (float)($calculation->actual_salary ?? 0); $projectedSalary = (float)($calculation->projected_salary ?? 0); $stdDed = (float)($calculation->standard_deduction ?? 0); $otherInc = (float)($calculation->other_income ?? 0); $houseInc = (float)($calculation->house_property_income ?? 0); $gti = max(0, $grossIncome - $stdDed + $otherInc + $houseInc); $hraEx = (float)($calculation->hra_exemption ?? 0); $chap6 = max(0, ($calculation->total_deductions ?? 0) - $hraEx - $stdDed); $taxableInc = (float)($calculation->taxable_income ?? 0); $taxAmt = (float)($calculation->tax_amount ?? 0); $surcharge = (float)($calculation->surcharge ?? 0); $rebate = (float)($calculation->rebate ?? 0); $cess = (float)($calculation->education_cess ?? 0); $totalTax = (float)($calculation->total_tax ?? 0); $deducted = (float)($calculation->tax_already_deducted ?? 0); $remaining = (float)($calculation->remaining_tax ?? 0); $months = (int)($calculation->remaining_months ?? 0); $monthlyTds = (float)($calculation->monthly_tds ?? 0); $regimeLabel = strtoupper($regime) . ' Regime'; @endphp
Monthly TDS Calculation Version {{ $calculation->version ?? 1 }} · {{ $calculation->created_at?->format('d-M-Y H:i') ?? '' }} · estimated
{{ ucfirst($calculation->status ?? 'Calculated') }}
@if($regime === 'old') @if($calculation->deductions && count($calculation->deductions) > 0) @foreach($calculation->deductions as $calcDed) @if(($calcDed->eligible_amount ?? 0) > 0) @endif @endforeach @endif @endif
Description Projected (₹) {{ $regimeLabel }} (₹)
Actual Salary (past months from payslips) {{ number_format($actualSalary, 0) }}
Projected Salary (current & future months) {{ number_format($projectedSalary, 0) }}
Projected Gross Salary (Total) {{ number_format($grossIncome, 0) }} {{ number_format($grossIncome, 0) }}
Less: Standard Deduction u/s 16 {{ $stdDed > 0 ? '-' . number_format($stdDed, 0) : '0' }}
Gross Total Income {{ number_format($gti, 0) }}
Less: HRA Exemption {{ $hraEx > 0 ? '-' . number_format($hraEx, 0) : '0' }}
Less: Deductions under Chapter VI-A {{ $chap6 > 0 ? '-' . number_format($chap6, 0) : '0' }}
{{ $calcDed->taxSection->name ?? '' }}@if($calcDed->taxSectionHead) · {{ $calcDed->taxSectionHead->name }}@endif {{ number_format($calcDed->eligible_amount, 0) }}
Total Taxable Income {{ number_format($taxableInc, 0) }}
Tax on Total Income {{ number_format($taxAmt, 0) }}
Add: Surcharge {{ number_format($surcharge, 0) }}
Less: Rebate u/s 87A {{ $rebate > 0 ? '-' . number_format($rebate, 0) : '0' }}
Add: Health & Education Cess (4%) {{ number_format($cess, 0) }}
Total Tax Liability {{ number_format($totalTax, 0) }}
Less: Tax Deducted Till Date {{ number_format($deducted, 0) }}
Tax to be Deducted (Balance) {{ number_format($remaining, 0) }}
Remaining Months in FY {{ $months }} months
Monthly TDS (estimated) ₹ {{ number_format($monthlyTds, 0) }}
@else
No Calculation Yet

Tax has not been calculated for this declaration yet.

@endif {{-- Monthly TDS Breakdown --}} @if($monthly_tds && count($monthly_tds) > 0)
Monthly TDS Breakdown
@foreach($monthly_tds as $tds) @endforeach
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, 0) }} {{ number_format($tds->tds_amount ?? 0, 0) }} {{ number_format($tds->cumulative_tds ?? 0, 0) }} @if(($tds->status ?? '') === 'deducted') Deducted @elseif(($tds->status ?? '') === 'pending') Pending @else {{ ucfirst($tds->status ?? 'N/A') }} @endif
@endif {{-- Approval Workflow History --}} @if($declaration->approvalLogs && count($declaration->approvalLogs) > 0)
Approval Workflow History
@foreach($declaration->approvalLogs->sortByDesc('created_at') as $log) @endforeach
Date & Time Action By Comments
{{ $log->created_at?->format('d-M-Y H:i') ?? 'N/A' }} @php $ac = ['calculated' => 'info', 'approved' => 'success', 'rejected' => 'danger', 'superseded' => 'warning']; @endphp {{ ucfirst($log->action ?? 'N/A') }} {{ $log->actionUser->name ?? 'System' }} {{ $log->comments ?? '-' }}
@endif
@endsection @push('footer-script') @endpush