/**
  * Check if tax calculation type and price display settings are compatible
  *
  * Invalid settings if
  *      Tax Calculation Method Based On 'Total' or 'Row'
  *      and at least one Price Display Settings has 'Including and Excluding Tax' value
  *
  * @param null|int|bool|string|\Magento\Store\Model\Store $store $store
  * @return bool
  */
 public function checkDisplaySettings($store = null)
 {
     if ($this->taxConfig->getAlgorithm($store) == \Magento\Tax\Model\Calculation::CALC_UNIT_BASE) {
         return true;
     }
     return $this->taxConfig->getPriceDisplayType($store) != \Magento\Tax\Model\Config::DISPLAY_TYPE_BOTH && $this->taxConfig->getShippingPriceDisplayType($store) != \Magento\Tax\Model\Config::DISPLAY_TYPE_BOTH && !$this->taxConfig->displayCartPricesBoth($store) && !$this->taxConfig->displayCartSubtotalBoth($store) && !$this->taxConfig->displayCartShippingBoth($store) && !$this->taxConfig->displaySalesPricesBoth($store) && !$this->taxConfig->displaySalesSubtotalBoth($store) && !$this->taxConfig->displaySalesShippingBoth($store);
 }
Example #2
0
 /**
  * Check if need display order prices excluding and including tax
  *
  * @param null|int|string|Store $store
  * @return bool
  */
 public function displaySalesBothPrices($store = null)
 {
     return $this->_config->displaySalesPricesBoth($store);
 }