mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-16 04:05:28 +00:00
Cleanup
This commit is contained in:
@ -479,8 +479,9 @@ class InvenTreeStockItem extends InvenTreeModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String get locationName {
|
String get locationName {
|
||||||
if (locationId == -1 || !jsondata.containsKey("location_detail"))
|
if (locationId == -1 || !jsondata.containsKey("location_detail")) {
|
||||||
return "Unknown Location";
|
return "Unknown Location";
|
||||||
|
}
|
||||||
|
|
||||||
String loc = getString("name", subKey: "location_detail");
|
String loc = getString("name", subKey: "location_detail");
|
||||||
|
|
||||||
@ -493,8 +494,9 @@ class InvenTreeStockItem extends InvenTreeModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String get locationPathString {
|
String get locationPathString {
|
||||||
if (locationId == -1 || !jsondata.containsKey("location_detail"))
|
if (locationId == -1 || !jsondata.containsKey("location_detail")) {
|
||||||
return L10().locationNotSet;
|
return L10().locationNotSet;
|
||||||
|
}
|
||||||
|
|
||||||
String _loc = getString("pathstring", subKey: "location_detail");
|
String _loc = getString("pathstring", subKey: "location_detail");
|
||||||
if (_loc.isNotEmpty) {
|
if (_loc.isNotEmpty) {
|
||||||
|
@ -199,8 +199,9 @@ class QuantityField extends TextFormField {
|
|||||||
double quantity = double.tryParse(value.toString()) ?? 0;
|
double quantity = double.tryParse(value.toString()) ?? 0;
|
||||||
|
|
||||||
if (quantity <= 0) return L10().quantityPositive;
|
if (quantity <= 0) return L10().quantityPositive;
|
||||||
if ((max != null) && (quantity > max))
|
if ((max != null) && (quantity > max)) {
|
||||||
return "Quantity must not exceed ${max}";
|
return "Quantity must not exceed ${max}";
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user