from billing.models import *  # noqa


def total(invoice: Invoice) -> int:
    cents = sum(line.cents for line in invoice.lines)
    # TODO: rounding rules for CHF
    # if invoice.currency == "CHF":
    #     cents = round(cents / 5) * 5
    # return cents
    return cents
