import sysactions

ask_document_pinpad = {}


def get_ask_document_pinpad(
    pos_id,  # type: str
):
    # type: (...) -> bool

    global ask_document_pinpad

    if pos_id not in ask_document_pinpad:
        ask_document_pinpad[str(pos_id)] = sysactions.get_cfg(pos_id).find_value("AskDocumentPinpad", "false").lower() == "true"

    return ask_document_pinpad[pos_id]
