mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 09:26:08 -05:00
The sheet count was not calculated properly (it should be billable_units/notifications_sent).
And it turns out the sheet count is not required for the report. This PR takes out the columns to resolve the group by error.
This commit is contained in:
@@ -149,7 +149,6 @@ def fetch_letter_line_items_for_all_services(start_date, end_date):
|
||||
Organisation.id.label("organisation_id"),
|
||||
Service.name.label("service_name"),
|
||||
Service.id.label("service_id"),
|
||||
FactBilling.billable_units.label("sheet_count"),
|
||||
FactBilling.rate.label("letter_rate"),
|
||||
FactBilling.postage.label("postage"),
|
||||
func.sum(FactBilling.notifications_sent).label("letters_sent"),
|
||||
@@ -168,7 +167,6 @@ def fetch_letter_line_items_for_all_services(start_date, end_date):
|
||||
Organisation.id,
|
||||
Service.id,
|
||||
Service.name,
|
||||
FactBilling.billable_units,
|
||||
FactBilling.rate,
|
||||
FactBilling.postage
|
||||
).order_by(
|
||||
|
||||
Reference in New Issue
Block a user