anchor.diff:  					{Units, Value}
   			end
   	end,
  -	charge2(Service, Product, Buckets, Price, Flag, DebitAmount, ReserveAmount, State, ChargingKey);
  +	charge2(Service, Product, Buckets, Price, Flag, DebitAmount, ReserveAmount, State,
  +			Rated, ChargingKey);
   charge(_Protocol, Service, Product, Buckets, #price{units = Units, size = Size} = Price,
  -		event, _DebitAmounts, undefined, State, ChargingKey) ->
  +		event, _DebitAmounts, undefined, State, Rated, ChargingKey) ->
   	DebitAmount = {Units, Size},
   	ReserveAmount = {Units, 0},
  -	charge2(Service, Product, Buckets, Price, event, DebitAmount, ReserveAmount, State, ChargingKey);
  +	charge2(Service, Product, Buckets, Price, event, DebitAmount, ReserveAmount,
  +			State, Rated, ChargingKey);
   charge(_Protocol, Service, Product, Buckets, #price{units = Units, size = Size} = Price,
  -		event, _DebitAmounts, ReserveAmounts, State, ChargingKey) ->
  +		event, _DebitAmounts, ReserveAmounts, State, Rated, ChargingKey) ->
   	DebitAmount = case lists:keyfind(Units, 1, ReserveAmounts) of
   		{Units, DebitUnits} ->
   			{Units, DebitUnits};
  
positive.code: 							units = Units, product = [ProductId]} | Buckets2],
  					charge3(Service, Product, Buckets4, interim,
  							DebitAmount, {Units, Damount - UnitsCharged},
  							ReserveAmount, {Units, 0}, State, ChargingKey, Buckets)
  			end
  	end;
  charge2(#service{name = ServiceId} = Service, #product{id = ProductId} = Product, Buckets,
  		#price{units = Units, size = UnitSize, amount = UnitPrice,
  		type = PriceType, currency = Currency}, final,
  		{Units, Amount} = DebitAmount, {Units, 0} = ReserveAmount,
  		#state{rated = Rated1, session_id = SessionId} = State, ChargingKey) ->
  	Rated2 = Rated1#rated{price_type = PriceType, currency = Currency},
  	case charge_session(Units, Amount,
  			ServiceId, ChargingKey, SessionId, Buckets) of
  		{Amount, Buckets2} ->
  
negative.code: 			throw(table_lookup_failed)
  	end;
  rate4(Protocol, Service, Product, Buckets, Price,
  		Flag, DebitAmounts, ReserveAmounts, State, Rated, ChargingKey, _ServiceNetwork) ->
  	charge(Protocol, Service, Product, Buckets, Price,
  			Flag, DebitAmounts, ReserveAmounts, State, Rated, ChargingKey).
  %% @hidden
  
  
  charge(_Protocol, #service{enabled = false} = Service, Product,
  		Buckets, #price{units = Units} = _Price, initial,
  		_DebitAmounts, _ReserveAmounts, State, Rated, ChargingKey) ->
  	charge3(Service, Product, Buckets, initial,
  			{Units, 0}, {Units, 0}, {Units, 0}, {Units, 0}, State, Rated, ChargingKey, Buckets);
  charge(radius, Service, Product, Buckets, #price{units = Units} = Price,
  		initial, [], [], State, Rated, ChargingKey) ->
  	charge2(Service, Product, Buckets, Price, initial, {Units, 0},
  			get_reserve(Price), State, Rated, ChargingKey);
  charge(radius, Service, Product, Buckets, #price{units = Units} = Price,
  		interim, DebitAmounts, ReserveAmounts, State, Rated, ChargingKey) ->
  	DebitAmount = case lists:keyfind(Units, 1, DebitAmounts) of
  		{Units, DebitUnits} ->
  			{Units, DebitUnits};
  