diff --git a/InvenTree/order/api.py b/InvenTree/order/api.py index e728b19226..cb33b3f680 100644 --- a/InvenTree/order/api.py +++ b/InvenTree/order/api.py @@ -239,12 +239,13 @@ class POLineItemList(generics.ListCreateAPIView): } ordering_fields = [ - 'part_name', 'MPN', - 'SKU', - 'reference', + 'part_name', + 'purchase_price', 'quantity', 'received', + 'reference', + 'SKU', ] search_fields = [ diff --git a/InvenTree/order/templates/order/purchase_order_detail.html b/InvenTree/order/templates/order/purchase_order_detail.html index 52355f1266..2048599825 100644 --- a/InvenTree/order/templates/order/purchase_order_detail.html +++ b/InvenTree/order/templates/order/purchase_order_detail.html @@ -358,7 +358,6 @@ $("#po-table").inventreeTable({ { sortable: true, field: 'purchase_price', - sortName: 'price', title: '{% trans "Unit Price" %}', formatter: function(value, row) { return row.purchase_price_string || row.purchase_price;