{"action":"closed","issue":{"url":"https://api.github.com/repos/cgrates/cgrates/issues/260","repository_url":"https://api.github.com/repos/cgrates/cgrates","labels_url":"https://api.github.com/repos/cgrates/cgrates/issues/260/labels{/name}","comments_url":"https://api.github.com/repos/cgrates/cgrates/issues/260/comments","events_url":"https://api.github.com/repos/cgrates/cgrates/issues/260/events","html_url":"https://github.com/cgrates/cgrates/issues/260","id":113557260,"number":260,"title":"Call cost inconsistency","user":{"login":"ezgektor","id":10644254,"avatar_url":"https://avatars.githubusercontent.com/u/10644254?v=3","gravatar_id":"","url":"https://api.github.com/users/ezgektor","html_url":"https://github.com/ezgektor","followers_url":"https://api.github.com/users/ezgektor/followers","following_url":"https://api.github.com/users/ezgektor/following{/other_user}","gists_url":"https://api.github.com/users/ezgektor/gists{/gist_id}","starred_url":"https://api.github.com/users/ezgektor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezgektor/subscriptions","organizations_url":"https://api.github.com/users/ezgektor/orgs","repos_url":"https://api.github.com/users/ezgektor/repos","events_url":"https://api.github.com/users/ezgektor/events{/privacy}","received_events_url":"https://api.github.com/users/ezgektor/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-10-27T10:57:00Z","updated_at":"2016-03-01T22:00:25Z","closed_at":"2016-03-01T22:00:25Z","body":"Hello!\r\n\r\nWe created Rating Plan with Rounding Decimals = 2.\r\nAfter we make a call we have three timespans: every has cost 0.01. Connect fee for this call is 0.15.\r\nAs i understand, the cost for this call should be: 0.15 + 0.01 + 0.01 + 0.01 = 0.18. But it is 0.174\r\n\r\n```\r\n{\"id\":1,\"result\":{\"Direction\":\"*out\",\"Category\":\"call\",\"Tenant\":\"tenant.mobi\",\"Subject\":\"34680000000\",\"Account\":\"34680000000\",\"Destination\":\"34690000000\",\"TOR\":\"*voice\",\"Cost\":0.174,\"Timespans\":[{\"TimeStart\":\"2015-10-26T13:29:27Z\",\"TimeEnd\":\"2015-10-26T13:29:37Z\",\"Cost\":0.01,\"RateInterval\":{\"Timing\":{\"Years\":null,\"Months\":null,\"MonthDays\":null,\"WeekDays\":[1,2,3,4,5,6,0],\"StartTime\":\"00:00:00\",\"EndTime\":\"\"},\"Rating\":{\"ConnectFee\":0.15,\"RoundingMethod\":\"*up\",\"RoundingDecimals\":2,\"MaxCost\":0,\"MaxCostStrategy\":\"\",\"Rates\":[{\"GroupIntervalStart\":0,\"Value\":0.05,\"RateIncrement\":1000000000,\"RateUnit\":60000000000}]},\"Weight\":10},\"DurationIndex\":10000000000,\"Increments\":[{\"Duration\":1000000000,\"Cost\":0.001,\"BalanceInfo\":{\"UnitBalanceUuid\":\"\",\"MoneyBalanceUuid\":\"84aecad6-8c69-48e9-8db5-2210f3feaed7\",\"AccountId\":\"*out:tenant.mobi:34680000000\"},\"BalanceRateInterval\":null,\"UnitInfo\":null,\"CompressFactor\":10}],\"MatchedSubject\":\"*out:tenant.mobi:call:*any\",\"MatchedPrefix\":\"346\",\"MatchedDestId\":\"SPAIN_MOBILE\",\"RatingPlanId\":\"ESTANDAR_VOICE\"},{\"TimeStart\":\"2015-10-26T13:29:37Z\",\"TimeEnd\":\"2015-10-26T13:29:47Z\",\"Cost\":0.01,\"RateInterval\":{\"Timing\":{\"Years\":null,\"Months\":null,\"MonthDays\":null,\"WeekDays\":[1,2,3,4,5,6,0],\"StartTime\":\"00:00:00\",\"EndTime\":\"\"},\"Rating\":{\"ConnectFee\":0.15,\"RoundingMethod\":\"*up\",\"RoundingDecimals\":2,\"MaxCost\":0,\"MaxCostStrategy\":\"\",\"Rates\":[{\"GroupIntervalStart\":0,\"Value\":0.05,\"RateIncrement\":1000000000,\"RateUnit\":60000000000}]},\"Weight\":10},\"DurationIndex\":20000000000,\"Increments\":[{\"Duration\":1000000000,\"Cost\":0.001,\"BalanceInfo\":{\"UnitBalanceUuid\":\"\",\"MoneyBalanceUuid\":\"84aecad6-8c69-48e9-8db5-2210f3feaed7\",\"AccountId\":\"*out:tenant.mobi:34680000000\"},\"BalanceRateInterval\":null,\"UnitInfo\":null,\"CompressFactor\":10}],\"MatchedSubject\":\"*out:tenant.mobi:call:*any\",\"MatchedPrefix\":\"346\",\"MatchedDestId\":\"SPAIN_MOBILE\",\"RatingPlanId\":\"ESTANDAR_VOICE\"},{\"TimeStart\":\"2015-10-26T13:29:47Z\",\"TimeEnd\":\"2015-10-26T13:29:51Z\",\"Cost\":0.01,\"RateInterval\":{\"Timing\":{\"Years\":null,\"Months\":null,\"MonthDays\":null,\"WeekDays\":[1,2,3,4,5,6,0],\"StartTime\":\"00:00:00\",\"EndTime\":\"\"},\"Rating\":{\"ConnectFee\":0.15,\"RoundingMethod\":\"*up\",\"RoundingDecimals\":2,\"MaxCost\":0,\"MaxCostStrategy\":\"\",\"Rates\":[{\"GroupIntervalStart\":0,\"Value\":0.05,\"RateIncrement\":1000000000,\"RateUnit\":60000000000}]},\"Weight\":10},\"DurationIndex\":24000000000,\"Increments\":[{\"Duration\":1000000000,\"Cost\":0.001,\"BalanceInfo\":{\"UnitBalanceUuid\":\"\",\"MoneyBalanceUuid\":\"84aecad6-8c69-48e9-8db5-2210f3feaed7\",\"AccountId\":\"*out:tenant.mobi:34680000000\"},\"BalanceRateInterval\":null,\"UnitInfo\":null,\"CompressFactor\":4}],\"MatchedSubject\":\"*out:tenant.mobi:call:*any\",\"MatchedPrefix\":\"346\",\"MatchedDestId\":\"SPAIN_MOBILE\",\"RatingPlanId\":\"ESTANDAR_VOICE\"}]},\"error\":null}\r\n```"}}