Feat: fix bug todays income

This commit is contained in:
orangdeso 2025-05-24 22:03:31 +07:00
parent 7c2aa51362
commit 2ce8042138
2 changed files with 1 additions and 3 deletions

View File

@ -10,11 +10,9 @@ class StatisticRepositoryImpl implements StatisticRepository {
Timestamp _tsToDate(DateTime d) =>
Timestamp.fromDate(DateTime(d.year, d.month, d.day).add(const Duration(days: 1)));
// Helper untuk menentukan tanggal awal bulan
Timestamp _tsFirstDayOfMonth(DateTime month) =>
Timestamp.fromDate(DateTime(month.year, month.month, 1));
// Helper untuk menentukan tanggal awal bulan berikutnya
Timestamp _tsFirstDayOfNextMonth(DateTime month) =>
Timestamp.fromDate(DateTime(month.year, month.month + 1, 1));

View File

@ -18,7 +18,7 @@ abstract class StatisticRepository {
required String porterId,
required DateTime date,
});
Stream<double> getMonthlyRevenue({
required String porterId,
required DateTime month,