Skip to content

Commit ea79937

Browse files
committed
Array tab magento#10790
1 parent 0d1a0b0 commit ea79937

File tree

1 file changed

+112
-112
lines changed

1 file changed

+112
-112
lines changed

dev/tests/integration/testsuite/Magento/Tax/_files/full_discount_with_tax.php

Lines changed: 112 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -7,126 +7,126 @@
77
use Magento\Tax\Model\Sales\Total\Quote\SetupUtil;
88

99
$fullTaxDiscountWithTax = [
10-
'config_data' => [
11-
'config_overrides' =>
12-
[
13-
Config::CONFIG_XML_PATH_APPLY_AFTER_DISCOUNT => 0,
14-
Config::CONFIG_XML_PATH_DISCOUNT_TAX => 1,
15-
Config::XML_PATH_ALGORITHM => 'ROW_BASE_CALCULATION',
16-
Config::CONFIG_XML_PATH_SHIPPING_TAX_CLASS => SetupUtil::SHIPPING_TAX_CLASS,
17-
],
18-
'tax_rate_overrides' =>
19-
[
20-
SetupUtil::TAX_RATE_TX => 18,
21-
SetupUtil::TAX_RATE_SHIPPING => 0,
22-
],
23-
'tax_rule_overrides' =>
24-
[
10+
'config_data' => [
11+
'config_overrides' =>
2512
[
26-
'code' => 'Product Tax Rule',
27-
'product_tax_class_ids' =>
28-
[
29-
SetupUtil::PRODUCT_TAX_CLASS_1
30-
],
13+
Config::CONFIG_XML_PATH_APPLY_AFTER_DISCOUNT => 0,
14+
Config::CONFIG_XML_PATH_DISCOUNT_TAX => 1,
15+
Config::XML_PATH_ALGORITHM => 'ROW_BASE_CALCULATION',
16+
Config::CONFIG_XML_PATH_SHIPPING_TAX_CLASS => SetupUtil::SHIPPING_TAX_CLASS,
3117
],
18+
'tax_rate_overrides' =>
3219
[
33-
'code' => 'Shipping Tax Rule',
34-
'product_tax_class_ids' =>
35-
[
36-
SetupUtil::SHIPPING_TAX_CLASS
37-
],
38-
'tax_rate_ids' =>
39-
[
40-
SetupUtil::TAX_RATE_SHIPPING,
41-
],
20+
SetupUtil::TAX_RATE_TX => 18,
21+
SetupUtil::TAX_RATE_SHIPPING => 0,
4222
],
43-
],
44-
],
45-
'quote_data' => [
46-
'billing_address' =>
47-
[
48-
'region_id' => SetupUtil::REGION_TX,
49-
],
50-
'shipping_address' =>
51-
[
52-
'region_id' => SetupUtil::REGION_TX,
53-
],
54-
'items' =>
55-
[
23+
'tax_rule_overrides' =>
5624
[
57-
'sku' => 'simple1',
58-
'price' => 2542.37,
59-
'qty' => 2,
60-
]
61-
],
62-
'shipping_method' => 'free',
63-
'shopping_cart_rules' =>
64-
[
65-
['discount_amount' => 100],
66-
],
67-
],
68-
'expected_result' => [
69-
'address_data' =>
70-
[
71-
'subtotal' => 5084.74,
72-
'base_subtotal' => 5084.74,
73-
'subtotal_incl_tax' => 5999.99,
74-
'base_subtotal_incl_tax' => 5999.99,
75-
'tax_amount' => 915.25,
76-
'base_tax_amount' => 915.25,
77-
'shipping_amount' => 0,
78-
'base_shipping_amount' => 0,
79-
'shipping_incl_tax' => 0,
80-
'base_shipping_incl_tax' => 0,
81-
'shipping_tax_amount' => 0,
82-
'base_shipping_tax_amount' => 0,
83-
'discount_amount' => -5999.99,
84-
'base_discount_amount' => -5999.99,
85-
'discount_tax_compensation_amount' => 0,
86-
'base_discount_tax_compensation_amount' => 0,
87-
'shipping_discount_tax_compensation_amount' => 0,
88-
'base_shipping_discount_tax_compensation_amount' => 0,
89-
'grand_total' => 0,
90-
'base_grand_total' => 0,
91-
'applied_taxes' =>
9225
[
93-
SetupUtil::TAX_RATE_TX =>
26+
'code' => 'Product Tax Rule',
27+
'product_tax_class_ids' =>
9428
[
95-
'percent' => 18,
96-
'amount' => 915.25,
97-
'base_amount' => 915.25,
98-
'rates' =>
99-
[
100-
[
101-
'code' => SetupUtil::TAX_RATE_TX,
102-
'title' => SetupUtil::TAX_RATE_TX,
103-
'percent' => 18,
104-
],
105-
],
106-
]
29+
SetupUtil::PRODUCT_TAX_CLASS_1
30+
],
10731
],
108-
],
109-
'items_data' =>
110-
[
111-
'simple1' =>
11232
[
113-
'row_total' => 5084.74,
114-
'base_row_total' => 5084.74,
115-
'tax_percent' => 18,
116-
'price' => 2542.37,
117-
'base_price' => 2542.37,
118-
'price_incl_tax' => 3000,
119-
'base_price_incl_tax' => 3000,
120-
'row_total_incl_tax' => 5999.99,
121-
'base_row_total_incl_tax' => 5999.99,
122-
'tax_amount' => 915.25,
123-
'base_tax_amount' => 915.25,
124-
'discount_amount' => 5999.99,
125-
'base_discount_amount' => 5999.99,
126-
'discount_percent' => 100,
127-
'discount_tax_compensation_amount' => 0,
128-
'base_discount_tax_compensation_amount' => 0,
33+
'code' => 'Shipping Tax Rule',
34+
'product_tax_class_ids' =>
35+
[
36+
SetupUtil::SHIPPING_TAX_CLASS
37+
],
38+
'tax_rate_ids' =>
39+
[
40+
SetupUtil::TAX_RATE_SHIPPING,
41+
],
12942
],
130-
],
131-
]
43+
],
44+
],
45+
'quote_data' => [
46+
'billing_address' =>
47+
[
48+
'region_id' => SetupUtil::REGION_TX,
49+
],
50+
'shipping_address' =>
51+
[
52+
'region_id' => SetupUtil::REGION_TX,
53+
],
54+
'items' =>
55+
[
56+
[
57+
'sku' => 'simple1',
58+
'price' => 2542.37,
59+
'qty' => 2,
60+
]
61+
],
62+
'shipping_method' => 'free',
63+
'shopping_cart_rules' =>
64+
[
65+
['discount_amount' => 100],
66+
],
67+
],
68+
'expected_result' => [
69+
'address_data' =>
70+
[
71+
'subtotal' => 5084.74,
72+
'base_subtotal' => 5084.74,
73+
'subtotal_incl_tax' => 5999.99,
74+
'base_subtotal_incl_tax' => 5999.99,
75+
'tax_amount' => 915.25,
76+
'base_tax_amount' => 915.25,
77+
'shipping_amount' => 0,
78+
'base_shipping_amount' => 0,
79+
'shipping_incl_tax' => 0,
80+
'base_shipping_incl_tax' => 0,
81+
'shipping_tax_amount' => 0,
82+
'base_shipping_tax_amount' => 0,
83+
'discount_amount' => -5999.99,
84+
'base_discount_amount' => -5999.99,
85+
'discount_tax_compensation_amount' => 0,
86+
'base_discount_tax_compensation_amount' => 0,
87+
'shipping_discount_tax_compensation_amount' => 0,
88+
'base_shipping_discount_tax_compensation_amount' => 0,
89+
'grand_total' => 0,
90+
'base_grand_total' => 0,
91+
'applied_taxes' =>
92+
[
93+
SetupUtil::TAX_RATE_TX =>
94+
[
95+
'percent' => 18,
96+
'amount' => 915.25,
97+
'base_amount' => 915.25,
98+
'rates' =>
99+
[
100+
[
101+
'code' => SetupUtil::TAX_RATE_TX,
102+
'title' => SetupUtil::TAX_RATE_TX,
103+
'percent' => 18,
104+
],
105+
],
106+
]
107+
],
108+
],
109+
'items_data' =>
110+
[
111+
'simple1' =>
112+
[
113+
'row_total' => 5084.74,
114+
'base_row_total' => 5084.74,
115+
'tax_percent' => 18,
116+
'price' => 2542.37,
117+
'base_price' => 2542.37,
118+
'price_incl_tax' => 3000,
119+
'base_price_incl_tax' => 3000,
120+
'row_total_incl_tax' => 5999.99,
121+
'base_row_total_incl_tax' => 5999.99,
122+
'tax_amount' => 915.25,
123+
'base_tax_amount' => 915.25,
124+
'discount_amount' => 5999.99,
125+
'base_discount_amount' => 5999.99,
126+
'discount_percent' => 100,
127+
'discount_tax_compensation_amount' => 0,
128+
'base_discount_tax_compensation_amount' => 0,
129+
],
130+
],
131+
]
132132
];

0 commit comments

Comments
 (0)