Пример #1
0
 public function __set($strName, $mixValue)
 {
     $mixReturn = '';
     try {
         switch ($strName) {
             case 'blnWebTaxRemoved':
                 $this->tax_in = $mixValue;
                 break;
             case 'Discount':
                 $mixValue = round($mixValue, 2);
                 parent::__set('discount', $mixValue);
                 $this->sell_discount = $this->sell - $mixValue;
                 break;
             case 'Qty':
                 parent::__set($strName, $mixValue);
                 $this->discount = 0;
                 if ($this->product) {
                     $this->sell = $this->product->GetPrice($mixValue);
                 }
                 break;
             case 'Sell':
             case 'SellDiscount':
                 $mixValue = round($mixValue, 2);
                 parent::__set($strName, $mixValue);
                 $this->sell_total = $this->GetPriceValue() * $this->qty;
                 break;
             default:
                 parent::__set($strName, $mixValue);
                 break;
         }
     } catch (QCallerException $objExc) {
         $objExc->IncrementOffset();
         throw $objExc;
     }
     return $mixReturn;
 }