anchor.diff:  	refund(ServiceId, ChargingKey, SessionId, Buckets, []).
   %% @hidden
   refund(ServiceId, ChargingKey, SessionId,
  -		[#bucket{attributes = #{bucket_type := session,
  -		reservations := Reservations}} = H | T], Acc) ->
  +		[#bucket{attributes = #{reservations := Reservations}} = H | T], Acc) ->
   	refund(ServiceId, ChargingKey, SessionId,
   			H, maps:to_list(Reservations), T, [], Acc);
   refund(_, _, _, [], Acc) ->
  
positive.code: 			T, NewAcc, Charged + NewCharge, Reserved + NewReserve);
  update(Type, Charge, Reserve, Now, ServiceId, ChargingKey, SessionId,
  		[#bucket{units = Type, remain_amount = Remain, end_date = Expires,
  		attributes = #{bucket_type := session}} = B | T], Acc, Charged, Reserved)
  		when ((Expires == undefined) or (Now < Expires)),
  		Remain > 0, Remain < (Charge - Charged) ->
  	Attributes = B#bucket.attributes,
  	#{reservations := Reservations} = Attributes,
  	NewCharge = Charge - Charged,
  	NewReservation = Reservations#{SessionId => #{ts => Now, debit => NewCharge,
  
negative.code: 			ServiceId, ChargingKey, SessionId, T, Acc, Charged, Reserved);
  update(Type, Charge, Reserve, Now, ServiceId, ChargingKey, SessionId,
  		[#bucket{units = Type, remain_amount = Remain, end_date = Expires,
  		attributes = Attributes} = B | T], Acc, Charged, Reserved)
  		when ((Expires == undefined) or (Now < Expires)),
  		Remain >= ((Charge - Charged) + (Reserve - Reserved)) ->
  	#{reservations := Reservations} = Attributes,
  	NewCharge = Charge - Charged,
  	NewReserve = Reserve - Reserved,
  