feat: paid course from course creation form

This commit is contained in:
Jannat Patel
2023-08-14 19:30:33 +05:30
parent 3b3f1d692f
commit 2ba85ba6a7
12 changed files with 97 additions and 31 deletions

View File

@@ -475,7 +475,7 @@ def get_evaluation_details(course, member=None):
def format_amount(amount, currency):
amount_reduced = amount / 1000
if amount_reduced < 1:
return amount
return fmt_money(amount, 0, currency)
precision = 0 if amount % 1000 == 0 else 1
return _("{0}k").format(fmt_money(amount_reduced, precision, currency))