mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-11-03 22:55:43 +00:00 
			
		
		
		
	Update display of BOM table based on the configurable setting
This commit is contained in:
		@@ -148,6 +148,13 @@ function loadBomTable(table, options) {
 | 
			
		||||
        ordering: 'name',
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    // Do we show part pricing in the BOM table?
 | 
			
		||||
    var show_pricing = global_settings.PART_SHOW_PRICE_IN_BOM;
 | 
			
		||||
 | 
			
		||||
    if (!show_pricing) {
 | 
			
		||||
        params.include_pricing = false;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (options.part_detail) {
 | 
			
		||||
        params.part_detail = true;
 | 
			
		||||
    }
 | 
			
		||||
@@ -282,6 +289,7 @@ function loadBomTable(table, options) {
 | 
			
		||||
        }
 | 
			
		||||
    });
 | 
			
		||||
    
 | 
			
		||||
    if (show_pricing) {
 | 
			
		||||
        cols.push({
 | 
			
		||||
            field: 'purchase_price_range',
 | 
			
		||||
            title: '{% trans "Purchase Price Range" %}',
 | 
			
		||||
@@ -308,6 +316,7 @@ function loadBomTable(table, options) {
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    cols.push({
 | 
			
		||||
        field: 'optional',
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user