public function getCost() { if ($this->_cost === null) { $this->_cost = $this->getGoods()->sum('cost * count'); $this->_cost = bcadd($this->_cost, 0, 4); } return $this->_cost; }