mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-30 14:31:57 -05:00
Add notification_type to query
This commit is contained in:
@@ -20,7 +20,7 @@ from app.models import (
|
||||
from app.utils import convert_utc_to_bst, convert_bst_to_utc
|
||||
|
||||
|
||||
def fetch_montly_billing_for_year(service_id, year):
|
||||
def fetch_monthly_billing_for_year(service_id, year):
|
||||
year_start_date, year_end_date = get_financial_year(year)
|
||||
utcnow = datetime.utcnow()
|
||||
today = convert_utc_to_bst(utcnow).date()
|
||||
@@ -39,7 +39,8 @@ def fetch_montly_billing_for_year(service_id, year):
|
||||
FactBilling.service_id,
|
||||
FactBilling.rate,
|
||||
FactBilling.rate_multiplier,
|
||||
FactBilling.international
|
||||
FactBilling.international,
|
||||
FactBilling.notification_type
|
||||
).filter(
|
||||
FactBilling.service_id == service_id,
|
||||
FactBilling.bst_date >= year_start_date,
|
||||
@@ -49,7 +50,12 @@ def fetch_montly_billing_for_year(service_id, year):
|
||||
FactBilling.service_id,
|
||||
FactBilling.rate,
|
||||
FactBilling.rate_multiplier,
|
||||
FactBilling.international
|
||||
FactBilling.international,
|
||||
FactBilling.notification_type
|
||||
).order_by(
|
||||
FactBilling.service_id,
|
||||
'Month',
|
||||
FactBilling.notification_type
|
||||
).all()
|
||||
|
||||
return yearly_data
|
||||
|
||||
Reference in New Issue
Block a user