mirror of
https://github.com/inventree/InvenTree.git
synced 2026-10-19 08:26:37 +00:00
[UI] Fix useReceiveLineItems bug (#12756)
- Prevent negative pre-fill values
This commit is contained in:
1 parent
8ae579124b
commit
f8328cd1db
1 file changed
+1
-1
@@ -908,7 +908,7 @@ export function useReceiveLineItems(props: LineItemsForm) {
|
||||
// here would make the backend treat this line as if the user
|
||||
// had explicitly chosen the PO's default, blocking any override.
|
||||
location: elem.destination ?? null,
|
||||
quantity: elem.quantity - elem.received,
|
||||
quantity: Math.max(0, elem.quantity - elem.received),
|
||||
expiry_date: null,
|
||||
batch_code: '',
|
||||
serial_numbers: '',
|
||||
|
||||
Reference in new issue
Block a user