public function getPriceBreakdown() { $payments = Yii::app()->payments; $bill = $payments->getBillForBooker($this->flightBooker); $channel = $bill->getChannelName(); $result = array(); $charges = $this->flightBooker->getFlightVoyage()->charges; if ($channel == 'ltr') { // Show single transaction $result[] = array("title" => "тариф, таксы и сбор", "price" => $this->flightBooker->price); return $result; } if ($charges < 0) { $charges = 0; } $result[] = array("title" => "тариф и таксы", "price" => $this->flightBooker->price - $charges); if ($charges > 0) { $result[] = array("title" => "сервисный сбор", "price" => $this->flightBooker->getFlightVoyage()->charges); } return $result; }