mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
PayPal: Fix support for CLP
This commit is contained in:
@@ -3,9 +3,9 @@ from decimal import ROUND_HALF_UP, Decimal
|
||||
from django.conf import settings
|
||||
|
||||
|
||||
def round_decimal(dec, currency=None):
|
||||
def round_decimal(dec, currency=None, places_dict=settings.CURRENCY_PLACES):
|
||||
if currency:
|
||||
places = settings.CURRENCY_PLACES.get(currency, 2)
|
||||
places = places_dict.get(currency, 2)
|
||||
return Decimal(dec).quantize(
|
||||
Decimal('1') / 10 ** places, ROUND_HALF_UP
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user