-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
2 changed files
with
62 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"medusa-plugin-brightpearl": patch | ||
--- | ||
|
||
fix(medusa-plugin-brightpearl): change the way reservations are handled |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters