This commit is contained in:
behruz-dev
2025-11-12 17:44:09 +05:00
parent 3eba00f525
commit 19f2ba6976
3 changed files with 15507 additions and 4 deletions

View File

@@ -151,10 +151,10 @@ class CounterpartyBalance(BaseModel):
total_price=models.Sum("price")
)['total_price'] or 0
party_amount = total_amount - paid_amount
if expence != paid_amount:
return (party_amount + income) - expence
else:
return (total_amount + income) - expence
# if expence != paid_amount:
# return (party_amount + income) - expence
# else:
return (total_amount + income) - expence
def __str__(self):
return f"{self.counterparty.name}"