Compare result tuple rather than each element in tuple (just to make it a little shorter)

Change order of columns
This commit is contained in:
Rebecca Law
2019-08-19 14:44:08 +01:00
committed by Leo Hemsted
parent 3b16950aee
commit 1a5763feb6
2 changed files with 9 additions and 24 deletions

View File

@@ -75,8 +75,8 @@ def fetch_sms_billing_for_all_services(start_date, end_date):
query = db.session.query(
Organisation.name.label('organisation_name'),
Organisation.id.label('organisation_id'),
FactBilling.service_id.label("service_id"),
Service.name.label("service_name"),
FactBilling.service_id.label("service_id"),
AnnualBilling.free_sms_fragment_limit,
FactBilling.rate.label('sms_rate'),
sms_remainder.label("sms_remainder"),
@@ -155,7 +155,7 @@ def fetch_letter_line_items_for_all_services(start_date, end_date):
FactBilling.bst_date >= start_date,
FactBilling.bst_date <= end_date,
FactBilling.notification_type == LETTER_TYPE,
).group_by(
).group_by(
Organisation.name,
Organisation.id,
FactBilling.service_id,