2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-02 03:30:54 +00:00

Include stock item purchase price in pricing cache (#4292)

* Add setting to control pricing calculation from stock items

* Bug fix for displaying a "null" setting

* Add new fields to PartPricing model

* Add code for calculation of min/max stock item costs

* Update pricing display to use stock item pricing

* Add unit testing for new pricing features

* Automatically update pricing when stock item is created or edited

* Increment API version

* Improvements for price rendering

* Update based on feedback:

- Roll stock item pricing into purchase pricing
- Simplify models
- Update unit tests
This commit is contained in:
Oliver
2023-02-02 21:23:16 +11:00
committed by GitHub
parent df4209801a
commit 9a289948e5
10 changed files with 126 additions and 42 deletions

View File

@ -195,7 +195,7 @@ src="{% static 'img/blank_image.png' %}"
{% if tp == None %}
<span class='badge bg-warning'>{% trans "Total cost could not be calculated" %}</span>
{% else %}
{{ tp }}
{% include "price_data.html" with price=tp %}
{% endif %}
{% endwith %}
</td>

View File

@ -193,7 +193,7 @@ src="{% static 'img/blank_image.png' %}"
{% if tp == None %}
<span class='badge bg-warning'>{% trans "Total cost could not be calculated" %}</span>
{% else %}
{{ tp }}
{% include "price_data.html" with price=tp %}
{% endif %}
{% endwith %}
</td>