forked from beba/foerderbarometer
fixed and improved quarter calculation
This commit is contained in:
parent
fa8d0ab898
commit
70c88440aa
|
|
@ -154,16 +154,8 @@ class Project(Volunteer):
|
||||||
# self.pid = str(self.account.code) + str(self.pk).zfill(3)
|
# self.pid = str(self.account.code) + str(self.pk).zfill(3)
|
||||||
print (("Hallo Leute! Ich save jetzt mal MIT PID DANN!!!",self.pid))
|
print (("Hallo Leute! Ich save jetzt mal MIT PID DANN!!!",self.pid))
|
||||||
|
|
||||||
|
if self.end:
|
||||||
# generation of field quartals
|
self.end_quartal = f'Q{self.end.month // 4 + 1}'
|
||||||
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'
|
|
||||||
|
|
||||||
super().save()
|
super().save()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue