Add total cost column to purchase order list (#4445)

* add total price column to purchase order list

* bump API version
This commit is contained in:
simonkuehling 2023-03-04 00:09:40 +01:00 committed by GitHub
parent 575d62bff4
commit c0f405243a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 2 deletions

View File

@ -2,11 +2,14 @@
# InvenTree API version
INVENTREE_API_VERSION = 98
INVENTREE_API_VERSION = 99
"""
Increment this API version number whenever there is a significant change to the API that any clients need to know about
v99 -> 2023-03-03 : https://github.com/inventree/InvenTree/pull/4445
- Adds sort by "responsible" to PurchaseOrderAPI
v98 -> 2023-02-24 : https://github.com/inventree/InvenTree/pull/4408
- Adds "responsible" filter to Build API

View File

@ -321,6 +321,7 @@ class PurchaseOrderList(APIDownloadMixin, ListCreateAPI):
'target_date',
'line_items',
'status',
'responsible',
]
ordering = '-reference'

View File

@ -2151,11 +2151,20 @@ function loadPurchaseOrderTable(table, options) {
title: '{% trans "Items" %}',
sortable: true,
},
{
field: 'total_price',
title: '{% trans "Total Cost" %}',
switchable: true,
sortable: false,
formatter: function(value, row) {
return formatCurrency(value);
},
},
{
field: 'responsible',
title: '{% trans "Responsible" %}',
switchable: true,
sortable: false,
sortable: true,
formatter: function(value, row) {
if (!row.responsible_detail) {