{% include "_pwa_head.html" %}
{% with messages = get_flashed_messages(with_categories=true) %} {% if messages %} {% for category, message in messages %} {% endfor %} {% endif %} {% endwith %}
Clear
Selected range: {{ from_date }} to {{ to_date }} | Branch: {{ filter_branch or ('All Branches' if has_global_scope else (branch_options[0] if branch_options else 'Current Branch')) }} | Engineer: {{ filter_engineer or 'All Engineers' }}
Closed after 7+ days means cases closed more than 7 days after the created date.
Today
Today New Calls
{{ today_jobs.new_calls }}
Today Closed Calls
{{ today_jobs.closed_calls }}
Closed After 7+ Days
{{ today_jobs.closed_after_7_days }}
Today SYSCARE
{{ today_syscare.syscare_count }}
Amount: {{ '%.2f'|format(today_syscare.syscare_amount|float) }}
Today Service Charges
{{ '%.2f'|format(today_jobs.service_charge_total|float) }}
Cases: {{ today_jobs.service_charge_count }}
Current Month
Current Month New Calls
{{ month_jobs.new_calls }}
Current Month Closed Calls
{{ month_jobs.closed_calls }}
Current Month SYSCARE
{{ month_syscare.syscare_count }}
Amount: {{ '%.2f'|format(month_syscare.syscare_amount|float) }}
Current Month Service Charges
{{ '%.2f'|format(month_jobs.service_charge_total|float) }}
Cases: {{ month_jobs.service_charge_count }}
Selected Range Snapshot
New Calls: {{ selected_jobs.new_calls }}
Closed Calls: {{ selected_jobs.closed_calls }}
SYSCARE: {{ selected_syscare.syscare_count }} | {{ '%.2f'|format(selected_syscare.syscare_amount|float) }}
Service Charges: {{ '%.2f'|format(selected_jobs.service_charge_total|float) }}
Upload Engineer Revenue Data
Quick Format: You can export the Closed Rank CSV above, fill in the Sales Revenue & Service Charges columns, and upload directly.
Staff Performance Ranking - Most Closed First
{% if staff_closed_rank_rows %} {% for row in staff_closed_rank_rows %} {% endfor %} {% else %} {% endif %}
Engineer Employee Code Branch Total Open Closed Success Closed Failed Sales Revenue Service Charges Total Revenue
{{ row.engineer_name }} {{ row.employee_code or '' }} {{ row.branch_name }} {{ row.total_calls }} {{ row.open_calls }} {{ row.closed_success }} {{ row.closed_failed }} {{ '%.2f'|format(row.sales_revenue|float) }} {{ '%.2f'|format(row.service_charges|float) }} {{ '%.2f'|format(row.total_revenue|float) }}
No staff ranking data for the selected filters
Staff Revenue Ranking - Highest Total Profit First
{% if staff_revenue_rank_rows %} {% for row in staff_revenue_rank_rows %} {% endfor %} {% else %} {% endif %}
Engineer Employee Code Branch Total Open Closed Success Closed Failed Sales Revenue Service Charges Total Revenue
{{ row.engineer_name }} {{ row.employee_code or '' }} {{ row.branch_name }} {{ row.total_calls }} {{ row.open_calls }} {{ row.closed_success }} {{ row.closed_failed }} {{ '%.2f'|format(row.sales_revenue|float) }} {{ '%.2f'|format(row.service_charges|float) }} {{ '%.2f'|format(row.total_revenue|float) }}
No staff revenue ranking data for the selected filters
Branch Summary
{% if branch_summary_rows %} {% for row in branch_summary_rows %} {% endfor %} {% else %} {% endif %}
Branch New Calls Closed Calls Closed 7+ Days SYSCARE Count SYSCARE Amount Service Charges
{{ row.branch_name }} {{ row.new_calls }} {{ row.closed_calls }} {{ row.closed_after_7_days }} {{ row.syscare_count }} {{ '%.2f'|format(row.syscare_amount|float) }} {{ '%.2f'|format(row.service_charge_total|float) }}
No branch data for the selected filters
Engineer Summary
{% if engineer_summary_rows %} {% for row in engineer_summary_rows %} {% endfor %} {% else %} {% endif %}
Engineer New Calls Closed Calls Closed 7+ Days SYSCARE Count SYSCARE Amount Service Charges
{{ row.engineer_name }} {{ row.new_calls }} {{ row.closed_calls }} {{ row.closed_after_7_days }} {{ row.syscare_count }} {{ '%.2f'|format(row.syscare_amount|float) }} {{ '%.2f'|format(row.service_charge_total|float) }}
No engineer data for the selected filters