Пример #1
0
    def handle(self, *args, **options):
        if options['notify']:
            billing_notify()
            return
        Billing.objects.check_limits(options['grace'])
        if options['valid']:
            for bill in Billing.objects.get_valid():
                self.stdout.write(' * {0}'.format(bill))
            return
        limit = Billing.objects.get_out_of_limits()
        due = Billing.objects.get_unpaid()

        if limit:
            self.stdout.write('Following billings are over limit:')
            for bill in limit:
                self.stdout.write(' * {0}'.format(bill))

        if due:
            self.stdout.write('Following billings are past due date:')
            for bill in due:
                self.stdout.write(' * {0}'.format(bill))
Пример #2
0
    def handle(self, *args, **options):
        if options["notify"]:
            billing_notify()
            return
        Billing.objects.check_limits()
        if options["valid"]:
            for bill in Billing.objects.get_valid():
                self.stdout.write(" * {0}".format(bill))
            return
        limit = Billing.objects.get_out_of_limits()
        due = Billing.objects.get_unpaid()

        if limit:
            self.stdout.write("Following billings are over limit:")
            for bill in limit:
                self.stdout.write(" * {0}".format(bill))

        if due:
            self.stdout.write("Following billings are past due date:")
            for bill in due:
                self.stdout.write(" * {0}".format(bill))
Пример #3
0
    def handle(self, *args, **options):
        if options['notify']:
            billing_notify()
            return
        Billing.objects.check_limits(options['grace'])
        if options['valid']:
            for bill in Billing.objects.get_valid():
                self.stdout.write(' * {0}'.format(bill))
            return
        limit = Billing.objects.get_out_of_limits()
        due = Billing.objects.get_unpaid()

        if limit:
            self.stdout.write('Following billings are over limit:')
            for bill in limit:
                self.stdout.write(' * {0}'.format(bill))

        if due:
            self.stdout.write('Following billings are past due date:')
            for bill in due:
                self.stdout.write(' * {0}'.format(bill))