setTaxRate() 공개 메소드

public setTaxRate ( float $taxRate )
$taxRate float
예제 #1
0
 /**
  * @return OrderTotal
  */
 public function create()
 {
     $orderTotal = new OrderTotal();
     $orderTotal->setGrossAmount(0);
     $orderTotal->setTaxRate(0);
     return $orderTotal;
 }
예제 #2
0
 /**
  * Prepares order shipping details
  *
  * @param OrderInterface              $order
  * @param ShippingMethodCostInterface $shippingMethodCost
  */
 protected function prepareShippingTotals(OrderInterface $order, ShippingMethodCostInterface $shippingMethodCost)
 {
     $cost = $shippingMethodCost->getCost();
     $baseCurrency = $cost->getCurrency();
     $shippingTotal = new OrderTotal();
     $shippingTotal->setGrossAmount($this->currencyHelper->convert($cost->getGrossAmount(), $baseCurrency, $order->getCurrency()));
     $shippingTotal->setNetAmount($this->currencyHelper->convert($cost->getNetAmount(), $baseCurrency, $order->getCurrency()));
     $shippingTotal->setTaxAmount($this->currencyHelper->convert($cost->getTaxAmount(), $baseCurrency, $order->getCurrency()));
     $shippingTotal->setTaxRate($this->currencyHelper->convert($cost->getTaxRate()));
     $shippingTotal->setCurrency($order->getCurrency());
     $order->setShippingTotal($shippingTotal);
 }