Add 8+ Year Long-Term CGT Section with 33% Tax Rate
Features: - New section specifically for holdings over 8 years - Fixed 33% CGT rate for ultra long-term positions - Automatic identification of 8+ year old trades - Comprehensive breakdown showing individual position performance - Visual cards displaying key metrics: - Eligible holdings count and total value - Total gains on 8+ year positions - CGT liability at 33% rate - After-tax gains calculation Calculation Logic: - Identifies all buy trades that are 8+ years old (≥2920 days) - Groups trades by ETF symbol for position-level calculations - Calculates current value vs original cost basis - Applies 33% tax rate only to positive gains - Shows holding period for each position in years - Displays both gross and net (after-tax) performance Visual Design: - Distinct blue color scheme to differentiate from other CGT calculations - Calendar icon (📅) to emphasize long-term nature - Detailed breakdown cards for each qualifying position - Color-coded positive/negative performance indicators - Professional grid layout with responsive design Display Features: - Only appears when current prices are updated - Hidden when no positions qualify (under 8 years) - Shows exact holding period in years for each position - Individual CGT liability and after-tax gains per position - Clear distinction from existing variable-rate CGT system 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
+38
@@ -326,6 +326,44 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="long-term-cgt-section" id="long-term-cgt-section" style="display: none;">
|
||||
<h3>8+ Year Holdings - Long-Term CGT (33%)</h3>
|
||||
<div class="long-term-cgt-summary">
|
||||
<div class="long-term-cgt-grid">
|
||||
<div class="long-term-cgt-card total-eligible">
|
||||
<h4>Eligible Holdings (8+ Years)</h4>
|
||||
<div class="long-term-value" id="long-term-eligible-value">€0.00</div>
|
||||
<div class="long-term-detail" id="long-term-eligible-count">0 positions</div>
|
||||
</div>
|
||||
|
||||
<div class="long-term-cgt-card total-gains-8yr">
|
||||
<h4>Total Gains (8+ Years)</h4>
|
||||
<div class="long-term-value" id="long-term-total-gains">€0.00</div>
|
||||
<div class="long-term-detail" id="long-term-gains-percentage">0.0% gain</div>
|
||||
</div>
|
||||
|
||||
<div class="long-term-cgt-card cgt-liability-8yr">
|
||||
<h4>CGT Liability (33%)</h4>
|
||||
<div class="long-term-value negative" id="long-term-cgt-liability">€0.00</div>
|
||||
<div class="long-term-detail">On gains over 8 years</div>
|
||||
</div>
|
||||
|
||||
<div class="long-term-cgt-card after-tax-8yr">
|
||||
<h4>After-Tax Gains</h4>
|
||||
<div class="long-term-value" id="long-term-after-tax">€0.00</div>
|
||||
<div class="long-term-detail" id="long-term-effective-rate">Effective rate: 33%</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="long-term-breakdown">
|
||||
<h4>8+ Year Holdings Breakdown</h4>
|
||||
<div id="long-term-breakdown-list" class="long-term-breakdown-list">
|
||||
<p class="no-data">No holdings over 8 years</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="gains-breakdown-section">
|
||||
<h3>Individual Performance</h3>
|
||||
<div id="gains-breakdown-list" class="gains-breakdown-list">
|
||||
|
||||
Reference in New Issue
Block a user