fix(medusa-plugin-brightpearl): id matcihgin
This commit is contained in:
1 parent
931fe9a41f
commit
df4698ad81
1 file changed
+5
-6
@@ -524,10 +524,7 @@ class BrightpearlService extends BaseService {
|
|||||||
)
|
)
|
||||||
let lineDiscounts = []
|
let lineDiscounts = []
|
||||||
if (discount) {
|
if (discount) {
|
||||||
lineDiscounts = this.totalsService_.getLineDiscounts(
|
lineDiscounts = this.totalsService_.getLineDiscounts(fromOrder, discount)
|
||||||
fromOrder,
|
|
||||||
discount
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const lines = await Promise.all(
|
const lines = await Promise.all(
|
||||||
@@ -537,8 +534,10 @@ class BrightpearlService extends BaseService {
|
|||||||
)
|
)
|
||||||
|
|
||||||
const discount = lineDiscounts.find((l) =>
|
const discount = lineDiscounts.find((l) =>
|
||||||
l.item._id.equals(item._id)
|
item._id.equals(l.item._id)
|
||||||
) || { amount: 0 }
|
) || {
|
||||||
|
amount: 0,
|
||||||
|
}
|
||||||
|
|
||||||
const row = {}
|
const row = {}
|
||||||
if (bpProduct) {
|
if (bpProduct) {
|
||||||
|
|||||||
Reference in new issue
Block a user