Fix/adjust reservations correctly (#3474)
**What** - Adjust reservations correctly according to the following heuristic: adjustment by addition: (i.e. positive quantity adjustment passed to the adjustment method) - if a reservation for the line-item in the location exists add quantity to that - if not create a new reservation adjustment by subtraction: - if a reservation with the exact quantity exists, delete it and return - if a reservation with a greater quantity exists, subtract from it and return - otherwise delete from reservations until a reservation with greater quantity than the remaining is found and adjust that with the remaining quantity OR there are no more reservations Fixes CORE-1247
This commit is contained in:
5
.changeset/ten-steaks-tan.md
Normal file
5
.changeset/ten-steaks-tan.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@medusajs/medusa-js": patch
|
||||
---
|
||||
|
||||
Fix(medusa): Adjust reservations correctly
|
||||
Reference in New Issue
Block a user