149 lines
5.9 KiB
HTML
149 lines
5.9 KiB
HTML
<div class="row">
|
|
<div class="col-md-6">
|
|
<h6 class="mb-3">Customer Information</h6>
|
|
<table class="table table-sm">
|
|
<tr>
|
|
<td><strong>Name:</strong></td>
|
|
<td>{{ customer.name or 'N/A' }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Email:</strong></td>
|
|
<td>{{ customer.email }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Phone:</strong></td>
|
|
<td>{{ customer.phone or 'N/A' }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Created:</strong></td>
|
|
<td>{{ customer.created_at.strftime('%Y-%m-%d %H:%M') if customer.created_at else 'N/A' }}</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="col-md-6">
|
|
<h6 class="mb-3">Subscription Information</h6>
|
|
<table class="table table-sm">
|
|
<tr>
|
|
<td><strong>Plan:</strong></td>
|
|
<td>
|
|
{% if plan %}
|
|
<span class="badge bg-primary">{{ plan.name }}</span>
|
|
{% else %}
|
|
<span class="text-muted">Plan {{ customer.subscription_plan_id or 'N/A' }}</span>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Status:</strong></td>
|
|
<td>
|
|
{% if customer.subscription_status %}
|
|
{% if customer.subscription_status == 'active' %}
|
|
<span class="badge bg-success">Active</span>
|
|
{% elif customer.subscription_status == 'canceled' %}
|
|
<span class="badge bg-danger">Canceled</span>
|
|
{% elif customer.subscription_status == 'past_due' %}
|
|
<span class="badge bg-warning">Past Due</span>
|
|
{% else %}
|
|
<span class="badge bg-secondary">{{ customer.subscription_status }}</span>
|
|
{% endif %}
|
|
{% else %}
|
|
<span class="text-muted">No subscription</span>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Billing Cycle:</strong></td>
|
|
<td>
|
|
{% if customer.subscription_billing_cycle %}
|
|
<span class="badge bg-info">{{ customer.subscription_billing_cycle.title() }}</span>
|
|
{% else %}
|
|
<span class="text-muted">N/A</span>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Current Period:</strong></td>
|
|
<td>
|
|
{% if customer.subscription_current_period_start and customer.subscription_current_period_end %}
|
|
{{ customer.subscription_current_period_start.strftime('%Y-%m-%d') }} to {{ customer.subscription_current_period_end.strftime('%Y-%m-%d') }}
|
|
{% else %}
|
|
<span class="text-muted">N/A</span>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
{% if customer.billing_address_line1 or customer.shipping_address_line1 %}
|
|
<div class="row mt-4">
|
|
{% if customer.billing_address_line1 %}
|
|
<div class="col-md-6">
|
|
<h6 class="mb-3">Billing Address</h6>
|
|
<address class="mb-0">
|
|
{{ customer.billing_address_line1 }}<br>
|
|
{% if customer.billing_address_line2 %}{{ customer.billing_address_line2 }}<br>{% endif %}
|
|
{% if customer.billing_city %}{{ customer.billing_city }}{% endif %}
|
|
{% if customer.billing_state %}, {{ customer.billing_state }}{% endif %}
|
|
{% if customer.billing_postal_code %} {{ customer.billing_postal_code }}{% endif %}<br>
|
|
{% if customer.billing_country %}{{ customer.billing_country }}{% endif %}
|
|
</address>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if customer.shipping_address_line1 %}
|
|
<div class="col-md-6">
|
|
<h6 class="mb-3">Shipping Address</h6>
|
|
<address class="mb-0">
|
|
{{ customer.shipping_address_line1 }}<br>
|
|
{% if customer.shipping_address_line2 %}{{ customer.shipping_address_line2 }}<br>{% endif %}
|
|
{% if customer.shipping_city %}{{ customer.shipping_city }}{% endif %}
|
|
{% if customer.shipping_state %}, {{ customer.shipping_state }}{% endif %}
|
|
{% if customer.shipping_postal_code %} {{ customer.shipping_postal_code }}{% endif %}<br>
|
|
{% if customer.shipping_country %}{{ customer.shipping_country }}{% endif %}
|
|
</address>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if customer.tax_id_type and customer.tax_id_value %}
|
|
<div class="row mt-4">
|
|
<div class="col-12">
|
|
<h6 class="mb-3">Tax Information</h6>
|
|
<table class="table table-sm">
|
|
<tr>
|
|
<td><strong>Tax ID Type:</strong></td>
|
|
<td>{{ customer.tax_id_type }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td><strong>Tax ID Value:</strong></td>
|
|
<td>{{ customer.tax_id_value }}</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if customer.stripe_customer_id or customer.stripe_subscription_id %}
|
|
<div class="row mt-4">
|
|
<div class="col-12">
|
|
<h6 class="mb-3">Stripe Information</h6>
|
|
<table class="table table-sm">
|
|
{% if customer.stripe_customer_id %}
|
|
<tr>
|
|
<td><strong>Stripe Customer ID:</strong></td>
|
|
<td><code>{{ customer.stripe_customer_id }}</code></td>
|
|
</tr>
|
|
{% endif %}
|
|
{% if customer.stripe_subscription_id %}
|
|
<tr>
|
|
<td><strong>Stripe Subscription ID:</strong></td>
|
|
<td><code>{{ customer.stripe_subscription_id }}</code></td>
|
|
</tr>
|
|
{% endif %}
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{% endif %} |