mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 03:26:24 +00:00
Display serial number for serialized stock
This commit is contained in:
parent
4445973548
commit
034ef89ac3
2 changed files with 9 additions and 1 deletions
|
|
@ -280,6 +280,14 @@ class InvenTreeStockItem extends InvenTreeModel {
|
|||
|
||||
bool isSerialized() => serialNumber != null && quantity.toInt() == 1;
|
||||
|
||||
String serialOrQuantityDisplay() {
|
||||
if (isSerialized()) {
|
||||
return 'SN ${serialNumber}';
|
||||
}
|
||||
|
||||
return '${quantity}';
|
||||
}
|
||||
|
||||
String get locationName {
|
||||
String loc = '';
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ class PartStockList extends StatelessWidget {
|
|||
return ListTile(
|
||||
title: Text("${item.locationName}"),
|
||||
subtitle: Text("${item.locationPathString}"),
|
||||
trailing: Text("${item.quantity}"),
|
||||
trailing: Text(item.serialOrQuantityDisplay()),
|
||||
leading: FaIcon(FontAwesomeIcons.mapMarkerAlt),
|
||||
onTap: () {
|
||||
_openItem(context, item.pk);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue