fix
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user