mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Allow sorting by purchase price (unit price)
This commit is contained in:
parent
4b8ef2ad62
commit
8660f13ef5
@ -239,12 +239,13 @@ class POLineItemList(generics.ListCreateAPIView):
|
|||||||
}
|
}
|
||||||
|
|
||||||
ordering_fields = [
|
ordering_fields = [
|
||||||
'part_name',
|
|
||||||
'MPN',
|
'MPN',
|
||||||
'SKU',
|
'part_name',
|
||||||
'reference',
|
'purchase_price',
|
||||||
'quantity',
|
'quantity',
|
||||||
'received',
|
'received',
|
||||||
|
'reference',
|
||||||
|
'SKU',
|
||||||
]
|
]
|
||||||
|
|
||||||
search_fields = [
|
search_fields = [
|
||||||
|
@ -358,7 +358,6 @@ $("#po-table").inventreeTable({
|
|||||||
{
|
{
|
||||||
sortable: true,
|
sortable: true,
|
||||||
field: 'purchase_price',
|
field: 'purchase_price',
|
||||||
sortName: 'price',
|
|
||||||
title: '{% trans "Unit Price" %}',
|
title: '{% trans "Unit Price" %}',
|
||||||
formatter: function(value, row) {
|
formatter: function(value, row) {
|
||||||
return row.purchase_price_string || row.purchase_price;
|
return row.purchase_price_string || row.purchase_price;
|
||||||
|
Loading…
Reference in New Issue
Block a user