Ejemplo n.º 1
0
 /**
  * Return true if code is SalesTax surcharge code
  *
  * @param \XLite\Model\Order\Surcharge $surcharge Surcharge
  *
  * @return boolean
  */
 protected function isSalesTaxSurcharge($surcharge)
 {
     $salesTaxModifier = $surcharge->getOwner()->getModifier(\XLite\Model\Base\Surcharge::TYPE_TAX, \XLite\Module\CDev\SalesTax\Logic\Order\Modifier\Tax::MODIFIER_CODE);
     return $salesTaxModifier->isSurchargeOwner($surcharge);
 }
Ejemplo n.º 2
0
 /**
  * Reset surcharge
  *
  * @param \XLite\Model\Order\Surcharge $surcharge Surcharge
  *
  * @return \XLite\Model\Order\Surcharge
  */
 public function resetSurcharge($surcharge)
 {
     $surcharge->setOwner(null);
     return $surcharge;
 }
 /**
  * {@inheritDoc}
  */
 public function prepareEntityBeforeCommit($type)
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'prepareEntityBeforeCommit', array($type));
     return parent::prepareEntityBeforeCommit($type);
 }