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