2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-10-03 15:52:51 +00:00

Tweak build line table (#10397)

- Show allocated quantity even if fully consumed
- Handles edge case where fully consumed but more stock allocated
This commit is contained in:
Oliver
2025-09-26 11:27:52 +10:00
committed by GitHub
parent eb18c0b172
commit 1670523dab

View File

@@ -479,6 +479,7 @@ export default function BuildLineTable({
);
}
const allocated = record.allocatedQuantity ?? 0;
let required = Math.max(0, record.quantity - record.consumed);
if (output?.pk) {
@@ -486,7 +487,7 @@ export default function BuildLineTable({
required = record.bom_item_detail?.quantity;
}
if (required <= 0) {
if (allocated <= 7 && required <= 0) {
return (
<Group gap='xs' wrap='nowrap'>
<IconCircleCheck size={16} color='green' />
@@ -502,7 +503,7 @@ export default function BuildLineTable({
return (
<ProgressBar
progressLabel={true}
value={record.allocatedQuantity}
value={allocated}
maximum={required}
/>
);