NexLab_System / templates /net_amounts.html
alisaleem97's picture
Upload folder using huggingface_hub
6ea020b verified
Raw History Blame Contribute Delete
4 kB
<!-- templates/net_amounts.html -->
{% extends "base.html" %}
{% block title %}Net Amounts Report - NexLab{% endblock %}
{% block page_title %}Net Amounts Report{% endblock %}
{% block content %}
<!-- Flatpickr for Date Selection -->
<link rel="stylesheet" href="/static/vendor/flatpickr/flatpickr.min.css">
<script src="/static/vendor/flatpickr/flatpickr.min.js"></script>
<!-- Date Selection Form -->
<div class="bg-white rounded-xl shadow-sm border border-slate-200 mb-6 overflow-hidden">
<div class="p-6">
<form action="/reports/net-amounts" method="GET" class="flex flex-wrap items-end gap-4">
<div>
<label class="block text-xs font-bold text-slate-500 uppercase mb-2">From Date</label>
<input type="text" name="start_date" id="start_date" required value="{{ start_date }}"
class="datepicker w-48 border border-slate-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-indigo-500 focus:outline-none text-sm">
</div>
<div>
<label class="block text-xs font-bold text-slate-500 uppercase mb-2">To Date</label>
<input type="text" name="end_date" id="end_date" required value="{{ end_date }}"
class="datepicker w-48 border border-slate-300 rounded-lg px-3 py-2 focus:ring-2 focus:ring-indigo-500 focus:outline-none text-sm">
</div>
<button type="submit"
class="bg-indigo-600 hover:bg-indigo-700 text-white px-6 py-2 rounded-lg text-sm font-semibold transition shadow-sm">
Generate Report
</button>
</form>
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
flatpickr(".datepicker", {
dateFormat: "Y-m-d",
altInput: true,
altFormat: "d-m-Y",
allowInput: true
});
});
</script>
<!-- Report Table -->
<div class="bg-white rounded-xl shadow-sm border border-slate-200 overflow-hidden">
<div class="overflow-x-auto">
<table class="w-full text-left border-collapse">
<thead>
<tr class="bg-slate-50 border-b border-slate-200 text-xs font-bold text-slate-500 uppercase tracking-wider">
<th class="px-6 py-4">Date</th>
<th class="px-6 py-4 text-right">Net Amount With Tax</th>
<th class="px-6 py-4 text-right">Net Amount Without Tax</th>
</tr>
</thead>
<tbody class="divide-y divide-slate-100 text-sm">
{% if rows %}
{% for row in rows %}
<tr class="hover:bg-slate-50 transition-colors">
<td class="px-6 py-4 font-medium text-slate-800">{{ row.date }}</td>
<td class="px-6 py-4 text-right font-medium text-indigo-600">{{ "{:,.0f}".format(row.net_with_tax) }}</td>
<td class="px-6 py-4 text-right font-medium text-teal-600">{{ "{:,.0f}".format(row.net_without_tax) }}</td>
</tr>
{% endfor %}
{% else %}
<tr>
<td colspan="3" class="px-6 py-8 text-center text-slate-400 italic">No data found for the selected date range.</td>
</tr>
{% endif %}
</tbody>
{% if rows %}
<tfoot class="bg-slate-50 border-t-2 border-slate-200 font-bold">
<tr>
<td class="px-6 py-4 text-slate-700 uppercase tracking-wider text-sm">Total Summary</td>
<td class="px-6 py-4 text-right text-lg text-indigo-700">{{ "{:,.0f}".format(total_net_with_tax) }}</td>
<td class="px-6 py-4 text-right text-lg text-teal-700">{{ "{:,.0f}".format(total_net_without_tax) }}</td>
</tr>
</tfoot>
{% endif %}
</table>
</div>
</div>
{% endblock %}