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