Skip to content

Commit

Permalink
fix(core): Send the correct amount to refundOrder (#2559)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexisvigoureux authored Dec 4, 2023
1 parent c059bc0 commit b5a265f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/core/src/config/order/default-order-process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -413,10 +413,13 @@ export function configureDefaultOrderProcess(options: DefaultOrderProcessOptions
order.active = false;
order.orderPlacedAt = new Date();
await Promise.all(
order.lines.map(line =>
order.lines.map(line => {
line.orderPlacedQuantity = line.quantity
connection
.getRepository(ctx, OrderLine)
.update(line.id, { orderPlacedQuantity: line.quantity }),
.update(line.id, { orderPlacedQuantity: line.quantity })
return line
}
),
);
eventBus.publish(new OrderPlacedEvent(fromState, toState, ctx, order));
Expand Down

0 comments on commit b5a265f

Please sign in to comment.