fix(medusa-plugin-brightpearl): stacking reservations (#4383)
**What**
- Change the way we create reservations in brightpearl
Previously we would create reservations 1 to 1 from medusa to brightpearl. This causes issues due to brightpearl collapsing reservations causing occasional double reservations.
i.e. this update would allocate 4 stock for the order row
```
{
"products": [
{
"productId": "2713",
"salesOrderRowId": "224688",
"quantity": "2"
},
{
"productId": "2713",
"salesOrderRowId": "224688",
"quantity": "2"
}
]
}
```
Instead what we do now is create the rows with reservation quantity based on total quantity reserved in medusa. This means that a reservation creation acts as a trigger to update the reservation in brightpearl, but not with any specific amount. Instead we calculate how much total is reserved and create that in brightpearl.
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"medusa-plugin-brightpearl": patch
|
||||
---
|
||||
|
||||
fix(medusa-plugin-brightpearl): change the way reservations are handled
|
||||
Reference in New Issue
Block a user