{% if sc_appr %}
{% for sc_app in sc_appr %} {% if sc_app.header_guid_id in sc_head.guid and sc_app.step_num == '1' %} {% if sc_app.app_id != 'Auto' %} {% if sc_head.status == 'AWAITING_APPROVAL' or sc_head.status == 'ORDERED' %} Approval Process Overview by {{sc_app.app_desc}} {% elif sc_head.status == 'SAVED' %} Approval Process Overview {% elif sc_head.status == 'APPROVED' %} Approval Process Overview {% elif sc_head.status == 'PURCHASER_WORKLIST' %} Approval Process Overview by Shopper Assist {% elif sc_head.status == 'REJECTED' %} Approval Process Overview {% endif %} {% elif sc_app.app_id == 'Auto' %} {% if sc_head.status == 'PURCHASER_WORKLIST' %} Approval Process Overview Shopper Assist {% elif sc_head.status == 'SAVED' %} Approval Process Overview {% else %} Approval Process Overview {% endif %} {% endif %} {% endif %} {% endfor %}
{% for workflow in sc_completion %} {% if sc_head.guid == workflow.0 %}
{% if sc_head.status == 'PURCHASER_WORKLIST' %} {% if workflow.1 == 'Multiple' %}
{% else %}
{% endif %} {% elif sc_head.status == 'SAVED' %} {% if workflow.1 == 'Multiple' %}
{% else %}
{% endif %} {% else %} {% if workflow.1 == 'Multiple' %}
{% else %}
{% endif %} {% endif %}
{% endif %} {% endfor %}
{% for sc_app in sc_appr %} {% if sc_app.header_guid_id in sc_head.guid %} {% if sc_head.approval_ind == 'M' %} {% if sc_app.step_num == '1' %}
{% endif %} {% else %}
{% if sc_app.proc_lvl_sts == 'ACTIVE' and sc_app.app_sts == 'OPEN' %}
{% elif sc_app.proc_lvl_sts == 'INITIATED' and sc_app.app_sts == 'OPEN' %}
{% elif sc_app.proc_lvl_sts == 'COMPLETED' and sc_app.app_sts == 'APPROVER_APPROVED' %}
{% elif sc_app.proc_lvl_sts == 'COMPLETED' and sc_app.app_sts == 'APPROVER_REJECTED' %}
{% endif %} {% endif %} {% endif %} {% endfor %}
{% else %}
{% for workflow in sc_completion %} {% if sc_head.guid == workflow.0 %}
{% if sc_head.status == 'PURCHASER_WORKLIST' %} {% if workflow.1 == 'Multiple' %}
{% else %}
{% endif %} {% elif sc_head.status == 'SAVED' %} {% if workflow.1 == 'Multiple' %}
{% else %}
{% endif %} {% else %} {% if workflow.1 == 'Multiple' %}
{% else %}
{% endif %} {% endif %}
{% endif %} {% endfor %}
{% endif %}