Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/Components/recent_payment_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions lib/Screens/cateogary_history.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ class _CategoryTransactionsScreenState extends State<CategoryTransactionsScreen>
.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) {
Expand Down
1 change: 1 addition & 0 deletions lib/Screens/transaction_search.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class _TransactionSearchPageState extends State<TransactionSearchPage> {
.collection("users")
.doc(user.email)
.collection("transactions")
.orderBy("date", descending: true)
.get();

final List<TransactionModel> all = snap.docs
Expand Down
Loading