Пример #1
0
 /**
  *
  * @param OnlineTaxe $taxe
  *            Constructor
  */
 public function __construct(OnlineOrderTaxe $taxe = null)
 {
     if (null != $taxe) {
         $this->label = $taxe->getLabel();
         $this->type = $taxe->getType();
         $this->priority = $taxe->getPriority();
         $this->value = $taxe->getValue();
     } else {
         $this->value = 0;
         $this->type = self::TYPE_NUMERIC;
         $this->priority = 1;
     }
     $this->dtCrea = new \DateTime('now');
 }
Пример #2
0
 /**
  * Add taxe
  *
  * @param OnlineOrderTaxe $taxe
  *
  * @return OnlineOrder
  */
 public function addTaxe(OnlineOrderTaxe $taxe)
 {
     $taxe->setOrder($this);
     $this->taxes[] = $taxe;
     return $this;
 }