mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-30 20:55:42 +00:00 
			
		
		
		
	Display total part quantity in BOM footer
- https://stackoverflow.com/questions/45190917/bootstrap-table-footer-functions-not-working-data-footer-formatter
This commit is contained in:
		| @@ -121,7 +121,16 @@ function loadBomTable(table, options) { | |||||||
|                 } |                 } | ||||||
|  |  | ||||||
|                 return text; |                 return text; | ||||||
|             } |             }, | ||||||
|  |             footerFormatter: function(data) { | ||||||
|  |                 var quantity = 0; | ||||||
|  |  | ||||||
|  |                 data.forEach(function(item) { | ||||||
|  |                     quantity += item.quantity; | ||||||
|  |                 }); | ||||||
|  |  | ||||||
|  |                 return quantity; | ||||||
|  |             }, | ||||||
|         } |         } | ||||||
|     ); |     ); | ||||||
|  |  | ||||||
| @@ -195,6 +204,7 @@ function loadBomTable(table, options) { | |||||||
|         search: true, |         search: true, | ||||||
|         formatNoMatches: function() { return "No BOM items found"; }, |         formatNoMatches: function() { return "No BOM items found"; }, | ||||||
|         clickToSelect: true, |         clickToSelect: true, | ||||||
|  |         showFooter: true, | ||||||
|         queryParams: function(p) { |         queryParams: function(p) { | ||||||
|             return { |             return { | ||||||
|                 part: options.parent_id, |                 part: options.parent_id, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user