Set 'international' for letters in ft_billing

`international` for letters in `ft_billing` was always False. Now that
letters can be international, this changes the column value to the value
of `international` for the notification.
This commit is contained in:
Katie Smith
2020-08-21 09:19:27 +01:00
parent 6439200c71
commit b30701d7e1
2 changed files with 14 additions and 9 deletions

View File

@@ -401,7 +401,7 @@ def _query_for_billing_data(table, notification_type, start_date, end_date, serv
literal(notification_type).label('notification_type'),
literal('dvla').label('sent_by'),
rate_multiplier.label('rate_multiplier'),
literal(False).label('international'), # todo: this may change in the future.
table.international,
table.billable_units.label('letter_page_count'),
postage.label('postage'),
func.sum(table.billable_units).label('billable_units'),
@@ -417,7 +417,8 @@ def _query_for_billing_data(table, notification_type, start_date, end_date, serv
table.template_id,
rate_multiplier,
table.billable_units,
postage
postage,
table.international
)
query_funcs = {