mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-12 18:25:26 +00:00
Extract stocktake and last updated date
This commit is contained in:
@ -223,6 +223,21 @@ class InvenTreeStockItem extends InvenTreeModel {
|
||||
|
||||
int get trackingItemCount => jsondata['tracking_items'] as int ?? 0;
|
||||
|
||||
// Date of last update
|
||||
String get updated => jsondata["updated"] ?? "";
|
||||
|
||||
DateTime get stocktakeDate {
|
||||
if (jsondata.containsKey("stocktake_date")) {
|
||||
if (jsondata["stocktake_date"] == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return DateTime.tryParse(jsondata["stocktake_date"]) ?? null;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
String get partName {
|
||||
|
||||
String nm = '';
|
||||
|
2
lib/l10n
2
lib/l10n
Submodule lib/l10n updated: cf76a2a70e...8114d3a69d
Reference in New Issue
Block a user