mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 13:15:43 +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:
		| @@ -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> | ||||
|   | ||||
| @@ -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', | ||||
|   | ||||
		Reference in New Issue
	
	Block a user