mirror of
https://github.com/inventree/InvenTree.git
synced 2025-11-13 19:36:46 +00:00
- Show allocated quantity even if fully consumed
- Handles edge case where fully consumed but more stock allocated
(cherry picked from commit 1670523dab)
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
committed by
GitHub
parent
98b1678402
commit
ac324cff14
@@ -479,6 +479,7 @@ export default function BuildLineTable({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const allocated = record.allocatedQuantity ?? 0;
|
||||||
let required = Math.max(0, record.quantity - record.consumed);
|
let required = Math.max(0, record.quantity - record.consumed);
|
||||||
|
|
||||||
if (output?.pk) {
|
if (output?.pk) {
|
||||||
@@ -486,7 +487,7 @@ export default function BuildLineTable({
|
|||||||
required = record.bom_item_detail?.quantity;
|
required = record.bom_item_detail?.quantity;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (required <= 0) {
|
if (allocated <= 7 && required <= 0) {
|
||||||
return (
|
return (
|
||||||
<Group gap='xs' wrap='nowrap'>
|
<Group gap='xs' wrap='nowrap'>
|
||||||
<IconCircleCheck size={16} color='green' />
|
<IconCircleCheck size={16} color='green' />
|
||||||
@@ -502,7 +503,7 @@ export default function BuildLineTable({
|
|||||||
return (
|
return (
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
progressLabel={true}
|
progressLabel={true}
|
||||||
value={record.allocatedQuantity}
|
value={allocated}
|
||||||
maximum={required}
|
maximum={required}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user