public function transform( $prices )
	{
		$html = '';
		$enc = $this->encoder();
		$format = $this->_getFormat();
		$iface = 'MShop_Price_Item_Interface';

		if( !is_array( $prices ) ) {
			$prices = array( $prices );
		}

		foreach( $prices as $priceItem )
		{
			if( !( $priceItem instanceof $iface ) ) {
				throw new MW_View_Exception( sprintf( 'Object doesn\'t implement "%1$s"', $iface ) );
			}

			$costs = $priceItem->getCosts();
			$rebate = $priceItem->getRebate();
			$currency = $this->translate( 'client/html/currency', $priceItem->getCurrencyId() );

			$html .= '
			<div class="price-item">
				<span class="quantity">' . $enc->html( sprintf( $format['quantity'], $priceItem->getQuantity() ), $enc::TRUST ) . '</span>
				<span class="value">' . $enc->html( sprintf( $format['value'], $this->number( $priceItem->getValue() ), $currency ), $enc::TRUST ) . '</span>' .
				( $rebate > 0  ? '
				<span class="rebate">' . $enc->html( sprintf( $format['rebate'], $this->number( $rebate ), $currency ), $enc::TRUST ) . '</span>
				<span class="rebatepercent">' . $enc->html( sprintf( $format['rebate%'], $this->number( round( $rebate * 100 / ( $priceItem->getValue() + $rebate ) ), 0 ) ), $enc::TRUST ) . '</span>'
				: '' ) .
				( $costs > 0 ? '
				<span class="costs">' . $enc->html( sprintf( $format['costs'], $this->number( $costs ), $currency ), $enc::TRUST ) . '</span>'
				: '' ) .
				'<span class="taxrate">' . $enc->html( sprintf( $format['taxrate'], $this->number( $priceItem->getTaxrate() ) ), $enc::TRUST ) . '</span>
			</div>';
		}

		return $html;
	}