This commit is contained in:
behruz-dev
2025-11-12 14:45:33 +05:00
parent d376aaa6c1
commit 41a01b4251
5 changed files with 86 additions and 5 deletions

View File

@@ -100,7 +100,6 @@ class PartyAmount(BaseModel):
def save(self, *args, **kwargs):
self.total_price = self.party.orders.aggregate(total_price=models.Sum('total_price'))['total_price'] or 0
self.calculated_amount = self.total_price
if self.calculated_amount < self.paid_amount:
self.overdue_amount = self.paid_amount - self.calculated_amount
self.payment_amount = 0