2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-06-17 04:35:26 +00:00

Add snackbar with icon

- stock adjust
- part edit
- location edit
This commit is contained in:
Oliver Walters
2021-02-10 23:51:38 +11:00
parent ce2a866384
commit c8c056f96d
7 changed files with 154 additions and 34 deletions

View File

@ -323,6 +323,15 @@ class InvenTreeStockItem extends InvenTreeModel {
double get quantity => double.tryParse(jsondata['quantity'].toString() ?? '0');
String get quantityString {
if (quantity.toInt() == quantity) {
return quantity.toInt().toString();
} else {
return quantity.toString();
}
}
int get locationId => jsondata['location'] as int ?? -1;
bool isSerialized() => serialNumber != null && quantity.toInt() == 1;