anchor.diff:  		when (is_integer(StartDate) orelse (StartDate == undefined)),
   		(is_integer(EndDate) orelse (EndDate == undefined)),
   		is_list(Characteristics), is_list(OfferId), is_list(ServiceRefs) ->
  +	TS = erlang:system_time(millisecond),
  +	N = erlang:unique_integer([positive]),
  +	LM = {TS, N},
  +	Id = ocs_rest:etag(LM),
   	F = fun() ->
   			case mnesia:read(offer, OfferId, read) of
   				[#offer{char_value_use = CharValueUse} = Offer] ->
  -					TS = erlang:system_time(millisecond),
  -					N1 = erlang:unique_integer([positive]),
  -					N2 = erlang:unique_integer([positive]),
  -					LM = {TS, N2},
  -					Id = ocs_rest:etag({TS, N1}),
   					F2 = fun(ServiceRef) ->
   								case mnesia:read(service, ServiceRef, write) of
   									[#service{product = undefined} = Service] ->
  
positive.code: 		(is_binary(Password) or is_record(Password, aka_cred)),
  		is_list(Attributes), is_boolean(EnabledStatus),
  		is_boolean(MultiSession) ->
  	F1 =  fun() ->
  			add_service1(Identity, Password, State, ProductRef,
  					Chars, Attributes, EnabledStatus, MultiSession)
  	end,
  	case mnesia:transaction(F1) of
  		{atomic, Service} ->
  
negative.code: 		Reason :: term().
  %% @doc Add a new bucket to bucket table or update exsiting bucket
  add_bucket(ProductRef, #bucket{id = undefined} = Bucket) when is_list(ProductRef) ->
  	BId = generate_bucket_id(),
  	F = fun() ->
  		case mnesia:read(product, ProductRef, write) of
  			[#product{balance = B} = P] ->
  				Bucket1  = Bucket#bucket{id = BId, product = [ProductRef]},
  				ok = mnesia:write(bucket, Bucket1, write),
  				Product = P#product{balance = lists:reverse([BId | B])},
  