fix(medusa-plugin-brightpearl): ignore goods out created if channel id not medusa
This commit is contained in:
1 parent
e3332d4c47
commit
a6a35204fe
2 files changed
+6
No files matched your search
@@ -576,6 +576,11 @@ class BrightpearlService extends BaseService {
|
||||
const goodsOut = await client.warehouses.retrieveGoodsOutNote(id)
|
||||
const order = await client.orders.retrieve(goodsOut.orderId)
|
||||
|
||||
// Only relevant for medusa orders check channel id
|
||||
if (order.channelId !== parseInt(this.options.channel_id)) {
|
||||
return
|
||||
}
|
||||
|
||||
// Combine the line items that we are going to create a fulfillment for
|
||||
const lines = Object.keys(goodsOut.orderRows)
|
||||
.map((key) => {
|
||||
|
||||
Reference in new issue
Block a user