from xml.etree import cElementTree as eTree


def get_order_total(
    order_picture,  # type: eTree.XML
):
    # type: (...) -> float

    total = float(order_picture.get("totalGross"))

    if order_picture.get("discountAmount") is not None:
        total += float(order_picture.get("discountAmount"))

    if order_picture.get("tip") is not None:
        total += float(order_picture.get("tip"))

    return total
