Creates the invoices for any due positive charges in the account.
    If there are due positive charges in different currencies, one invoice is created for each currency.

    :param account_id: The account to invoice.
    :param due_date: The due date for any invoice that gets created.
    :return: A possibly-empty list of Invoices.

def create_invoices(account_id: str, due_date: date) -> Sequence[Invoice]:
    """
    Creates the invoices for any due positive charges in the account.
    If there are due positive charges in different currencies, one invoice is created for each currency.

    :param account_id: The account to invoice.
    :param due_date: The due date for any invoice that gets created.
    :return: A possibly-empty list of Invoices.
    """
    invoices = []
    with transaction.atomic():
        due_charges = Charge.objects \
            .uninvoiced(account_id=account_id) \
            .charges()
        total = total_amount(due_charges)
        for amount_due in total.monies():
            if amount_due.amount > 0:
                invoice = Invoice.objects.create(account_id=account_id, due_date=due_date)
                Charge.objects \
                    .uninvoiced(account_id=account_id) \
                    .charges() \
                    .in_currency(currency=amount_due.currency) \
                    .update(invoice=invoice)
                invoices.append(invoice)
    logger.info('created-invoices', account_id=str(account_id), invoice_ids=[i.pk for i in invoices])
    for invoice in invoices:
        invoice_ready.send(sender=create_invoices, invoice=invoice)
    return invoices