You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
167 lines
5.4 KiB
167 lines
5.4 KiB
{% extends "base.html" %}
|
|
|
|
{% block title %}Payment Batches - Plutus{% endblock %}
|
|
|
|
{% block head %}
|
|
<style>
|
|
/* Background styling for Payment Batches page */
|
|
body {
|
|
background-color: #3a3a3a !important;
|
|
background-image: url("{{ url_for('static', filename='images/plutus3.JPG') }}") !important;
|
|
background-size: cover;
|
|
background-position: center;
|
|
background-repeat: no-repeat;
|
|
background-attachment: fixed;
|
|
position: relative;
|
|
}
|
|
|
|
body::before {
|
|
content: '';
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background-color: rgba(58, 58, 58, 0.85);
|
|
z-index: -1;
|
|
}
|
|
|
|
/* Ensure content is visible on top of background */
|
|
.container-fluid, .container {
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
|
|
/* Ensure navbar and footer are above background */
|
|
.navbar, .footer, main {
|
|
position: relative;
|
|
z-index: 1;
|
|
}
|
|
|
|
/* Page title and breadcrumb styling */
|
|
h1, h2, h3, h4, h5, h6 {
|
|
color: #faf8f0 !important;
|
|
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
|
|
}
|
|
|
|
.breadcrumb-item a {
|
|
color: #d4af37 !important;
|
|
}
|
|
|
|
.breadcrumb-item.active {
|
|
color: #faf8f0 !important;
|
|
}
|
|
|
|
/* Page title styling */
|
|
.page-title {
|
|
background: linear-gradient(135deg, rgba(212, 175, 55, 0.95) 0%, rgba(255, 191, 0, 0.95) 100%);
|
|
color: #2c2c2c;
|
|
padding: 1.5rem 2rem;
|
|
border-radius: 8px;
|
|
box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
/* Table container with enhanced visibility */
|
|
.table-responsive {
|
|
background-color: rgba(250, 248, 240, 0.98);
|
|
border-radius: 8px;
|
|
padding: 1.5rem;
|
|
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
|
|
border: 2px solid rgba(212, 175, 55, 0.5);
|
|
}
|
|
|
|
/* Alert styling for better visibility */
|
|
.alert {
|
|
background-color: rgba(250, 248, 240, 0.98);
|
|
border: 2px solid rgba(212, 175, 55, 0.5);
|
|
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
|
|
}
|
|
</style>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="page-title text-center">
|
|
<h1 class="h2 mb-0">Payment Batches</h1>
|
|
</div>
|
|
|
|
{% if batches %}
|
|
<div class="table-responsive">
|
|
<table class="table table-striped table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th>Batch ID</th>
|
|
<th>Created</th>
|
|
<th>Total Payments</th>
|
|
<th>Payment Amount</th>
|
|
<th>Stripe Fees</th>
|
|
<th>Success Rate</th>
|
|
<th>Status</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for batch in batches %}
|
|
<tr>
|
|
<td>
|
|
<strong>#{{ batch.id }}</strong>
|
|
</td>
|
|
<td>{{ batch.Created.strftime('%Y-%m-%d %H:%M') if batch.Created else '-' }}</td>
|
|
<td>
|
|
<span class="badge bg-info">{{ batch.payment_count or 0 }}</span>
|
|
</td>
|
|
<td>
|
|
<strong>{{ batch.total_amount | currency }}</strong>
|
|
</td>
|
|
<td>
|
|
{{ batch.total_fees | currency }}
|
|
</td>
|
|
<td>
|
|
{% if batch.payment_count and batch.payment_count > 0 %}
|
|
{% set success_rate = (batch.successful_count or 0) / batch.payment_count * 100 %}
|
|
{% if success_rate >= 90 %}
|
|
<span class="badge bg-success">{{ "%.1f"|format(success_rate) }}%</span>
|
|
{% elif success_rate >= 70 %}
|
|
<span class="badge bg-warning">{{ "%.1f"|format(success_rate) }}%</span>
|
|
{% else %}
|
|
<span class="badge bg-danger">{{ "%.1f"|format(success_rate) }}%</span>
|
|
{% endif %}
|
|
{% else %}
|
|
<span class="badge bg-secondary">0%</span>
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
<div>
|
|
{% if batch.successful_count %}
|
|
<span class="badge bg-success me-1">{{ batch.successful_count }} Success</span>
|
|
{% endif %}
|
|
{% if batch.pending_count %}
|
|
<span class="badge bg-warning me-1">{{ batch.pending_count }} Pending</span>
|
|
{% endif %}
|
|
{% if batch.failed_count %}
|
|
<span class="badge bg-danger me-1">{{ batch.failed_count }} Failed</span>
|
|
{% endif %}
|
|
{% if batch.error_count %}
|
|
<span class="badge bg-warning me-1">{{ batch.error_count }} Errors</span>
|
|
{% endif %}
|
|
{% if not batch.successful_count and not batch.failed_count %}
|
|
<span class="badge bg-light text-dark">No Payments</span>
|
|
{% endif %}
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<a class="btn btn-primary btn-sm" href="{{ url_for('main.batch_detail', batch_id=batch.id) }}">
|
|
<i class="fas fa-eye"></i> View Details
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% else %}
|
|
<div class="alert alert-info">
|
|
<p class="mb-0">No payment batches found. <a href="{{ url_for('main.index') }}" class="alert-link">Return to dashboard</a>.</p>
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|