from billing.models import Invoice


def total(invoice: Invoice) -> int:
    return sum(line.cents for line in invoice.lines)
