Martyn Inglis
96d30d31b1
Get existing tests to pass.
...
Done by ensuring that the rate limit is 0, so that all messages are billable.
2017-06-06 14:55:37 +01:00
Martyn Inglis
18dcc10a06
Fixed typo
2017-06-06 14:04:11 +01:00
Martyn Inglis
7a03ef3de4
Pseudo Code
2017-06-05 17:25:40 +01:00
Martyn Inglis
517dc6be8b
Typo removed. Wrong window focus
2017-05-24 09:59:51 +01:00
Martyn Inglis
9dd6041944
Usage DAO can now return rates and billable amount, alongside units.
2017-05-24 08:56:59 +01:00
Martyn Inglis
35af759f87
Adding rates to the billable units query
2017-05-23 13:54:51 +01:00
Martyn Inglis
2a0669636d
Add and test new DAO method that counts the billable units multiplied by rate multiplier for a given service for a given time period.
...
Currently this is SMS only.
Used by the dashboard for a headline figure.
2017-05-19 16:42:33 +01:00
Rebecca Law
93e76d2362
Update the valid_from date for the rate that is intended to start at the begining of the financial year.
...
It was the start of the financial year in BST, needed to convert it to UTC.
Small change to the logic to find the rates.
2017-05-03 17:11:48 +01:00
Ken Tsang
a1a8397f74
Update billing data to handle future dates
2017-05-02 19:23:57 +01:00
Rebecca Law
3e0221adec
Change get_financial_year to return ending date as 1 microsecond earlier.
...
That way we can write the queries as between start and end dates, making it easier to read.
This makes more sense.
2017-05-02 10:00:47 +01:00
Rebecca Law
88d92d6070
Fix the logic gettting the rates for a financial year.
...
The is_between_end_date_exclusive is a bit funny.
Perhaps the better way to handle it is to make the function is_between but change the financial year function return an enddate that is one millisecond less. That way we can always use the between logic and it will be easier to use.
2017-04-28 16:55:41 +01:00
Rebecca Law
1a64509186
Change the resultset from the yearly and monthly billing data queries.
...
Fix some formatting of the return objects.
2017-04-28 10:10:49 +01:00
Rebecca Law
fdbadf967e
Fix the email billing data when there is no results.
2017-04-28 10:10:48 +01:00
Rebecca Law
a186fc95be
Added new endpoints to return the yearly-usage and monthly-usage for a given financial year and service id.
...
Since the response has changed I have created new endpoints so that the deployments for Admin are more managable.
Removed print statements from some tests.
2017-04-28 10:10:48 +01:00
Rebecca Law
e1e55edd9c
Add new fields to the usage queries: rate_multiplier, international, phone_prefix.
2017-04-28 10:10:48 +01:00
Rebecca Law
4c37c8bdbb
New query to get billing data per month.
2017-04-28 10:10:48 +01:00
Rebecca Law
6dc336ad6c
Created new queries to return the rate with the sum of billable units for the year totals.
...
Once we have the new columns in notifications table, the query will need to include the rate multiplier and if the number is international.
The monthly billing query will be built next.
2017-04-28 10:10:48 +01:00