fix(medusa-plugin-brightpearl): ignore goods out created if channel id not medusa
This commit is contained in:
@@ -12,4 +12,5 @@ yarn.lock
|
||||
/services
|
||||
/models
|
||||
/subscribers
|
||||
/utils
|
||||
|
||||
|
||||
@@ -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