anchor.diff:  			throw(price_not_found)
   	end;
   rate2(Protocol, Service, Buckets, Timestamp, _Address, _Direction,
  -		#offer{price = Prices} = Offer, Flag, DebitAmounts, ReserveAmounts, State) ->
  +		#offer{price = Prices} = Offer, Flag, DebitAmounts, ReserveAmounts,
  +		#state{charging_key = ChargingKey} = State) ->
   	F = fun(#price{type = tariff, units = octets}) ->
   				true;
   			(#price{type = usage}) ->
  
positive.code: 				false
  	end,
  	FilteredPrices1 = lists:filter(F, Prices),
  	case filter_prices_tod(Timestamp, FilteredPrices1) of
  		[Price | _] ->
  			RoamingTable = roaming_table_prefix(Price),
  			rate4(Protocol, Service, Buckets, Price,
  
negative.code: filter_prices_dir(_, [], Acc) ->
  	lists:reverse(Acc).
  
  -spec filter_prices_key(ChargingKey, Prices) -> Prices
  	when
  		ChargingKey :: non_neg_integer(),
  		Prices :: [#price{}].
  %% @doc Filter prices with `chargingKey'.
  %% @hidden
  filter_prices_key(undefined, Prices) ->
  	Prices;
  filter_prices_key(ChargingKey, Prices) when is_integer(ChargingKey) ->
  	filter_prices_key(ChargingKey, Prices, []).
  %% @hidden
  filter_prices_key(ChargingKey, [#price{char_value_use = CharValueUse} = P | T], Acc) ->
  	case lists:keyfind("chargingKey", #char_value_use.name, CharValueUse) of
  		#char_value_use{values = [#char_value{value = ChargingKey}]} ->
  			filter_prices_key(ChargingKey, T, [P | Acc]);
  		#char_value_use{values = [#char_value{}]} ->
  			filter_prices_key(ChargingKey, T, Acc);
  		_ ->
  			filter_prices_key(ChargingKey, T, [P | Acc])
  	end;
  filter_prices_key(_, [], Acc) ->
  	lists:reverse(Acc).
  
  -spec get_final(SessionId, Buckets) -> Result
  	when
  		SessionId :: [tuple()],
  