Example #1
0
 /**
  * Calculate tax details for quote item with given quantity
  *
  * @param QuoteDetailsItem $item
  * @param int $quantity
  * @return TaxDetailsItem
  */
 public function calculate(QuoteDetailsItem $item, $quantity)
 {
     if ($item->getTaxIncluded()) {
         return $this->calculateWithTaxInPrice($item, $quantity);
     } else {
         return $this->calculateWithTaxNotInPrice($item, $quantity);
     }
 }