mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 11:36:24 +00:00
Extract stocktake and last updated date
This commit is contained in:
parent
90664bfe14
commit
57eae6f065
2 changed files with 16 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue