diff --git a/lib/Components/recent_payment_list.dart b/lib/Components/recent_payment_list.dart index 3decd24..78c24a2 100755 --- a/lib/Components/recent_payment_list.dart +++ b/lib/Components/recent_payment_list.dart @@ -33,7 +33,7 @@ class RecentPaymentList extends StatelessWidget { // Fetch all transactions involving this user (sent or received) final txStream = FirebaseFirestore.instance .collection('users').doc(FirebaseAuth.instance.currentUser?.email).collection('transactions') - .orderBy('createdAt', descending: true) + .orderBy('date', descending: true) //transaction for today's date only starting from midnight 12 AM // .where('createdAt', isGreaterThanOrEqualTo: DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day, 0, 0, 0)) .snapshots(); diff --git a/lib/Screens/cateogary_history.dart b/lib/Screens/cateogary_history.dart index 2683e56..57cb473 100644 --- a/lib/Screens/cateogary_history.dart +++ b/lib/Screens/cateogary_history.dart @@ -66,8 +66,8 @@ class _CategoryTransactionsScreenState extends State .doc(user.email) .collection('transactions') .where('category', isEqualTo: widget.categoryName) - .where('date', isGreaterThanOrEqualTo: _startOfMonth) - .where('date', isLessThanOrEqualTo: _endOfMonth) + // .where('date', isGreaterThanOrEqualTo: _startOfMonth) + // .where('date', isLessThanOrEqualTo: _endOfMonth) .orderBy('date', descending: true) .snapshots(), builder: (context, snapshot) { diff --git a/lib/Screens/transaction_search.dart b/lib/Screens/transaction_search.dart index bf8de75..5656911 100644 --- a/lib/Screens/transaction_search.dart +++ b/lib/Screens/transaction_search.dart @@ -38,6 +38,7 @@ class _TransactionSearchPageState extends State { .collection("users") .doc(user.email) .collection("transactions") + .orderBy("date", descending: true) .get(); final List all = snap.docs