# SUMMARY
Tax year Gain Proceeds Exemption Loss carry Taxable gain Tax (basic) Tax (higher)
=================================================================================================
2020/2021 £2400 £4800 £12300 £0 £0 £0 £0
# TAX YEAR DETAILS
## TAX YEAR 2020/2021
1) SOLD 120 of AAPL on 06/12/2020 for GAIN of £2400
Matches with:
- SECTION 104: 150 at cost basis of £20
Calculation: (120 * 40 - 0) - ( (120 * 20) ) = 2400
# TRANSACTIONS
05/12/2020 BOUGHT 150 of AAPL at £20 with £0 expenses
05/12/2020 BOUGHT 50 of AAPL at £20 with £0 expenses
05/12/2020 BOUGHT 50 of AAPL at £20 with £0 expenses
06/12/2020 SOLD 120 of AAPL at £40 with £0 expenses
# ASSET EVENTS
NONE
The calculation result for the whole CGT should be still correct. But just the printed output is a bit confusing because of this.
The fix could be to copy the original transaction list for printing? I can try to fix after, but just to log down this bug here first.
Ooo that's a good spot yes that's a bug. It'll be because of grouping them up but then all seem to be being printed out in the list at the end. Good find. Will add a test case and fix it.
As pointed in the following screenshot
Input
Output
The transaction printed in the output is wrong (because of grouped result?) It could be the result of this function, where "amount" are accumulated. https://github.com/mattjgalloway/cgtcalc/blob/0391b991bd574a565897310d9cb5dc66a60c10d2/Sources/CGTCalcCore/Models/Transaction.swift#L33-L43
The calculation result for the whole CGT should be still correct. But just the printed output is a bit confusing because of this. The fix could be to copy the original transaction list for printing? I can try to fix after, but just to log down this bug here first.