diff --git a/src/rp2/plugin/report/jp/tax_report_jp.py b/src/rp2/plugin/report/jp/tax_report_jp.py index 538c414..0c00be1 100644 --- a/src/rp2/plugin/report/jp/tax_report_jp.py +++ b/src/rp2/plugin/report/jp/tax_report_jp.py @@ -169,15 +169,14 @@ def __generate_asset(self, computed_data: ComputedData, output_file: Any) -> Non in_transaction_set: TransactionSet = computed_data.in_transaction_set out_transaction_set: TransactionSet = computed_data.out_transaction_set intra_transaction_set: TransactionSet = computed_data.intra_transaction_set - entry: AbstractEntry + entry: AbstractTransaction year: int years_2_transaction_sets: Dict[int, List[AbstractTransaction]] = {} previous_year_row_offset: int = 0 # Sort all in and out transactions by year, the fee from intra transactions must be reported for entry in chain(in_transaction_set, out_transaction_set, intra_transaction_set): # type: ignore - transaction: AbstractTransaction = cast(AbstractTransaction, entry) - years_2_transaction_sets.setdefault(transaction.timestamp.year, []).append(entry) + years_2_transaction_sets.setdefault(entry.timestamp.year, []).append(entry) for year, transaction_set in years_2_transaction_sets.items(): # Sort the transactions by timestamp and generate sheet by year