fuck
This commit is contained in:
@@ -70,15 +70,9 @@ class Party(BaseModel):
|
||||
elif self.status == 'PURCHASED':
|
||||
self.process = 75
|
||||
elif self.status == 'PARTY_IS_MADE':
|
||||
self.process = 100
|
||||
# if not self.payment_percentage:
|
||||
# if hasattr(self, 'party_amount') and self.party_amount.paid_amount > 0 and self.party_amount.payment_amount > 0:
|
||||
# self.payment_percentage = (self.party_amount.paid_amount / self.party_amount.payment_amount) * 100
|
||||
# self.party_amount.save()
|
||||
|
||||
# else:
|
||||
# self.payment_percentage = 100.0
|
||||
# self.status == 'PURCHASED'
|
||||
for order in self.orders.all():
|
||||
percentage += order.completion_percentage
|
||||
self.process = percentage
|
||||
return super().save(*args, **kwargs)
|
||||
|
||||
class Meta:
|
||||
|
||||
Reference in New Issue
Block a user