Commit Graph

10 Commits

Author SHA1 Message Date
Chris Hill-Scott
8ad0236f28 Allow filtering of billing info by financial year
We already filter the usage-by-month query by financial year. When we
show the total usage for a service, we should be able to filter this
by financial year.

Then, when the two lots of data are put side by side, it all adds up.
2017-01-27 11:13:22 +00:00
Rebecca Law
51b3119a21 Remove provider_statistics_dao.get_provider_statistics
The provider_statistics table is no longer being populated, get rid of any reads from this table.
2016-09-19 17:24:26 +01:00
Leo Hemsted
26d7675baa pep8 fixes
no idea why the build/local pep8s weren't picking them up before.

also excluded import order pep8
2016-08-23 12:05:47 +01:00
Leo Hemsted
527a5c4eaa calculate billable units when sending an sms
don't calculate it if we're in research mode
* added tests to prove this
* removed last code referring to content_char_count
2016-08-03 16:46:05 +01:00
Leo Hemsted
2793541b9c add billable_units column to notifications table
this replaces content_char_count, by performing the additional
steps to calculated billable units at insert time, rather than
read time. This means we can take into account whether the
service was in research mode or using a test api key when the
notification was sent :tada
2016-08-03 16:41:06 +01:00
Leo Hemsted
9a9ebf0886 filter on key types to avoid research mode (that dont actually send) 2016-08-03 16:41:04 +01:00
Leo Hemsted
1617f058e2 rework get_fragment_count to not use ProviderStatistics
use NotficationHistory instead. Unfortunately this means the SQL
gets a bit gnarly, as we have to repeat notifications_utils'
`get_sms_fragment_count` functionality inside a SELECT 😱
2016-08-03 16:29:30 +01:00
Martyn Inglis
57e05feafb Updated the Provider stats and rates DAO objects to query based on the identifier in the ProviderDetails object.
- updated all tests
- changed teardown to leave provider details rows on end of individual tests
2016-05-06 09:09:47 +01:00
Nicholas Staples
bedc20d0ff Fragment count endpoint added and all tests working. 2016-04-28 12:01:57 +01:00
Nicholas Staples
3b1423a2ea Provider Statistics added.
Rates command added with a test.

Updated to include added migration.
2016-04-21 13:47:04 +01:00