mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-19 13:35:40 +00:00
Merge pull request #2599 from SchrodingersGat/hide-part-pricing-history
Hide part pricing history
This commit is contained in:
@ -126,9 +126,12 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% settings_value "PART_SHOW_PRICE_HISTORY" as show_price_history %}
|
||||
{% if show_price_history %}
|
||||
<div class='panel panel-hidden' id='panel-pricing'>
|
||||
{% include "part/prices.html" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class='panel panel-hidden' id='panel-part-notes'>
|
||||
<div class='panel-heading'>
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
{% settings_value "PART_INTERNAL_PRICE" as show_internal_price %}
|
||||
{% settings_value 'PART_SHOW_RELATED' as show_related %}
|
||||
{% settings_value "PART_SHOW_PRICE_HISTORY" as show_price_history %}
|
||||
|
||||
{% trans "Parameters" as text %}
|
||||
{% include "sidebar_item.html" with label="part-parameters" text=text icon="fa-th-list" %}
|
||||
@ -25,8 +26,10 @@
|
||||
{% trans "Used In" as text %}
|
||||
{% include "sidebar_item.html" with label="used-in" text=text icon="fa-layer-group" %}
|
||||
{% endif %}
|
||||
{% if show_price_history %}
|
||||
{% trans "Pricing" as text %}
|
||||
{% include "sidebar_item.html" with label="pricing" text=text icon="fa-dollar-sign" %}
|
||||
{% endif %}
|
||||
{% if part.salable or part.component %}
|
||||
{% trans "Allocations" as text %}
|
||||
{% include "sidebar_item.html" with label="allocations" text=text icon="fa-bookmark" %}
|
||||
|
@ -395,10 +395,11 @@ class PartDetail(InvenTreeRoleMixin, DetailView):
|
||||
context.update(**ctx)
|
||||
|
||||
# Pricing information
|
||||
ctx = self.get_pricing(self.get_quantity())
|
||||
ctx['form'] = self.form_class(initial=self.get_initials())
|
||||
if InvenTreeSetting.get_setting('PART_SHOW_PRICE_HISTORY', False):
|
||||
ctx = self.get_pricing(self.get_quantity())
|
||||
ctx['form'] = self.form_class(initial=self.get_initials())
|
||||
|
||||
context.update(ctx)
|
||||
context.update(ctx)
|
||||
|
||||
return context
|
||||
|
||||
|
Reference in New Issue
Block a user