Display "batch code" for stock item

This commit is contained in:
Oliver Walters committed 2021-08-10 00:10:20 +10:00
1 parent 2d005ba86b
commit baa3d3a1bb
4 files changed
+14 -2

No files matched your search

+1 -1
View File
@@ -1,3 +1,3 @@
[submodule "lib/l10n"]
path = lib/l10n
url = https://github.com/inventree/inventree-app-i18n
url = git@github.com:SchrodingersGat/inventreeapp.git
+2
View File
@@ -220,6 +220,8 @@ class InvenTreeStockItem extends InvenTreeModel {
int get status => jsondata['status'] ?? -1;
String get batch => jsondata["batch"] ?? "";
int get partId => jsondata['part'] ?? -1;
String get purchasePrice => jsondata['purchase_price'] ?? "";
Submodule lib/l10n updated: c19a9d9af4...1e1e4f9b24.
+10
View File
@@ -458,6 +458,16 @@ class _StockItemDisplayState extends RefreshableState<StockDetailWidget> {
);
}
if (item.batch.isNotEmpty) {
tiles.add(
ListTile(
title: Text(L10().batchCode),
subtitle: Text(item.batch),
leading: FaIcon(FontAwesomeIcons.layerGroup),
)
);
}
// Last update?
var update_date = item.updatedDateString;