From 51992a92c19a66e3ab080825e6663fcecdae6235 Mon Sep 17 00:00:00 2001 From: Oliver Date: Wed, 25 Aug 2021 18:00:32 +1000 Subject: [PATCH] Change name of purchaseorder line item table - Was conflicting with purchaseorder table - Saved column selections were being overridden --- .../order/templates/order/purchase_order_detail.html | 11 ++++++----- InvenTree/templates/InvenTree/settings/settings.html | 2 -- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/InvenTree/order/templates/order/purchase_order_detail.html b/InvenTree/order/templates/order/purchase_order_detail.html index e4647ce756..80d5513efa 100644 --- a/InvenTree/order/templates/order/purchase_order_detail.html +++ b/InvenTree/order/templates/order/purchase_order_detail.html @@ -28,7 +28,7 @@ {% endif %} - +
@@ -208,13 +208,13 @@ $('#new-po-line').click(function() { {% endif %} function reloadTable() { - $("#po-table").bootstrapTable("refresh"); + $("#po-line-table").bootstrapTable("refresh"); } function setupCallbacks() { // Setup callbacks for the line buttons - var table = $("#po-table"); + var table = $("#po-line-table"); {% if order.status == PurchaseOrderStatus.PENDING %} table.find(".button-line-edit").click(function() { @@ -273,9 +273,9 @@ function setupCallbacks() { } -$("#po-table").inventreeTable({ +$("#po-line-table").inventreeTable({ onPostBody: setupCallbacks, - name: 'purchaseorder', + name: 'purchaseorderlines', sidePagination: 'server', formatNoMatches: function() { return "{% trans 'No line items found' %}"; }, queryParams: { @@ -365,6 +365,7 @@ $("#po-table").inventreeTable({ }, { sortable: true, + field: 'total_price', title: '{% trans "Total price" %}', formatter: function(value, row) { var total = row.purchase_price * row.quantity; diff --git a/InvenTree/templates/InvenTree/settings/settings.html b/InvenTree/templates/InvenTree/settings/settings.html index c28ef016e6..dd946d9055 100644 --- a/InvenTree/templates/InvenTree/settings/settings.html +++ b/InvenTree/templates/InvenTree/settings/settings.html @@ -185,8 +185,6 @@ $('#cat-param-table').inventreeTable({ function loadTemplateTable(pk) { - console.log('refresh:', pk); - // Enable the buttons $('#new-cat-param').removeAttr('disabled');