{% extends 'layout/base.html' %} {% block content %}
{% if current_user.role == 'operator' %}
(Max File Size 5 MB)
{% endif %}
📁 Uploaded Expense Documents
{% if documents %}
{% for doc in documents %} {% if current_user.role == 'admin' %} {% set show_doc = True %} {% elif current_user.role == 'accounts' %} {% set show_doc = doc.status_of_audit in ['pending', 'reupload'] %} {% elif current_user.role == 'operator' %} {% set show_doc = doc.status_of_audit == 'pending' %} {% elif current_user.role == 'ca' %} {% set show_doc = doc.status_of_audit == 'audited' %} {% else %} {% set show_doc = False %} {% endif %} {% if show_doc %} {% if doc.bill_path %} {% set cleaned_path = url_for('static', filename=doc.bill_path.replace('\\', '/')) %} {% else %} {% set cleaned_path = '' %} {% endif %}
{% if current_user.role == 'admin' and doc.status_of_audit in ['pending'] %} File Icon {{ doc.filename }} ({{ doc.filename.split('.')[-1]|lower }}) {% else %} File Icon {{ doc.filename }} ({{ doc.filename.split('.')[-1]|lower }}) {% endif %} {% if current_user.role == 'accounts' and doc.status_of_audit in ['pending', 'reupload'] %}
(Max File Size 5 MB)
{% else %}
Status: {{ doc.status_of_audit|capitalize }}
{% endif %} {% if current_user.role in ['admin', 'accounts'] %} {% endif %}
{% endif %} {% endfor %}
{% else %}

No documents uploaded yet.

{% endif %}
{% endblock %}