added subcontractor report generation by RA bill and subcontractor name

This commit is contained in:
2026-01-13 13:34:20 +05:30
parent 58eff71c7c
commit ae5fee8f46
4 changed files with 631 additions and 142 deletions

View File

@@ -2,38 +2,39 @@
{% block content %}
<div class="container mt-4">
<h2 class="mb-4">Generate Subcontractor Report</h2>
<h2 class="mb-4">File Report</h2>
<!-- FLASH MESSAGES -->
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
{% for category, message in messages %}
<div class="alert alert-{{ category }} alert-dismissible fade show" role="alert">
{{ message }}
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
</div>
{% endfor %}
{% endif %}
{% if messages %}
{% for category, message in messages %}
<div class="alert alert-{{ category }} alert-dismissible fade show" role="alert">
{{ message }}
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
</div>
)
{% endfor %}
{% endif %}
{% endwith %}
<div class="card p-4 shadow-sm">
<form method="POST">
<div class="mb-3">
<label class="form-label fw-semibold">Select Subcontractor</label>
<select name="subcontractor_id" class="form-select" required>
<option value="">-- Select Subcontractor --</option>
{% for sc in subcontractors %}
<option value="{{ sc.id }}">{{ sc.subcontractor_name }}</option>
{% endfor %}
</select>
</div>
<!-- SELECT SUBCONTRACTOR -->
<label class="form-label fw-semibold">Select Subcontractor</label>
<select name="subcontractor_id" id="subcontractor_id" class="form-select mb-3" required>
<option value="">-- Select Subcontractor --</option>
<div class="mb-3">
<label class="form-label fw-semibold">RA Bill Number</label>
<input type="text" name="ra_bill_no" class="form-control" placeholder="e.g. 01" required>
</div>
{% for sc in subcontractors %}
<option value="{{ sc.id }}">{{ sc.subcontractor_name }}</option>
{% endfor %}
</select>
<button class="btn btn-primary w-100">Generate Report</button>
<button type="submit" class="btn btn-primary w-100">Generate Excel Report</button>
</form>
</div>
</div>
{% endblock %}