fix(medusa): add payments default relation to getTotalsRelations (#5875)
* bugfix: Add payments relation to getTotalsRelations * update order test to expect correct paid_total and refundable_amount
This commit is contained in:
@@ -2457,8 +2457,8 @@ describe("/admin/orders", () => {
|
|||||||
refunded_total: 0,
|
refunded_total: 0,
|
||||||
total: 8200,
|
total: 8200,
|
||||||
subtotal: 8000,
|
subtotal: 8000,
|
||||||
paid_total: 0,
|
paid_total: 10000,
|
||||||
refundable_amount: 0,
|
refundable_amount: 10000,
|
||||||
gift_card_total: 0,
|
gift_card_total: 0,
|
||||||
gift_card_tax_total: 0,
|
gift_card_tax_total: 0,
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -2081,7 +2081,8 @@ class OrderService extends TransactionBaseService {
|
|||||||
relationSet.add("shipping_methods")
|
relationSet.add("shipping_methods")
|
||||||
relationSet.add("shipping_methods.tax_lines")
|
relationSet.add("shipping_methods.tax_lines")
|
||||||
relationSet.add("region")
|
relationSet.add("region")
|
||||||
|
relationSet.add("payments")
|
||||||
|
|
||||||
return Array.from(relationSet.values())
|
return Array.from(relationSet.values())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user