mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-30 20:55:42 +00:00 
			
		
		
		
	Merge pull request #2021 from SchrodingersGat/table-col-fix
Change name of purchaseorder line item table
This commit is contained in:
		| @@ -28,7 +28,7 @@ | |||||||
|             {% endif %} |             {% endif %} | ||||||
|         </div> |         </div> | ||||||
|          |          | ||||||
|         <table class='table table-striped table-condensed' id='po-table' data-toolbar='#order-toolbar-buttons'> |         <table class='table table-striped table-condensed' id='po-line-table' data-toolbar='#order-toolbar-buttons'> | ||||||
|         </table> |         </table> | ||||||
|     </div> |     </div> | ||||||
| </div> | </div> | ||||||
| @@ -208,13 +208,13 @@ $('#new-po-line').click(function() { | |||||||
| {% endif %} | {% endif %} | ||||||
|  |  | ||||||
| function reloadTable() { | function reloadTable() { | ||||||
|     $("#po-table").bootstrapTable("refresh"); |     $("#po-line-table").bootstrapTable("refresh"); | ||||||
| } | } | ||||||
|  |  | ||||||
| function setupCallbacks() { | function setupCallbacks() { | ||||||
|     // Setup callbacks for the line buttons |     // Setup callbacks for the line buttons | ||||||
|  |  | ||||||
|     var table = $("#po-table"); |     var table = $("#po-line-table"); | ||||||
|  |  | ||||||
|     {% if order.status == PurchaseOrderStatus.PENDING %} |     {% if order.status == PurchaseOrderStatus.PENDING %} | ||||||
|     table.find(".button-line-edit").click(function() { |     table.find(".button-line-edit").click(function() { | ||||||
| @@ -273,9 +273,9 @@ function setupCallbacks() { | |||||||
|  |  | ||||||
| } | } | ||||||
|  |  | ||||||
| $("#po-table").inventreeTable({ | $("#po-line-table").inventreeTable({ | ||||||
|     onPostBody: setupCallbacks, |     onPostBody: setupCallbacks, | ||||||
|     name: 'purchaseorder', |     name: 'purchaseorderlines', | ||||||
|     sidePagination: 'server', |     sidePagination: 'server', | ||||||
|     formatNoMatches: function() { return "{% trans 'No line items found' %}"; }, |     formatNoMatches: function() { return "{% trans 'No line items found' %}"; }, | ||||||
|     queryParams: { |     queryParams: { | ||||||
| @@ -365,6 +365,7 @@ $("#po-table").inventreeTable({ | |||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|             sortable: true, |             sortable: true, | ||||||
|  |             field: 'total_price', | ||||||
|             title: '{% trans "Total price" %}', |             title: '{% trans "Total price" %}', | ||||||
|             formatter: function(value, row) { |             formatter: function(value, row) { | ||||||
|                 var total = row.purchase_price * row.quantity; |                 var total = row.purchase_price * row.quantity; | ||||||
|   | |||||||
| @@ -185,8 +185,6 @@ $('#cat-param-table').inventreeTable({ | |||||||
|  |  | ||||||
| function loadTemplateTable(pk) { | function loadTemplateTable(pk) { | ||||||
|  |  | ||||||
|     console.log('refresh:', pk); |  | ||||||
|  |  | ||||||
|     // Enable the buttons |     // Enable the buttons | ||||||
|     $('#new-cat-param').removeAttr('disabled'); |     $('#new-cat-param').removeAttr('disabled'); | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user