fixed and improved quarter calculation

This commit is contained in:
Oliver Zander 2025-08-18 12:53:40 +02:00 committed by Tobias Herre
parent fa8d0ab898
commit 70c88440aa
1 changed files with 2 additions and 10 deletions

View File

@ -154,16 +154,8 @@ class Project(Volunteer):
# self.pid = str(self.account.code) + str(self.pk).zfill(3)
print (("Hallo Leute! Ich save jetzt mal MIT PID DANN!!!",self.pid))
# generation of field quartals
if self.end.month in [1, 2, 3]:
self.end_quartal = 'Q1'
if self.end.month in [4, 5, 6]:
self.end_quartal = 'Q2'
if self.end.month in [7, 8, 9]:
self.end_quartal = 'Q3'
if self.end.month in [10, 11, 12]:
self.end_quartal = 'Q4'
if self.end:
self.end_quartal = f'Q{self.end.month // 4 + 1}'
super().save()