Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
excluding_tax_multi_item_unit.php
Go to the documentation of this file.
1 <?php
10 
11 $taxCalculationData['excluding_tax__multi_item_unit'] = [
12  'config_data' => [
13  SetupUtil::CONFIG_OVERRIDES => [
14  Config::CONFIG_XML_PATH_APPLY_AFTER_DISCOUNT => 1,
15  Config::CONFIG_XML_PATH_PRICE_INCLUDES_TAX => 0,
16  Config::XML_PATH_ALGORITHM => Calculation::CALC_UNIT_BASE,
17  ],
18  SetupUtil::TAX_RATE_OVERRIDES => [
19  SetupUtil::TAX_RATE_TX => 8.25,
20  SetupUtil::TAX_STORE_RATE => 8.25,
21  ],
22  SetupUtil::TAX_RULE_OVERRIDES => [
23  ],
24  ],
25  'quote_data' => [
26  'billing_address' => [
27  'region_id' => SetupUtil::REGION_TX,
28  ],
29  'shipping_address' => [
30  'region_id' => SetupUtil::REGION_TX,
31  ],
32  'items' => [
33  [
34  'sku' => 'simple1',
35  'price' => 10.00,
36  'qty' => 1,
37  ],
38  [
39  'sku' => 'simple2',
40  'price' => 11.00,
41  'qty' => 1,
42  ],
43  ],
44  ],
45  'expected_results' => [
46  'address_data' => [
47  'subtotal' => 21,
48  'base_subtotal' => 21,
49  'subtotal_incl_tax' => 22.74,
50  'base_subtotal_incl_tax' => 22.74,
51  'tax_amount' => 1.74,
52  'base_tax_amount' => 1.74,
53  'shipping_amount' => 0,
54  'base_shipping_amount' => 0,
55  'shipping_incl_tax' => 0,
56  'base_shipping_incl_tax' => 0,
57  'shipping_taxable' => 0,
58  'base_shipping_taxable' => 0,
59  'shipping_tax_amount' => 0,
60  'base_shipping_tax_amount' => 0,
61  'discount_amount' => 0,
62  'base_discount_amount' => 0,
63  'discount_tax_compensation_amount' => 0,
64  'base_discount_tax_compensation_amount' => 0,
65  'shipping_discount_tax_compensation_amount' => 0,
66  'base_shipping_discount_tax_compensation_amount' => 0,
67  'grand_total' => 22.74,
68  'base_grand_total' => 22.74,
69  ],
70  'items_data' => [
71  'simple1' => [
72  'row_total' => 10,
73  'base_row_total' => 10,
74  'tax_percent' => 8.25,
75  'price' => 10,
76  'base_price' => 10,
77  'price_incl_tax' => 10.83,
78  'base_price_incl_tax' => 10.83,
79  'row_total_incl_tax' => 10.83,
80  'base_row_total_incl_tax' => 10.83,
81  'tax_amount' => 0.83,
82  'base_tax_amount' => 0.83,
83  'discount_amount' => 0,
84  'base_discount_amount' => 0,
85  'discount_percent' => 0,
86  'discount_tax_compensation_amount' => 0,
87  'base_discount_tax_compensation_amount' => 0,
88  ],
89  'simple2' => [
90  'row_total' => 11,
91  'base_row_total' => 11,
92  'tax_percent' => 8.25,
93  'price' => 11,
94  'base_price' => 11,
95  'price_incl_tax' => 11.91,
96  'base_price_incl_tax' => 11.91,
97  'row_total_incl_tax' => 11.91,
98  'base_row_total_incl_tax' => 11.91,
99  'tax_amount' => 0.91,
100  'base_tax_amount' => 0.91,
101  'discount_amount' => 0,
102  'base_discount_amount' => 0,
103  'discount_percent' => 0,
104  'discount_tax_compensation_amount' => 0,
105  'base_discount_tax_compensation_amount' => 0,
106  ],
107  ],
108  ],
109 ];
$taxCalculationData['excluding_tax__multi_item_unit']