Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertTaxCalculationAfterCheckoutExcludingTax.php
Go to the documentation of this file.
1 <?php
7 
12 {
18  protected $severeness = 'high';
19 
26  public function getReviewTotals($actualPrices)
27  {
28  $reviewBlock = $this->checkoutOnepage->getReviewBlock();
29  $actualPrices['subtotal_excl_tax'] = $reviewBlock->getSubtotal();
30  $actualPrices['subtotal_incl_tax'] = null;
31  $actualPrices['discount'] = $reviewBlock->getDiscount();
32  $actualPrices['shipping_excl_tax'] = $reviewBlock->getShippingExclTax();
33  $actualPrices['shipping_incl_tax'] = $reviewBlock->getShippingInclTax();
34  $actualPrices['tax'] = $reviewBlock->getTax();
35  $actualPrices['grand_total_excl_tax'] = $reviewBlock->getGrandTotal();
36  $actualPrices['grand_total_incl_tax'] = null;
37 
38  return $actualPrices;
39  }
40 
47  public function getOrderTotals($actualPrices)
48  {
49  $viewBlock = $this->customerOrderView->getOrderViewBlock();
50  $actualPrices['subtotal_excl_tax'] = $viewBlock->getSubtotal();
51  $actualPrices['subtotal_incl_tax'] = null;
52 
53  $actualPrices['discount'] = $viewBlock->getDiscount();
54  $actualPrices['shipping_excl_tax'] = $viewBlock->getShippingExclTax();
55  $actualPrices['shipping_incl_tax'] = $viewBlock->getShippingInclTax();
56  $actualPrices['tax'] = $viewBlock->getTax();
57  $actualPrices['grand_total_excl_tax'] = $viewBlock->getGrandTotal();
58  $actualPrices['grand_total_incl_tax'] = null;
59 
60  return $actualPrices;
61  }
62 }