Esempio n. 1
0
 /**
  * Return whether display setting is to display both price including tax and price excluding tax
  *
  * @return bool
  */
 public function displayBothPrices()
 {
     switch ($this->zone) {
         case PricingRender::ZONE_CART:
             return $this->taxHelper->displayCartBothPrices($this->storeId);
         case PricingRender::ZONE_EMAIL:
         case PricingRender::ZONE_SALES:
             return $this->taxHelper->displaySalesBothPrices($this->storeId);
         default:
             return $this->taxHelper->displayCartBothPrices($this->storeId);
     }
 }
Esempio n. 2
0
 /**
  * Get array of arrays with item prices information for display in PDF
  *
  * Format: array(
  *  $index => array(
  *      'label'    => $label,
  *      'price'    => $price,
  *      'subtotal' => $subtotal
  *  )
  * )
  *
  * @return array
  */
 public function getItemPricesForDisplay()
 {
     $order = $this->getOrder();
     $item = $this->getItem();
     if ($this->_taxData->displaySalesBothPrices()) {
         $prices = array(array('label' => __('Excl. Tax') . ':', 'price' => $order->formatPriceTxt($item->getPrice()), 'subtotal' => $order->formatPriceTxt($item->getRowTotal())), array('label' => __('Incl. Tax') . ':', 'price' => $order->formatPriceTxt($item->getPriceInclTax()), 'subtotal' => $order->formatPriceTxt($item->getRowTotalInclTax())));
     } elseif ($this->_taxData->displaySalesPriceInclTax()) {
         $prices = array(array('price' => $order->formatPriceTxt($item->getPriceInclTax()), 'subtotal' => $order->formatPriceTxt($item->getRowTotalInclTax())));
     } else {
         $prices = array(array('price' => $order->formatPriceTxt($item->getPrice()), 'subtotal' => $order->formatPriceTxt($item->getRowTotal())));
     }
     return $prices;
 }