Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertTaxCalculationAfterCheckoutExcludingIncludingTax.php
Go to the documentation of this file.
1 <?php
8 
14 {
20  protected $severeness = 'high';
21 
28  public function getReviewTotals($actualPrices)
29  {
30  $reviewBlock = $this->checkoutOnepage->getReviewBlock();
31  $actualPrices['subtotal_excl_tax'] = $reviewBlock->getSubtotalExclTax();
32  $actualPrices['subtotal_incl_tax'] = $reviewBlock->getSubtotalInclTax();
33  $actualPrices['discount'] = $reviewBlock->getDiscount();
34  $actualPrices['shipping_excl_tax'] = $reviewBlock->getShippingExclTax();
35  $actualPrices['shipping_incl_tax'] = $reviewBlock->getShippingInclTax();
36  $actualPrices['tax'] = $reviewBlock->getTax();
37  $actualPrices['grand_total_excl_tax'] = $reviewBlock->getGrandTotalExclTax();
38  $actualPrices['grand_total_incl_tax'] = $reviewBlock->getGrandTotalInclTax();
39 
40  return $actualPrices;
41  }
42 
49  public function getOrderTotals($actualPrices)
50  {
51  $viewBlock = $this->customerOrderView->getOrderViewBlock();
52  $actualPrices['subtotal_excl_tax'] = $viewBlock->getSubtotalExclTax();
53  $actualPrices['subtotal_incl_tax'] = $viewBlock->getSubtotalInclTax();
54  $actualPrices['discount'] = $viewBlock->getDiscount();
55  $actualPrices['shipping_excl_tax'] = $viewBlock->getShippingExclTax();
56  $actualPrices['shipping_incl_tax'] = $viewBlock->getShippingInclTax();
57  $actualPrices['tax'] = $viewBlock->getTax();
58  $actualPrices['grand_total_excl_tax'] = $viewBlock->getGrandTotal();
59  $actualPrices['grand_total_incl_tax'] = $viewBlock->getGrandTotalInclTax();
60 
61  return $actualPrices;
62  }
63 }