This commit is contained in:
Oliver Walters 2021-02-09 20:10:36 +11:00
parent 0c4803b889
commit c2aa51ed95
8 changed files with 28 additions and 19 deletions

View file

@ -155,7 +155,7 @@ class InvenTreePart extends InvenTreeModel {
// Request stock items for this part
Future<void> getStockItems(BuildContext context, {bool showDialog=false}) async {
InvenTreeStockItem().list(
await InvenTreeStockItem().list(
context,
filters: {
"part": "${pk}",

View file

@ -287,6 +287,11 @@ class InvenTreeStockItem extends InvenTreeModel {
return 'SN ${serialNumber}';
}
// Is an integer?
if (quantity.toInt() == quantity) {
return '${quantity.toInt()}';
}
return '${quantity}';
}