This commit is contained in:
Ross
2020-05-24 10:16:25 +01:00
parent 63dcc7ce78
commit a6326bcaf6
15 changed files with 1138 additions and 809 deletions
+5 -1
View File
@@ -57,6 +57,9 @@ class Worker:
if end_oop_date > Rota.rota_end_date:
end_oop_date = Rota.rota_end_date
if start_oop_date < Rota.start_date:
start_oop_date = Rota.start_date
oop_length = (end_oop_date - start_oop_date).days
days_to_work = days_to_work - oop_length
@@ -85,9 +88,10 @@ class Worker:
self.fte_adj = self.fte * self.proportion_rota_to_work
def __lt__(self, other):
return (self.site, self.grade, self.name) < (
return (self.site, self.grade, self.fte_adj, self.name) < (
other.site,
other.grade,
other.fte_adj,
other.name,
)