2
0
mirror of https://github.com/inventree/inventree-app.git synced 2026-01-22 10:49:41 +00:00

Improve Sales Order UX: Stock Location, Customer Filtering & Enhanced List View (#756)

* feat(sales-order): Improve UX with location display, customer filtering, and enhanced list

- Show stock location when selecting items to allocate in sales orders
- Filter inactive customers from customer selection dropdown
- Display customer name and order total in sales order list view

These changes improve the day-to-day usability for warehouse and field staff
by providing more context in key workflows without requiring extra navigation.

* Format code
This commit is contained in:
Enmanuel Sancho Quintanilla
2026-01-21 15:37:42 -06:00
committed by GitHub
parent 97e4c98e46
commit 772c88170e
4 changed files with 12 additions and 3 deletions

View File

@@ -732,6 +732,7 @@ class APIFormField {
return ListTile(
title: Text(item.partName),
subtitle: Text(item.locationPathString),
leading: InvenTreeAPI().getThumbnail(item.partThumbnail),
trailing: Text(item.quantityString()),
);

View File

@@ -48,7 +48,7 @@ class InvenTreeSalesOrder extends InvenTreeOrder {
Map<String, Map<String, dynamic>> fields = {
"reference": {},
"customer": {
"filters": {"is_customer": true},
"filters": {"is_customer": true, "active": true},
},
"customer_reference": {},
"description": {},

View File

@@ -151,9 +151,16 @@ class _PaginatedSalesOrderListState
InvenTreeCompany? customer = order.customer;
// Build subtitle with customer name and optional total price
String subtitle = customer?.name ?? order.description;
if (order.totalPrice != null && order.totalPrice! > 0) {
subtitle +=
"${order.totalPriceCurrency} ${order.totalPrice!.toStringAsFixed(2)}";
}
return ListTile(
title: Text(order.reference),
subtitle: Text(order.description),
subtitle: Text(subtitle),
leading: customer == null
? null
: InvenTreeAPI().getThumbnail(customer.thumbnail),

View File

@@ -55,10 +55,11 @@ class _PaginatedSOAllocationListState
InvenTreePart? part = allocation.part;
InvenTreeStockItem? stockItem = allocation.stockItem;
InvenTreeStockLocation? location = allocation.location;
return ListTile(
title: Text(part?.fullname ?? ""),
subtitle: Text(part?.description ?? ""),
subtitle: Text(location?.pathstring ?? L10().locationNotSet),
onTap: () async {
stockItem?.goToDetailPage(context);
},