Permalink
Browse files

WHISTLE-788: updating log lines and ensuring units are integers

  • Loading branch information...
1 parent 365e5fb commit fe776b590cb9a7930604fc0a3f385966af99dc6d @jamesaimonetti jamesaimonetti committed Feb 3, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 whistle_apps/apps/jonny5/src/j5_acctmgr.erl
  2. +1 −1 whistle_apps/apps/jonny5/src/j5_util.erl
@@ -582,7 +582,7 @@ try_prepay(CallID, #state{acct_id=AcctId, prepay=Prepay, trunks_in_use=Dict, led
{{false, [{<<"Error">>, Reason}]}, State};
false ->
PrepayLeft = Prepay - PerMinCharge,
- ?LOG_SYS(CallID, "authz a per_min trunk; ~b prepay left, ~b charged up-front", [PrepayLeft, PerMinCharge]),
+ ?LOG_SYS(CallID, "authz per_min trunk; ~p prepay left, ~p charged up-front", [PrepayLeft, PerMinCharge]),
{ok, Pid} = monitor_call(CallID, LedgerDB, per_min, PerMinCharge),
erlang:monitor(process, Pid),
@@ -168,6 +168,6 @@ current_usage(AcctID) ->
DB = wh_util:format_account_id(AcctID, encoded),
case couch_mgr:get_results(DB, <<"transactions/credit_remaining">>, [{<<"reduce">>, true}]) of
{ok, []} -> 0;
- {ok, [ViewRes|_]} -> wh_json:get_value(<<"value">>, ViewRes, 0);
+ {ok, [ViewRes|_]} -> wh_json:get_integer_value(<<"value">>, ViewRes, 0);
{error, _} -> 0
end.

0 comments on commit fe776b5

Please sign in to comment.