from django.core.management.base import BaseCommand
from payments.utils import generate_monthly_invoices


class Command(BaseCommand):
    help = 'Generate monthly rent invoices for all occupied units'

    def handle(self, *args, **kwargs):
        result = generate_monthly_invoices()
        self.stdout.write(self.style.SUCCESS(result))