{% include "_pwa_head.html" %}
{% with messages = get_flashed_messages(with_categories=true) %} {% if messages %} {% for category, message in messages %} {% endfor %} {% endif %} {% endwith %}
Period: {{ month_start }} to {{ month_end }}
Target
{{ monthly_target }}
Achieved
{{ achieved_count }}
Balance
{{ remaining_count }}
Achieved %
{{ '%.2f'|format(achieved_percentage or 0) }}%
{{ advice }}
{{ '%.1f'|format(achieved_percentage or 0) }}%
Achieved Balance
Monthly Target vs Achieved
{% if (syscare_chart_labels|length) > 1 %}
Trend from {{ syscare_chart_start_label }} to {{ syscare_chart_anchor_label }}. Scope: {{ syscare_chart_scope_label }}.
{% else %}
Month {{ syscare_chart_anchor_label }}. Scope: {{ syscare_chart_scope_label }}.
{% endif %}
Months {{ (syscare_chart_labels|length) if syscare_chart_labels else 0 }} Achieved Total {{ syscare_chart_total_achieved or 0 }} Monthly Target {{ syscare_chart_target_value or 0 }}
{% if syscare_chart_has_data %}
{% else %}
No SYSCARE chart data
Set a branch target or upload SYSCARE records to see the monthly trend.
{% endif %}
Branch Progress (Top)
{% if branch_stats %} {% for bs in branch_stats %} {% endfor %} {% else %} {% endif %}
Branch Target Achieved Balance Progress
{{ bs.branch_name }} {{ bs.monthly_target }} {{ bs.achieved }} {{ bs.remaining }} {% set progress_class = 'bg-success' if bs.percentage >= 100 else 'bg-primary' if bs.percentage >= 50 else 'bg-warning' %} {% set progress_width = [bs.percentage, 100]|min %}
{{ bs.percentage }}%
No branch stats available
{% if can_manage %}
{% for bs in branch_stats %} {% endfor %}
Branch Target Achieved Balance Progress Action
{{ bs.branch_name }} {{ bs.achieved }} {{ bs.remaining }} {% set progress_class = 'bg-success' if bs.percentage >= 100 else 'bg-primary' if bs.percentage >= 50 else 'bg-warning' %} {% set progress_width = [bs.percentage, 100]|min %}
{{ bs.percentage }}%
Leave branch name empty to skip
{% else %}
Branch target management is available only for Admin / Super Admin.
{% endif %}
Clear
{{ total_records }} rows Page {{ current_page }} / {{ total_pages }}
{% if records %} {% for r in records %} {% set row_model = (r.product_model or '')|trim %} {% set row_serial = (r.serial_number or '')|trim %} {% set row_combined = (r.model_serial or '')|trim %} {% if row_combined and (not row_model or not row_serial) %} {% if ' / ' in row_combined %} {% set row_parts = row_combined.split(' / ', 1) %} {% if not row_model %}{% set row_model = row_parts[0]|trim %}{% endif %} {% if not row_serial and (row_parts|length) > 1 %}{% set row_serial = row_parts[1]|trim %}{% endif %} {% elif 'SN:' in row_combined %} {% set row_parts = row_combined.split('SN:', 1) %} {% if not row_model %}{% set row_model = row_parts[0]|replace('/', ' ')|trim %}{% endif %} {% if not row_serial and (row_parts|length) > 1 %}{% set row_serial = row_parts[1]|trim %}{% endif %} {% elif ',' in row_combined %} {% set row_parts = row_combined.split(',', 1) %} {% if not row_model %}{% set row_model = row_parts[0]|trim %}{% endif %} {% if not row_serial and (row_parts|length) > 1 %}{% set row_serial = row_parts[1]|trim %}{% endif %} {% endif %} {% endif %} {% endfor %} {% else %} {% endif %}
Date Syscare ID Customer Contact Product Model Serial Number Branch Incharge Amount Expiry Date Expire within Certificate
{{ r.record_date }} {{ r.syscare_id }} {{ r.customer_name or '-' }} {{ r.contact_number or '-' }} {{ row_model or '-' }} {{ row_serial or '-' }} {{ r.branch_name or '-' }} {{ r.incharge or '-' }} {{ '%.2f'|format(r.amount or 0) }} {{ r.expiry_date or '-' }} {{ r.expire_within_days if r.expire_within_days is not none else '-' }} View Certificate WhatsApp {% if can_manage %}
{% endif %}
No records for selected month
Showing {{ ((current_page - 1) * 25) + 1 if total_records > 0 else 0 }}-{{ [current_page * 25, total_records]|min }} of {{ total_records }}
{% if can_manage %}
Upload SYSCARE Sheet
Expected columns: Date, Syscare ID, Cus Name, Contact Number, Branch, Incharge, Model, Serial Number, Amount, Expiry Date
{% else %}
Upload is available only for Admin / Super Admin.
{% endif %}