diff --git a/lib/objectbox/actions.dart b/lib/objectbox/actions.dart index 60ce6fc..40b325f 100644 --- a/lib/objectbox/actions.dart +++ b/lib/objectbox/actions.dart @@ -144,13 +144,14 @@ extension MainActions on ObjectBox { bool ignoreTransfers = true, String? currencyOverride, }) async { - final Condition dateFilter = - Transaction_.transactionDate.betweenDate(from, to); + final Condition dateFilter = Transaction_.transactionDate + .betweenDate(from, to) + .and(Transaction_.isPending + .isNull() + .or(Transaction_.isPending.notEquals(true))); - final Query transactionsQuery = ObjectBox() - .box() - .query(dateFilter.and(Transaction_.isPending.notEquals(true))) - .build(); + final Query transactionsQuery = + ObjectBox().box().query(dateFilter).build(); final List transactions = await transactionsQuery.findAsync(); @@ -181,13 +182,14 @@ extension MainActions on ObjectBox { bool omitZeroes = true, String? currencyOverride, }) async { - final Condition dateFilter = - Transaction_.transactionDate.betweenDate(from, to); - - final Query transactionsQuery = ObjectBox() - .box() - .query(dateFilter.and(Transaction_.isPending.notEquals(true))) - .build(); + final Condition dateFilter = Transaction_.transactionDate + .betweenDate(from, to) + .and(Transaction_.isPending + .isNull() + .or(Transaction_.isPending.notEquals(true))); + + final Query transactionsQuery = + ObjectBox().box().query(dateFilter).build(); final List transactions = await transactionsQuery.findAsync(); diff --git a/pubspec.yaml b/pubspec.yaml index 8997f93..a70f064 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: A personal finance managing app publish_to: "none" # Remove this line if you wish to publish to pub.dev -version: "0.8.1+80" +version: "0.8.1+81" environment: sdk: ">=3.5.0 <4.0.0"