This commit is contained in:
behruz-dev
2025-11-10 17:27:28 +05:00
parent 369f4c9c0b
commit 64354fee80

View File

@@ -70,15 +70,9 @@ class Party(BaseModel):
elif self.status == 'PURCHASED': elif self.status == 'PURCHASED':
self.process = 75 self.process = 75
elif self.status == 'PARTY_IS_MADE': elif self.status == 'PARTY_IS_MADE':
self.process = 100 for order in self.orders.all():
# if not self.payment_percentage: percentage += order.completion_percentage
# if hasattr(self, 'party_amount') and self.party_amount.paid_amount > 0 and self.party_amount.payment_amount > 0: self.process = percentage
# 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'
return super().save(*args, **kwargs) return super().save(*args, **kwargs)
class Meta: class Meta: