2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-29 12:06:44 +00:00

Fix display of purchase order lines (#8339)

This commit is contained in:
Oliver 2024-10-23 14:33:31 +11:00 committed by GitHub
parent 295f733ed9
commit 28146bbbf0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 7 deletions

View File

@ -2098,7 +2098,7 @@ function loadPurchaseOrderLineItemTable(table, options={}) {
{ {
sortable: true, sortable: true,
sortName: 'MPN', sortName: 'MPN',
field: 'supplier_part_detail.manufacturer_part_detail.MPN', field: 'mpn',
title: '{% trans "MPN" %}', title: '{% trans "MPN" %}',
formatter: function(value, row, index, field) { formatter: function(value, row, index, field) {
if (row.supplier_part_detail && row.supplier_part_detail.manufacturer_part) { if (row.supplier_part_detail && row.supplier_part_detail.manufacturer_part) {

View File

@ -201,7 +201,7 @@ export function PurchaseOrderLineItemTable({
title: t`Pack Quantity` title: t`Pack Quantity`
}, },
{ {
accessor: 'supplier_part_detail.SKU', accessor: 'sku',
title: t`Supplier Code`, title: t`Supplier Code`,
switchable: false, switchable: false,
sortable: true, sortable: true,
@ -213,12 +213,10 @@ export function PurchaseOrderLineItemTable({
sortable: false sortable: false
}), }),
{ {
accessor: 'MPN', accessor: 'mpn',
ordering: 'MPN',
title: t`Manufacturer Code`, title: t`Manufacturer Code`,
sortable: true, sortable: true
render: (record: any) =>
record?.supplier_part_detail?.manufacturer_part_detail?.MPN
}, },
CurrencyColumn({ CurrencyColumn({
accessor: 'purchase_price', accessor: 'purchase_price',