fix(medusa): Create tax lines when marking DraftOrder as paid (#1852)
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@medusajs/medusa": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
When marking a Draft Order as paid, we should generate tax lines before completing it
|
||||||
@@ -70,6 +70,8 @@ export default async (req, res) => {
|
|||||||
.withTransaction(manager)
|
.withTransaction(manager)
|
||||||
.setPaymentSession(cart.id, "system")
|
.setPaymentSession(cart.id, "system")
|
||||||
|
|
||||||
|
await cartService.createTaxLines(cart.id)
|
||||||
|
|
||||||
await cartService.withTransaction(manager).authorizePayment(cart.id)
|
await cartService.withTransaction(manager).authorizePayment(cart.id)
|
||||||
|
|
||||||
result = await orderService.withTransaction(manager).createFromCart(cart.id)
|
result = await orderService.withTransaction(manager).createFromCart(cart.id)
|
||||||
|
|||||||
Reference in New Issue
Block a user