#6528 (Don't generate service report for ended subscriptions)
by Luc Saffre · in Developers · assigned to Luc Saffre
Summary
In Jane we have a lot of sessions that were never invoiced and will never be invoiced, they exist only for our internal statistics. But Lino insists on suggesting a SRV for them. Introduce a new rule: never suggest invoicing after the end_date of the subscription if that field is filled.
Children
Comments
- 10 months, 1 week ago by Luc Saffre in reply to Luc Saffre about #6528 (Don't generate service report for ended subscriptions) : todo: the plan for BTZ says that there are 22 invoice generators, but when i execute it, it generates an SRV with more than 800 lines.
- 10 months, 1 week ago by Luc Saffre about #6528 (Don't generate service report for ended subscriptions) (1 reply) : I'm trying to set a filter in working.Session.get_generators_for_plan(), something like this:
qs = qs.filter( Q(ticket__order__start_date__isnull=True) | Q(start_date__gte=models.F('ticket__order__start_date')) ) qs = qs.filter( Q(ticket__o... - 10 months, 1 week ago by Luc Saffre about #6528 (Don't generate service report for ended subscriptions) : The change works as expected, but for one customer we have ca 800 old working session from the years 2015-2020 that we do not want to invoice, but we also have recent sessions, which we do want to invoice.
- 10 months, 1 week ago by Luc Saffre about #6528 (Don't generate service report for ended subscriptions) : A simple new rule: Subscription.get_invoiceable_partner() returns None when end_date is after today. I'm not sure whether this is a good rule in the long run but we will see.
- 10 months, 1 week ago by Luc Saffre about #6528 (Don't generate service report for ended subscriptions) : Created new Ticket #6528 (Don't generate service report for ended subscriptions).