You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
300 B
Python
12 lines
300 B
Python
from math import ceil
|
|
from django import template
|
|
from django.conf import settings
|
|
|
|
|
|
register = template.Library()
|
|
|
|
@register.filter(is_safe=True)
|
|
def determine_platform_fee(value):
|
|
platform_fee_xmr = float(value * (settings.PLATFORM_FEE_PERCENT / 100) / 2)
|
|
return round(platform_fee_xmr, 4)
|