From 3d25fdc99fd37f3b5e37f25b7a38804a02130426 Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Wed, 17 Aug 2022 11:41:48 +0200 Subject: money calculation working --- lib/pages/logbook_page.dart | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/pages/logbook_page.dart') 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(); } } -- cgit v1.2.3-70-g09d2