ok for now
This commit is contained in:
@@ -94,6 +94,16 @@ class BankTransaction {
|
||||
final String currency;
|
||||
final bool pending;
|
||||
|
||||
/// Stable local key used for per-occurrence annotations.
|
||||
String get id => '$date|$currency|$amount|$description';
|
||||
|
||||
/// Match key for auto-category (same merchant / description).
|
||||
String get descriptionKey =>
|
||||
description.trim().toLowerCase().replaceAll(RegExp(r'\s+'), ' ');
|
||||
|
||||
/// Exact match for copying notes (same description + amount + currency).
|
||||
String get exactKey => '$descriptionKey|$amount|$currency';
|
||||
|
||||
factory BankTransaction.fromJson(Map<String, dynamic> json) {
|
||||
final rawAmount = json['amount'];
|
||||
final amount = switch (rawAmount) {
|
||||
|
||||
Reference in New Issue
Block a user