{% extends "base.html" %} {% block title %}Payment Plan #{{ plan.id }} - Plutus{% endblock %} {% block content %}

Payment Plan #{{ plan.id }}

Created: {{ plan.Created.strftime('%Y-%m-%d %H:%M:%S') if plan.Created else 'Unknown' }}

{% if plan.Enabled %} {% else %} {% endif %}
{% if plan.Enabled %}

Active Payment Plan

This payment plan is currently active and processing payments.

{% else %}

Inactive Payment Plan

This payment plan is disabled and not processing payments.

{% endif %}

{{ plan.Amount | currency }}

{{ plan.Frequency }}

Customer Information

Loading customer details...

Plan Configuration

Plan ID #{{ plan.id }}
Payment Amount {{ plan.Amount | currency }}
Frequency {{ plan.Frequency }}
Start Date {{ plan.Start_Date.strftime('%Y-%m-%d') if plan.Start_Date else '-' }} {% if plan.Start_Date %}
Payments occur every {{ plan.Frequency.lower() }} from this date {% endif %}
Payment Method {{ plan.Stripe_Payment_Method[:20] }}{% if plan.Stripe_Payment_Method|length > 20 %}...{% endif %}
Status {% if plan.Enabled %} Active {% else %} Inactive {% endif %}
Created {{ plan.Created.strftime('%Y-%m-%d %H:%M:%S') if plan.Created else '-' }}
Created By {{ plan.created_by or 'Unknown' }}

Associated Payments

{% if associated_payments %}
{% for payment in associated_payments %} {% endfor %}
Payment ID Amount Status Payment Intent Processed Actions
#{{ payment.id }} {{ payment.Payment_Amount | currency }} {% if payment.Refund == True %} Refund {% elif payment.Success == True %} Success {% elif payment.Success == False and payment.PI_FollowUp %} Pending {% elif payment.Success == False %} Failed {% else %} Pending {% endif %} {% if payment.Payment_Intent %} {{ payment.Payment_Intent[:20] }}... {% else %} - {% endif %} {{ payment.Created.strftime('%Y-%m-%d %H:%M') if payment.Created else '-' }}

Payment Summary

Total: {{ associated_payments|length }} payments

{{ associated_payments|selectattr('Success', 'equalto', True)|list|length }} Successful
{{ associated_payments|selectattr('Success', 'equalto', False)|list|length }} Failed
{{ associated_payments|selectattr('Success', 'equalto', None)|list|length }} Pending
{% else %}

No Associated Payments

This payment plan hasn't processed any payments yet.

{% endif %}
{% endblock %}