mirror of
https://github.com/inventree/inventree-app.git
synced 2026-11-19 04:08:26 +00:00
Build fix (#924)
* Fix for build detail widget - Display allocated item count - Closes https://github.com/inventree/inventree-app/issues/922 * Add release note entry
This commit is contained in:
1 parent
bfddb02cfb
commit
d2a35c4dba
2 files changed
+18
-1
No files matched your search
@@ -1,3 +1,8 @@
|
||||
### 1.1.1 - November 2026
|
||||
---
|
||||
|
||||
- Fix incorrect allocation count in build detail widget
|
||||
|
||||
### 1.1.0 - November 2026
|
||||
---
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ class _BuildOrderDetailState extends RefreshableState<BuildOrderDetailWidget> {
|
||||
|
||||
// Track state of the build order
|
||||
int allocatedLineCount = 0;
|
||||
int allocatedItemCount = 0;
|
||||
int totalLineCount = 0;
|
||||
int outputCount = 0;
|
||||
int attachmentCount = 0;
|
||||
@@ -302,6 +303,17 @@ class _BuildOrderDetailState extends RefreshableState<BuildOrderDetailWidget> {
|
||||
return;
|
||||
}
|
||||
|
||||
// Count the stock items allocated against this build order
|
||||
InvenTreeBuildItem()
|
||||
.count(filters: {"build": widget.order.pk.toString()})
|
||||
.then((int n) {
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
allocatedItemCount = n;
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
if (widget.order.sourceLocationId != null) {
|
||||
InvenTreeStockLocation().get(widget.order.sourceLocationId!).then((
|
||||
value,
|
||||
@@ -473,7 +485,7 @@ class _BuildOrderDetailState extends RefreshableState<BuildOrderDetailWidget> {
|
||||
ListTile(
|
||||
title: Text(L10().allocatedStock),
|
||||
leading: Icon(TablerIcons.box_model_2, color: COLOR_ACTION),
|
||||
trailing: LinkIcon(text: widget.order.outputCount.toString()),
|
||||
trailing: LinkIcon(text: allocatedItemCount.toString()),
|
||||
onTap: () => {
|
||||
Navigator.push(
|
||||
context,
|
||||
|
||||
Reference in new issue
Block a user