change party payment

This commit is contained in:
behruz-dev
2025-10-07 15:19:39 +05:00
parent f385bf5d65
commit 1f0af73ade

View File

@@ -64,10 +64,9 @@ class PartyCreateSerializer(serializers.Serializer):
qqs=resource.get("qqs"),
)
)
if validated_data.get("currency") != "uzs":
if resource.get("currency") == "usd":
usd_value = UsdCourse.objects.first().value
total_price += resource.get("amount") * usd_value
if resource.get("currency") == "usd":
usd_value = UsdCourse.objects.first().value
total_price += resource.get("amount") * usd_value
else:
total_price += resource.get("amount")
created_orders = Order.objects.bulk_create(orders)