Fix sortName for purchase order line item table

This commit is contained in:
Oliver 2021-08-25 12:02:25 +10:00
parent 0073a77e16
commit 2923589c4a

View File

@ -294,7 +294,7 @@ $("#po-table").inventreeTable({
{
field: 'part',
sortable: true,
sortName: 'part__part__name',
sortName: 'part_name',
title: '{% trans "Part" %}',
switchable: false,
formatter: function(value, row, index, field) {
@ -314,7 +314,7 @@ $("#po-table").inventreeTable({
},
{
sortable: true,
sortName: 'part__SKU',
sortName: 'SKU',
field: 'supplier_part_detail.SKU',
title: '{% trans "SKU" %}',
formatter: function(value, row, index, field) {
@ -327,7 +327,7 @@ $("#po-table").inventreeTable({
},
{
sortable: true,
sortName: 'part__MPN',
sortName: 'MPN',
field: 'supplier_part_detail.manufacturer_part_detail.MPN',
title: '{% trans "MPN" %}',
formatter: function(value, row, index, field) {
@ -358,6 +358,7 @@ $("#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;