mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-17 04:35:26 +00:00
Display number of items on order
This commit is contained in:
@ -215,6 +215,15 @@ class InvenTreePart extends InvenTreeModel {
|
||||
// Get the number of stock on order for this Part
|
||||
double get onOrder => double.tryParse(jsondata['ordering'].toString()) ?? 0;
|
||||
|
||||
String get onOrderString {
|
||||
|
||||
if (onOrder == onOrder.toInt()) {
|
||||
return onOrder.toInt().toString();
|
||||
} else {
|
||||
return onOrder.toString();
|
||||
}
|
||||
}
|
||||
|
||||
// Get the stock count for this Part
|
||||
double get inStock => double.tryParse(jsondata['in_stock'].toString()) ?? 0;
|
||||
|
||||
|
Reference in New Issue
Block a user