mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 03:26: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;
|
||||
|
||||
// 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 = '';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue