This commit is contained in:
behruz-dev
2025-11-05 18:08:13 +05:00
parent ea990187b3
commit 8178993dc0
2 changed files with 8 additions and 4 deletions

View File

@@ -102,10 +102,6 @@ class PartyAmount(BaseModel):
verbose_name = 'Partiya Summasi'
verbose_name_plural = 'Partiya summalari'
def save(self, *args, **kwargs):
if self.calculated_amount < self.paid_amount:
self.payment_amount = self.paid_amount - self.calculated_amount
return super().save(*args, **kwargs)
class DeletedParty(BaseModel):
party = models.ForeignKey(Party, on_delete=models.CASCADE, related_name='deleted_parties')