{% extends "recurring_payments/base.html" %} {% load base_tags %} {% load base_filters %} {% load perm_tags %} {% load recurring_payments_tags %} {% load i18n %} {% block title %}Recurring Payment View{% endblock %} {% block extra_head %} {{ block.super }} {% endblock %} {% block body %}
{% rp_nav request.user rp %} {% if not is_active %}
This account is {{ rp.status_detail }}
{% endif %}

Recurring Payment Account

{% if is_active %}
{% if payment_profile %}
Last updated by {{ payment_profile.owner }} on {{ payment_profile.update_dt|date:'N j Y' }}
{% endif %}
{% endif %} {% if rp.url %}
URL: {{ rp.url|urlize }}
{% endif %}
Description: {{ rp.description }}
{% if num_accounts > 1 %}
View all {% if is_owner %} my{% else %}{{ rp.user.first_name }}'s{% endif %} accounts
{% endif %}
Current account balance: {{ rp.get_outstanding_balance|format_currency }}

{% if last_paid_payment_transaction %} The last payment ({{ last_paid_payment_transaction.amount|format_currency }}) received date: {{ last_paid_payment_transaction.create_dt }}.

{% endif %} {% if last_failed_payment_transaction %} The last payment ({{ last_paid_payment_transaction.amount|format_currency }}) was failed on {{ last_failed_payment_transaction.create_dt|date }}.

{% endif %} The number of billing cycle completed: {{ rp.num_billing_cycle_completed }}

The number of billing cycle failed: {{ rp.num_billing_cycle_failed }}
Recurring Billing Settings
Payment Amount: {{ rp.payment_amount|format_currency }}
{% if rp.tax_rate %}
Tax Rate: {{ rp.tax_rate_percentage }}
{% endif %}
Initial Billing Cycle Start Date: {{ rp.billing_start_dt }}
Billing Frequency: Once every {{ rp.billing_frequency }} {{ rp.billing_period }}{{ rp.billing_frequency|pluralize }}
Billing Date: {{ rp.num_days }} day{{ rp.num_days|pluralize }} after each billing cycle {{ rp.due_sore }} date
{% if rp.has_trial_period %}
Trial Period
Amount: {{ rp.trial_amount|format_currency }}
From {{ rp.trial_period_start_dt|date }} to {{ rp.trial_period_end_dt|date }}
{% endif %}
{% if rp_invoices %} {% for rp_invoice in rp_invoices %} {% endfor %}
Billing Cycle Amount Due Date Payment Received Date Paid? Invoice #
{{ rp_invoice.billing_cycle_start_dt|date:"n/j/Y" }} - {{ rp_invoice.billing_cycle_end_dt|date:"n/j/Y" }} {{ rp_invoice.invoice.total|format_currency }} {{ rp_invoice.billing_dt|date:"n/j/Y" }} {% if rp_invoice.payment_received_dt %}{{ rp_invoice.payment_received_dt|date:"n/j/Y" }}{% endif %} {% if rp_invoice.invoice.balance <= 0 %}Y{% else %}N{% endif %} {{ rp_invoice.invoice.id }}
{% else %} No invoices available yet. {% endif %}
{% if payment_transactions %} {% for pt in payment_transactions %} {% with pt.recurring_payment_invoice as rp_invoice %} {% endwith %} {% endfor %}
Date Invoice # Amount Result Reason if Failed View Receipt
{{ pt.create_dt|date:"n/j/Y" }} {{ pt.recurring_payment_invoice.invoice.id }} {{ pt.amount|format_currency }} {% if pt.status %}Success{% else %}Failed{% endif %} {% if not pt.status %}{{ pt.message_text }}{% endif %} {% if pt.status %}{{ pt.payment.id }}{% endif %}
{% else %} No payment transactions available yet. {% endif %}
{% if is_active %} {% endif %} {% endblock %} {% block extra_body %} {{ block.super }} {# dynamically load jquery #} {% if is_active %} {% endif %} {% endblock %}