From 31a02a69ac42b06c981addfa9a3d25a7f5dfc49a Mon Sep 17 00:00:00 2001 From: kris Date: Thu, 28 Aug 2025 18:20:36 +0000 Subject: [PATCH] Add comprehensive Capital Gains Tax (CGT) calculation feature MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Features: - Configurable CGT rates by holding period (1M, 6M, 1Y, 2Y, 2Y+) - Annual CGT exemption allowance support - Real-time CGT calculations based on holding periods - FIFO (First In, First Out) method for calculating gains - Interactive CGT settings page with visual rate preview - Integration with gains/losses page showing: - Total CGT liability estimation - After-tax gains calculation - Effective tax rate display - Holdings breakdown by tax period - Database schema for per-user CGT settings - Comprehensive API endpoints for CGT management - Responsive design with professional styling CGT calculation methodology: - Uses trade purchase dates to determine holding periods - Applies different rates based on time held (short vs long term) - Factors in annual exemption allowance - Shows estimated tax liability for planning purposes Default rates (configurable): - 0-1 Month: 40% - 1-6 Months: 35% - 6M-1 Year: 30% - 1-2 Years: 20% - 2+ Years: 10% - Annual exemption: €1,270 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- index.html | 124 +++++++++++++++++++ script.js | 349 +++++++++++++++++++++++++++++++++++++++++++++++++++++ server.js | 123 +++++++++++++++++++ styles.css | 331 ++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 927 insertions(+) diff --git a/index.html b/index.html index fbcab42..bb50d88 100644 --- a/index.html +++ b/index.html @@ -33,6 +33,10 @@ Add Trade +