2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-17 18:26:32 +00:00

Add settings for controlling variant pricing (#3987)

* Add settings for controlling variant pricing

* Select whether to use variant pricing

* Add setting to ignore inactive variants

* Update variant pricing table
This commit is contained in:
Oliver
2022-11-22 11:55:44 +11:00
committed by GitHub
parent 1058a7c490
commit 4f5adef402
4 changed files with 33 additions and 2 deletions

View File

@@ -16,6 +16,9 @@
{% include "InvenTree/settings/setting.html" with key="PRICING_DECIMAL_PLACES" %}
{% include "InvenTree/settings/setting.html" with key="PRICING_UPDATE_DAYS" icon='fa-calendar-alt' %}
{% include "InvenTree/settings/setting.html" with key="PRICING_USE_SUPPLIER_PRICING" icon='fa-check-circle' %}
{% include "InvenTree/settings/setting.html" with key="PRICING_USE_VARIANT_PRICING" icon='fa-check-circle' %}
{% include "InvenTree/settings/setting.html" with key="PRICING_ACTIVE_VARIANTS" %}
</tbody>
</table>
</div>

View File

@@ -695,6 +695,11 @@ function loadVariantPricingChart(options={}) {
options.params.ancestor = part;
if (global_settings.PRICING_ACTIVE_VARIANTS) {
// Filter variants by "active" status
options.params.active = true;
}
table.inventreeTable({
url: '{% url "api-part-list" %}',
name: 'variantpricingtable',