import os

import cfgtools

print_customer_phone = None


def must_print_delivery_customer_phone():
    # type: (...) -> bool

    global print_customer_phone

    if not print_customer_phone:
        config = cfgtools.read(os.environ["LOADERCFG"])
        print_customer_phone = (config.find_value("DeliveryCoupon.PrintCustomerPhone") or "false").lower() == "true"

    return print_customer_phone
