(cls, date_due=Ellipsis)
return invoices
Invoices that can be auto paid on date_due
Invoices that can be auto paid on date_due
Invoices that can be auto paid on date_due
def autopayable_invoices(cls, date_due=Ellipsis):
        """ Invoices that can be auto paid on date_due """
        invoices = cls.objects.select_related('subscription__account').filter(
            is_hidden=False,
            subscription__account__auto_pay_user__isnull=False,
        )
        # we use Ellipsis because date due can actually be None
        if date_due is not Ellipsis:
            invoices = invoices.filter(date_due=date_due)
        return invoices
def autopayable_invoices ( cls , date_due = Ellipsis ) : invoices = cls . objects . select_related ( 'subscription__account' ) . filter ( is_hidden = False , subscription__account__auto_pay_user__isnull = False , ) # we use Ellipsis because date due can actually be None if date_due is not Ellipsis : invoices = invoices . filter ( date_due = date_due ) return invoices