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.
This commit is contained in:
Rebecca Law
2017-04-26 14:16:47 +01:00
committed by Ken Tsang
parent 93287719e4
commit 6dc336ad6c
10 changed files with 210 additions and 67 deletions

View File

@@ -0,0 +1,13 @@
from app.dao.date_util import get_financial_year, get_april_fools
def test_get_financial_year():
start, end = get_financial_year(2000)
assert str(start) == '2000-03-31 23:00:00'
assert str(end) == '2001-03-31 23:00:00'
def test_get_april_fools():
april_fools = get_april_fools(2016)
assert str(april_fools) == '2016-03-31 23:00:00'
assert april_fools.tzinfo is None