fix(utils): totals calculation (#8190)
This commit is contained in:
committed by
GitHub
parent
fe5a7b1810
commit
07205e4249
@@ -2030,7 +2030,7 @@ medusaIntegrationTestRunner({
|
||||
shipping_subtotal: 0,
|
||||
shipping_tax_total: 0,
|
||||
original_shipping_tax_total: 0,
|
||||
original_shipping_tax_subtotal: 0,
|
||||
original_shipping_subtotal: 0,
|
||||
original_shipping_total: 0,
|
||||
items: [
|
||||
expect.objectContaining({
|
||||
|
||||
@@ -143,12 +143,12 @@ medusaIntegrationTestRunner({
|
||||
summary: expect.objectContaining({
|
||||
// TODO: add all summary fields
|
||||
}),
|
||||
total: 59.8,
|
||||
subtotal: 50,
|
||||
tax_total: 0.9,
|
||||
discount_total: 1,
|
||||
discount_tax_total: 0.1,
|
||||
original_total: 61,
|
||||
total: 59.79,
|
||||
subtotal: 60,
|
||||
tax_total: 0.89,
|
||||
discount_total: 1.1,
|
||||
discount_tax_total: 0.11,
|
||||
original_total: 70.9,
|
||||
original_tax_total: 1,
|
||||
item_total: 50,
|
||||
item_subtotal: 50,
|
||||
@@ -156,24 +156,24 @@ medusaIntegrationTestRunner({
|
||||
original_item_total: 50,
|
||||
original_item_subtotal: 50,
|
||||
original_item_tax_total: 0,
|
||||
shipping_total: 9.9,
|
||||
shipping_total: 9.79,
|
||||
shipping_subtotal: 10,
|
||||
shipping_tax_total: 0.9,
|
||||
shipping_tax_total: 0.89,
|
||||
original_shipping_tax_total: 1,
|
||||
original_shipping_tax_subtotal: 10,
|
||||
original_shipping_subtotal: 10,
|
||||
original_shipping_total: 11,
|
||||
created_at: expect.any(String),
|
||||
updated_at: expect.any(String),
|
||||
raw_total: {
|
||||
value: "59.799999999999999995",
|
||||
value: "59.789999999999999995",
|
||||
precision: 20,
|
||||
},
|
||||
raw_subtotal: {
|
||||
value: "50",
|
||||
value: "60",
|
||||
precision: 20,
|
||||
},
|
||||
raw_discount_total: {
|
||||
value: "1.000000000000000005",
|
||||
value: "1.100000000000000005",
|
||||
precision: 20,
|
||||
},
|
||||
items: [
|
||||
@@ -430,10 +430,10 @@ medusaIntegrationTestRunner({
|
||||
deleted_at: null,
|
||||
shipping_method_id: expect.any(String),
|
||||
rate: 10,
|
||||
total: 0.9,
|
||||
total: 0.89,
|
||||
subtotal: 1,
|
||||
raw_total: {
|
||||
value: "0.9",
|
||||
value: "0.89",
|
||||
precision: 20,
|
||||
},
|
||||
raw_subtotal: {
|
||||
@@ -472,18 +472,18 @@ medusaIntegrationTestRunner({
|
||||
]),
|
||||
amount: 10,
|
||||
subtotal: 10,
|
||||
total: 9.9,
|
||||
total: 9.79,
|
||||
original_total: 11,
|
||||
discount_total: 1,
|
||||
discount_tax_total: 0.1,
|
||||
tax_total: 0.9,
|
||||
discount_total: 1.1,
|
||||
discount_tax_total: 0.11,
|
||||
tax_total: 0.89,
|
||||
original_tax_total: 1,
|
||||
raw_subtotal: {
|
||||
value: "10",
|
||||
precision: 20,
|
||||
},
|
||||
raw_total: {
|
||||
value: "9.9",
|
||||
value: "9.79",
|
||||
precision: 20,
|
||||
},
|
||||
raw_original_total: {
|
||||
@@ -491,15 +491,15 @@ medusaIntegrationTestRunner({
|
||||
precision: 20,
|
||||
},
|
||||
raw_discount_total: {
|
||||
value: "1",
|
||||
value: "1.1",
|
||||
precision: 20,
|
||||
},
|
||||
raw_discount_tax_total: {
|
||||
value: "0.1",
|
||||
value: "0.11",
|
||||
precision: 20,
|
||||
},
|
||||
raw_tax_total: {
|
||||
value: "0.9",
|
||||
value: "0.89",
|
||||
precision: 20,
|
||||
},
|
||||
raw_original_tax_total: {
|
||||
|
||||
Reference in New Issue
Block a user