diff --git a/InvenTree/common/models.py b/InvenTree/common/models.py index 236e48770f..ec76475901 100644 --- a/InvenTree/common/models.py +++ b/InvenTree/common/models.py @@ -703,7 +703,7 @@ class PriceBreak(models.Model): price = MoneyField( max_digits=19, decimal_places=4, - default_currency='USD', + default_currency=currency_code_default(), null=True, verbose_name=_('Price'), help_text=_('Unit price at specified quantity'), diff --git a/InvenTree/company/forms.py b/InvenTree/company/forms.py index 62a46fcd6f..6ffa94b746 100644 --- a/InvenTree/company/forms.py +++ b/InvenTree/company/forms.py @@ -14,7 +14,7 @@ import django.forms import djmoney.settings from djmoney.forms.fields import MoneyField -import common.settings +from common.settings import currency_code_default from .models import Company from .models import ManufacturerPart @@ -38,7 +38,7 @@ class EditCompanyForm(HelperForm): label=_('Currency'), help_text=_('Default currency used for this company'), choices=[('', '----------')] + djmoney.settings.CURRENCY_CHOICES, - initial=common.settings.currency_code_default, + initial=currency_code_default, ) class Meta: @@ -116,7 +116,7 @@ class EditSupplierPartForm(HelperForm): single_pricing = MoneyField( label=_('Single Price'), - default_currency='USD', + default_currency=currency_code_default(), help_text=_('Single quantity price'), decimal_places=4, max_digits=19, diff --git a/InvenTree/order/models.py b/InvenTree/order/models.py index fb169e0536..49504b6d89 100644 --- a/InvenTree/order/models.py +++ b/InvenTree/order/models.py @@ -17,6 +17,8 @@ from django.contrib.auth.models import User from django.urls import reverse from django.utils.translation import ugettext_lazy as _ +from common.settings import currency_code_default + from markdownx.models import MarkdownxField from djmoney.models.fields import MoneyField @@ -664,7 +666,7 @@ class PurchaseOrderLineItem(OrderLineItem): purchase_price = MoneyField( max_digits=19, decimal_places=4, - default_currency='USD', + default_currency=currency_code_default(), null=True, blank=True, verbose_name=_('Purchase Price'), help_text=_('Unit purchase price'), @@ -693,7 +695,7 @@ class SalesOrderLineItem(OrderLineItem): sale_price = MoneyField( max_digits=19, decimal_places=4, - default_currency='USD', + default_currency=currency_code_default(), null=True, blank=True, verbose_name=_('Sale Price'), help_text=_('Unit sale price'), diff --git a/InvenTree/part/templates/part/order_prices.html b/InvenTree/part/templates/part/order_prices.html index 6c5b2173bf..e165ee9c74 100644 --- a/InvenTree/part/templates/part/order_prices.html +++ b/InvenTree/part/templates/part/order_prices.html @@ -13,7 +13,7 @@ {% endblock %} {% block details %} -{% settings_value "INVENTREE_DEFAULT_CURRENCY" as currency %} +{% default_currency as currency %} {% crispy form %} @@ -130,7 +130,7 @@ the part single price shown is the current price for that supplier part">