From 2e3b76d33ff477f103523083ca8d8d72a8e227bd Mon Sep 17 00:00:00 2001 From: behruz-dev Date: Thu, 6 Nov 2025 10:07:08 +0500 Subject: [PATCH] fix --- core/apps/orders/models/party.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/apps/orders/models/party.py b/core/apps/orders/models/party.py index eebaeee..71ac129 100644 --- a/core/apps/orders/models/party.py +++ b/core/apps/orders/models/party.py @@ -99,8 +99,10 @@ class PartyAmount(BaseModel): def save(self, *args, **kwargs): if self.calculated_amount < self.paid_amount: self.overdue_amount = self.paid_amount - self.calculated_amount + self.payment_amount = 0 elif self.calculated_amount > self.paid_amount: self.payment_amount = self.calculated_amount - self.paid_amount + self.overdue_amount = 0 else: self.overdue_amount = 0 self.payment_amount = 0