diff --git a/InvenTree/common/models.py b/InvenTree/common/models.py index 62c17593d8..066f028236 100644 --- a/InvenTree/common/models.py +++ b/InvenTree/common/models.py @@ -205,6 +205,20 @@ class InvenTreeSetting(models.Model): 'validator': bool, }, + 'PART_INTERNAL_PRICE': { + 'name': _('Internal Prices'), + 'description': _('Set internal prices for parts'), + 'default': False, + 'validator': bool + }, + + 'PART_BOM_USE_INTERNAL_PRICE': { + 'name': _('Internal Prices in BOM-Price'), + 'description': _('Use the internal price (if set) for BOM-price calculations'), + 'default': False, + 'validator': bool + }, + 'REPORT_DEBUG_MODE': { 'name': _('Debug Mode'), 'description': _('Generate reports in debug mode (HTML output)'), diff --git a/InvenTree/part/templates/part/internal_prices.html b/InvenTree/part/templates/part/internal_prices.html index 5f37697383..fdc69ce198 100644 --- a/InvenTree/part/templates/part/internal_prices.html +++ b/InvenTree/part/templates/part/internal_prices.html @@ -1,6 +1,7 @@ {% extends "part/part_base.html" %} {% load static %} {% load i18n %} +{% load inventree_extras %} {% block menubar %} {% include 'part/navbar.html' with tab='internal-prices' %} @@ -11,7 +12,8 @@ {% endblock %} {% block details %} - +{% settings_value "PART_INTERNAL_PRICE" as show_internal_price %} +{% if show_internal_price %}