This commit is contained in:
behruz-dev
2025-11-12 13:59:57 +05:00
parent cf2bb89e4c
commit 2cce3e9256

View File

@@ -93,11 +93,11 @@ class Command(BaseCommand):
project_folder = ProjectFolder.objects.filter(
name=i["project"]["name"]
).first()
total_amount = i["total_amount"] or i["amount"]
order = Order.objects.create(
product=product,
amount=i["amount"],
total_price=i["total_amount"],
total_price=total_amount,
quantity=i["quantity"],
unity=unit,
currency=i["currency"]["symbol"].lower(),
@@ -106,7 +106,7 @@ class Command(BaseCommand):
counterparty=counterparty,
type='party',
)
total_price += i["total_amount"]
total_price += total_amount
paid_amount += i["paid_amount"]
calculated_amount += i["calculated_amount"]
must_pay_amount += i["must_pay_amount"]