fix(utils,core-flows): subtotal calculation and returns location (#13497)
* fix(utils,core-flows): subtotal calculation and returns location * changeset * fix test * var * rm extra field from test * fix original total * fix partial refunds and pending difference * fix test * fix test * test * extract to util * original total and update payment when receive return * original_subtotal * default fields * test * calculate pending difference * revert claims test * pending difference * creadit line fix * if
This commit is contained in:
@@ -2934,6 +2934,7 @@ moduleIntegrationTestRunner<ICartModuleService>({
|
||||
subtotal: 100,
|
||||
total: 0,
|
||||
original_total: 100,
|
||||
original_subtotal: 100,
|
||||
discount_total: 100,
|
||||
discount_subtotal: 100,
|
||||
discount_tax_total: 0,
|
||||
@@ -2951,6 +2952,10 @@ moduleIntegrationTestRunner<ICartModuleService>({
|
||||
value: "100",
|
||||
precision: 20,
|
||||
},
|
||||
raw_original_subtotal: {
|
||||
value: "100",
|
||||
precision: 20,
|
||||
},
|
||||
raw_discount_total: {
|
||||
value: "100",
|
||||
precision: 20,
|
||||
@@ -3042,6 +3047,7 @@ moduleIntegrationTestRunner<ICartModuleService>({
|
||||
subtotal: 400,
|
||||
total: 200,
|
||||
original_total: 400,
|
||||
original_subtotal: 400,
|
||||
discount_total: 200,
|
||||
discount_subtotal: 200,
|
||||
discount_tax_total: 0,
|
||||
@@ -3059,6 +3065,10 @@ moduleIntegrationTestRunner<ICartModuleService>({
|
||||
value: "400",
|
||||
precision: 20,
|
||||
},
|
||||
raw_original_subtotal: {
|
||||
value: "400",
|
||||
precision: 20,
|
||||
},
|
||||
raw_discount_total: {
|
||||
value: "200",
|
||||
precision: 20,
|
||||
@@ -3104,6 +3114,7 @@ moduleIntegrationTestRunner<ICartModuleService>({
|
||||
subtotal: 10,
|
||||
total: 10,
|
||||
original_total: 10,
|
||||
original_subtotal: 10,
|
||||
discount_total: 0,
|
||||
discount_subtotal: 0,
|
||||
discount_tax_total: 0,
|
||||
@@ -3121,6 +3132,10 @@ moduleIntegrationTestRunner<ICartModuleService>({
|
||||
value: "10",
|
||||
precision: 20,
|
||||
},
|
||||
raw_original_subtotal: {
|
||||
value: "10",
|
||||
precision: 20,
|
||||
},
|
||||
raw_discount_total: {
|
||||
value: "0",
|
||||
precision: 20,
|
||||
@@ -3166,6 +3181,7 @@ moduleIntegrationTestRunner<ICartModuleService>({
|
||||
discount_subtotal: 300,
|
||||
discount_tax_total: 0,
|
||||
original_total: 510,
|
||||
original_subtotal: 510,
|
||||
original_tax_total: 0,
|
||||
item_total: 200,
|
||||
item_subtotal: 500,
|
||||
@@ -3217,6 +3233,10 @@ moduleIntegrationTestRunner<ICartModuleService>({
|
||||
value: "510",
|
||||
precision: 20,
|
||||
},
|
||||
raw_original_subtotal: {
|
||||
value: "510",
|
||||
precision: 20,
|
||||
},
|
||||
raw_original_tax_total: {
|
||||
value: "0",
|
||||
precision: 20,
|
||||
|
||||
Reference in New Issue
Block a user