mirror of
https://github.com/inventree/inventree-app.git
synced 2025-04-28 13:36:50 +00:00
Extract stocktake and last updated date
This commit is contained in:
parent
90664bfe14
commit
57eae6f065
@ -223,6 +223,21 @@ class InvenTreeStockItem extends InvenTreeModel {
|
|||||||
|
|
||||||
int get trackingItemCount => jsondata['tracking_items'] as int ?? 0;
|
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 get partName {
|
||||||
|
|
||||||
String nm = '';
|
String nm = '';
|
||||||
|
2
lib/l10n
2
lib/l10n
@ -1 +1 @@
|
|||||||
Subproject commit cf76a2a70e96e49991a63bbde6d45911caaaf05f
|
Subproject commit 8114d3a69dd90421e546d9cf08e10512eb5ca066
|
Loading…
x
Reference in New Issue
Block a user