Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertTaxCalculationAfterCheckoutIncludingTax.php
Go to the documentation of this file.
1 <?php
8 
13 {
19  protected $severeness = 'high';
20 
27  public function getReviewTotals($actualPrices)
28  {
29  $reviewBlock = $this->checkoutOnepage->getReviewBlock();
30  $actualPrices['subtotal_excl_tax'] = null;
31  $actualPrices['subtotal_incl_tax'] = $reviewBlock->getSubtotal();
32  $actualPrices['discount'] = $reviewBlock->getDiscount();
33  $actualPrices['shipping_excl_tax'] = $reviewBlock->getShippingExclTax();
34  $actualPrices['shipping_incl_tax'] = $reviewBlock->getShippingInclTax();
35  $actualPrices['tax'] = $reviewBlock->getTax();
36  $actualPrices['grand_total_excl_tax'] = $reviewBlock->getGrandTotalExclTax();
37  $actualPrices['grand_total_incl_tax'] = $reviewBlock->getGrandTotalInclTax();
38 
39  return $actualPrices;
40  }
41 
48  public function getOrderTotals($actualPrices)
49  {
50  $viewBlock = $this->customerOrderView->getOrderViewBlock();
51  $actualPrices['subtotal_excl_tax'] = null;
52  $actualPrices['subtotal_incl_tax'] = $viewBlock->getSubtotal();
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'] = $viewBlock->getGrandTotalInclTax();
59 
60  return $actualPrices;
61  }
62 }