2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-16 12:05:53 +00:00

currency codes in own function

This commit is contained in:
2021-07-01 10:32:07 +02:00
parent 3c6c9c59d6
commit 66c1e9c97d
2 changed files with 27 additions and 6 deletions

View File

@ -6,6 +6,7 @@ User-configurable settings for the common app
from __future__ import unicode_literals
from moneyed import CURRENCIES
from django.conf import settings
import common.models
@ -23,6 +24,14 @@ def currency_code_default():
return code
def currency_codes():
"""
Returns the current currency choices
"""
return [(a, a) for a in settings.CURRENCIES]
def stock_expiry_enabled():
"""
Returns True if the stock expiry feature is enabled