Philip Korsholm 1304657133 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.
2023-07-19 07:38:29 +00:00
2021-10-12 22:10:36 +02:00
2021-06-15 15:45:59 +02:00
2020-09-09 09:24:51 +02:00
2022-02-15 13:44:23 +01:00
2023-07-16 21:00:18 +02:00
2021-07-04 20:08:55 +01:00
2022-01-06 13:05:04 +01:00

Medusa logo

Medusa

Documentation | Website

Building blocks for digital commerce

Medusa is released under the MIT license. Current CircleCI build status. PRs welcome! Product Hunt Discord Chat Follow @medusajs

Getting Started

Visit the Quickstart Guide to set up a server.

Visit the Docs to learn more about our system requirements.

What is Medusa

Medusa is a set of commerce modules and tools that allow you to build rich, reliable, and performant commerce applications without reinventing core commerce logic. The modules can be customized and used to build advanced ecommerce stores, marketplaces, or any product that needs foundational commerce primitives. All modules are open-source and freely available on npm.

Learn more about Medusas architecture and commerce modules in the Docs.

Roadmap, Upgrades & Plugins

You can view the planned, started and completed features in the Roadmap discussion.

Follow the Upgrade Guides to keep your Medusa project up-to-date.

Check out all available Medusa plugins.

Community & Contributions

The community and core team are available in GitHub Discussions, where you can ask for support, discuss roadmap, and share ideas.

Our Contribution Guide describes how to contribute to the codebase and Docs.

Join our Discord server to meet other community members.

Other channels

License

Licensed under the MIT License.

Description
No description provided
Readme 539 MiB
Languages
TypeScript 84.9%
JavaScript 14.8%
Shell 0.2%