mirror of
https://github.com/inventree/InvenTree.git
synced 2026-09-01 17:51:23 +00:00
[UI] Fix useReceiveLineItems bug (#12756)
- Prevent negative pre-fill values
This commit is contained in:
@@ -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