fix(medusa): Create tax lines when marking DraftOrder as paid (#1852)

This commit is contained in:
Oliver Windall Juhl
2022-07-15 11:57:46 +02:00
committed by GitHub
parent c148064b4a
commit dafbfa7799
2 changed files with 7 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
---
"@medusajs/medusa": patch
---
When marking a Draft Order as paid, we should generate tax lines before completing it

View File

@@ -70,6 +70,8 @@ export default async (req, res) => {
.withTransaction(manager)
.setPaymentSession(cart.id, "system")
await cartService.createTaxLines(cart.id)
await cartService.withTransaction(manager).authorizePayment(cart.id)
result = await orderService.withTransaction(manager).createFromCart(cart.id)