diff options
| author | Aldrik Ramaekers <aldrik@amftech.nl> | 2022-08-17 11:41:48 +0200 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrik@amftech.nl> | 2022-08-17 11:41:48 +0200 |
| commit | 3d25fdc99fd37f3b5e37f25b7a38804a02130426 (patch) | |
| tree | 8cd4eb086492dfacdcd288dba0f1f025f3f66daa /lib/pages/logbook_page.dart | |
| parent | 9649d80a2b0a0c46a8ae68606d3e0cfe6f49faee (diff) | |
money calculation working
Diffstat (limited to 'lib/pages/logbook_page.dart')
| -rw-r--r-- | lib/pages/logbook_page.dart | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/pages/logbook_page.dart b/lib/pages/logbook_page.dart index 0e81f49..0849cda 100644 --- a/lib/pages/logbook_page.dart +++ b/lib/pages/logbook_page.dart @@ -23,11 +23,10 @@ class MonthData { void calculateData() { totalWorkedTime = Duration(); + expectedSalary = 0; for (var shift in shifts) { totalWorkedTime += shift.getElapsedSessionTime(); - } - if (shifts.isNotEmpty) { - expectedSalary = totalWorkedTime.inMinutes * shifts[0].getMinutePayRate(); + expectedSalary += shift.getEarnedMoney(); } } |
