fix(order): calculate taxes on order edit flows (#11518)

* fix(order): calcualte taxes on order edit flows

* merge summary

* tests

* fix pending difference

* comments

* claim test

* revert method
This commit is contained in:
Carlos R. L. Rodrigues authored and GitHub committed 2025-02-21 15:27:40 +01:00
1 parent 065df75e7d
commit 0c957350a6
19 files changed
+501 -442

No files matched your search

@@ -436,7 +436,6 @@ medusaIntegrationTestRunner({
expect(orderResult.summary).toEqual(
expect.objectContaining({
paid_total: 61,
difference_sum: 0,
refunded_total: 0,
transaction_total: 61,
pending_difference: 0,
@@ -732,7 +731,7 @@ medusaIntegrationTestRunner({
expect(paymentCollections[0]).toEqual(
expect.objectContaining({
status: "not_paid",
amount: 109.5,
amount: 113.21,
currency_code: "usd",
})
)
@@ -776,7 +775,7 @@ medusaIntegrationTestRunner({
})
it("should create a payment collection successfully & mark as paid", async () => {
const paymentDelta = 109.5
const paymentDelta = 113.21
const orderForPayment = (
await api.get(`/admin/orders/${order.id}`, adminHeaders)
).data.order
@@ -1182,9 +1181,9 @@ medusaIntegrationTestRunner({
expect(orderCheck.summary).toEqual(
expect.objectContaining({
pending_difference: -11,
current_order_total: 50,
original_order_total: 60,
pending_difference: -9.7,
current_order_total: 76.3,
original_order_total: 61,
})
)