make ft billing nightly task only look at one table

follows same logic as the create_nightly_notification_status task, see previous commit
for logic
This commit is contained in:
Leo Hemsted
2019-08-21 16:13:04 +01:00
parent 34ac7cb6c0
commit d83827579e
3 changed files with 72 additions and 81 deletions

View File

@@ -675,7 +675,7 @@ def create_daily_sorted_letter(billing_day=date(2018, 1, 18),
def create_ft_billing(bst_date,
notification_type,
notification_type=None,
template=None,
service=None,
provider='test',
@@ -686,10 +686,9 @@ def create_ft_billing(bst_date,
notifications_sent=1,
postage='none',
):
if not service:
service = create_service()
if not template:
template = create_template(service=service, template_type=notification_type)
if template:
service = template.service
notification_type = template.template_type
data = FactBilling(bst_date=bst_date,
service_id=service.id,