Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertTaxCalculationAfterCheckoutDownloadableExcludingTax.php
Go to the documentation of this file.
1 <?php
8 
10 
16 {
22  protected $severeness = 'high';
23 
30  public function getReviewTotals($actualPrices)
31  {
32  $reviewBlock = $this->checkoutOnepage->getReviewBlock();
33  $actualPrices['subtotal_excl_tax'] = $reviewBlock->getSubtotal();
34  $actualPrices['subtotal_incl_tax'] = null;
35  $actualPrices['discount'] = $reviewBlock->getDiscount();
36  $actualPrices['shipping_excl_tax'] = $reviewBlock->getShippingExclTax();
37  $actualPrices['shipping_incl_tax'] = $reviewBlock->getShippingInclTax();
38  $actualPrices['tax'] = $reviewBlock->getTax();
39  $actualPrices['grand_total_excl_tax'] = $reviewBlock->getGrandTotal();
40  $actualPrices['grand_total_incl_tax'] = null;
41 
42  return $actualPrices;
43  }
44 
51  public function getOrderTotals($actualPrices)
52  {
53  $viewBlock = $this->customerOrderView->getOrderViewBlock();
54  $actualPrices['subtotal_excl_tax'] = $viewBlock->getSubtotal();
55  $actualPrices['subtotal_incl_tax'] = null;
56 
57  $actualPrices['discount'] = $viewBlock->getDiscount();
58  $actualPrices['shipping_excl_tax'] = $viewBlock->getShippingExclTax();
59  $actualPrices['shipping_incl_tax'] = $viewBlock->getShippingInclTax();
60  $actualPrices['tax'] = $viewBlock->getTax();
61  $actualPrices['grand_total_excl_tax'] = $viewBlock->getGrandTotal();
62  $actualPrices['grand_total_incl_tax'] = null;
63 
64  return $actualPrices;
65  }
66 }