feat: usd pricing

This commit is contained in:
Jannat Patel
2023-12-21 12:28:11 +05:30
parent caea7e334c
commit 13536b8bad
10 changed files with 67 additions and 19 deletions

View File

@@ -26,6 +26,7 @@ def get_context(context):
"currency",
"seat_count",
"published",
"amount_usd",
],
order_by="start_date",
)
@@ -36,7 +37,9 @@ def get_context(context):
batch.course_count = frappe.db.count("Batch Course", {"parent": batch.name})
if batch.amount and batch.currency:
amount, currency = check_multicurrency(batch.amount, batch.currency)
amount, currency = check_multicurrency(
batch.amount, batch.currency, None, batch.amount_usd
)
batch.amount = amount
batch.currency = currency