Allow sorting by purchase price (unit price)

This commit is contained in:
Oliver 2021-08-26 07:50:19 +10:00
parent 4b8ef2ad62
commit 8660f13ef5
2 changed files with 4 additions and 4 deletions

View File

@ -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 = [

View File

@ -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;