{% extends 'base.html' %} {% load humanize %} {% block title %}SMS Logs{% endblock %} {% block extra_css %} {% endblock %} {% block content %}

๐Ÿ“ฑ SMS Logs

Every SMS sent by the system โ€” payment confirmations, approvals, reminders

{{ stats.today }}
Today
{{ stats.sent }}
Delivered
{{ stats.failed }}
Failed
{% if type_counts %}
{% for tc in type_counts %} {{ tc.sms_type|title|cut:"_" }}: {{ tc.count }} {% endfor %}
{% endif %}
{% for log in page_obj %} {% empty %} {% endfor %}
Date & Time Type Recipients Message Loan / Borrower Amount Status Actions
{{ log.created_at|date:"d/m/Y" }}
{{ log.created_at|date:"H:i:s" }}
{% if log.sms_type == 'payment_confirmation' %} ๐Ÿ’ฐ Payment {% elif log.sms_type == 'loan_approval' %} โœ… Approval {% elif log.sms_type == 'loan_disbursement' %} ๐Ÿ’ธ Disbursement {% elif log.sms_type == 'overdue_reminder' %} โฐ Overdue {% elif log.sms_type == 'unknown_payment' %} โ“ Unknown Pmt {% elif log.sms_type == 'stk_push' %} ๐Ÿ“ฒ STK Push {% elif log.sms_type == 'test' %} ๐Ÿงช Test {% else %} {{ log.sms_type }} {% endif %} {% for phone in log.recipients.split %} {{ phone|cut:"," }}
{% endfor %}
({{ log.recipient_count }} recipient{{ log.recipient_count|pluralize }})
{{ log.message }}
View full
{% if log.loan_number %}{{ log.loan_number }}
{% endif %} {{ log.borrower_name }}
{% if log.amount %} KES {{ log.amount|floatformat:2|intcomma }} {% else %}โ€”{% endif %} {% if log.status == 'sent' %} โœ“ Sent {% elif log.status == 'failed' %} โœ— Failed {% else %} โš  Partial {% endif %} ๐Ÿ‘ View {% if log.status != 'sent' %}
{% csrf_token %}
{% endif %}
๐Ÿ“ญ
No SMS logs yet

SMS messages will appear here once the system starts sending them.

{% if page_obj.has_other_pages %} {% endif %}
{% endblock %}